2017-06-13 oracle常用SQL语句 获取表1234select table_name from user_tables; //当前用户的表 select table_name from all_tables; //所有用户的表 select table_name from dba_tables; //包括系统表select table_name from dba_tables where owner='username' 获取表字段1234select * from user_tab_columns where Table_Name = 'table_name' order by column_name 剩余表空间百分比12345678910111213select df.tablespace_name "表空间名", totalspace "总空间M", freespace "剩余空间M", round((1 - freespace / totalspace) * 100, 2) "使用率%" from (select tablespace_name, round(sum(bytes) / 1024 / 1024) totalspace from dba_data_files group by tablespace_name) df, (select tablespace_name, round(sum(bytes) / 1024 / 1024) freespace from dba_free_space group by tablespace_name) fs where df.tablespace_name = fs.tablespace_name; 检查依赖12345678910111213141516Select b.table_name 主键表名, b.column_name 主键列名, a.table_name 外键表名, a.column_name 外键列名 From (Select a.constraint_name, b.table_name, b.column_name, a.r_constraint_name From user_constraints a, user_cons_columns b Where a.constraint_type = 'R' And a.constraint_name = b.constraint_name) a, (Select Distinct a.r_constraint_name, b.table_name, b.column_name From user_constraints a, user_cons_columns b Where a.constraint_type = 'R' And a.r_constraint_name = b.constraint_name) b Where a.r_constraint_name = b.r_constraint_name 检查被锁定的表1234select object_name, machine, s.sid, s.serial# from v$locked_object l, dba_objects o, v$session s where l.object_id = o.object_id and l.session_id = s.sid; 计算表占用空间的大小1234567select segment_name table_name, sum(blocks) blocks, sum(bytes) / (1024 * 1024) "table_size[mb]" from user_segments where segment_type = 'table' and segment_name = &table_name group by segment_name; 查看数据库是否为CDB12345678select name, decode(cdb, 'YES', 'Multitenant Option enabled', 'Regular 12c Database: ') "Multitenant Option", open_mode, con_id from v$database;
2017-06-13 mac电脑上获取当前WiFi的密码 安装1brew install wifi-password 使用1wifi-password #测试123456789101112131$brew install wifi-passwordWarning: You are using OS X 10.12.We do not provide support for this pre-release version.You may encounter build failures or other breakages.==> Downloading https://github.com/rauchg/wifi-password/archive/0.1.0.tar.gz==> Downloading from https://codeload.github.com/rauchg/wifi-password/tar.gz/0.1######################################################################## 100.0%🍺 /usr/local/Cellar/wifi-password/0.1.0: 4 files, 3.4K, built in 6 seconds2$wifi-password … getting password for "WXIIVY". … keychain prompt incoming.✓ "ITKF1234"
2017-06-13 hexo简单教程 Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment