广州致峰网站建设,便宜的网站空间,国外免费服务器ip大全,如何用php做网站Oracle常用数据字典表 查看当前用户的缺省表空间SQLselect username,default_tablespace from user_users; 查看当前用户的角色SQLselect * from user_role_privs;查看当前用户的系统权限和表级权限SQLselect * from user_sys_privs;SQLselect * from user_tab…Oracle常用数据字典表 查看当前用户的缺省表空间SQLselect username,default_tablespace from user_users; 查看当前用户的角色SQLselect * from user_role_privs;查看当前用户的系统权限和表级权限SQLselect * from user_sys_privs;SQLselect * from user_tab_privs;查看用户下所有的表SQLselect * from user_tables;显示用户信息(所属表空间)select default_tablespace,temporary_tablespace from dba_users where usernameGAME;1、用户查看当前用户的缺省表空间SQLselect username,default_tablespace from user_users;查看当前用户的角色SQLselect * from user_role_privs;查看当前用户的系统权限和表级权限SQLselect * from user_sys_privs;SQLselect * from user_tab_privs;显示当前会话所具有的权限SQLselect * from session_privs;显示指定用户所具有的系统权限SQLselect * from dba_sys_privs where granteeGAME;显示特权用户select * from v$pwfile_users;显示用户信息(所属表空间)select default_tablespace,temporary_tablespace from dba_users where usernameGAME;显示用户的PROFILEselect profile from dba_users where usernameGAME;2、表查看用户下所有的表SQLselect * from user_tables;查看名称包含log字符的表SQLselect object_name,object_id from user_objectswhere instr(object_name,LOG)0;查看某表的创建时间SQLselect object_name,created from user_objects where object_nameupper(table_name);查看某表的大小SQLselect sum(bytes)/(1024*1024) as size(M) from user_segmentswhere segment_nameupper(table_name);查看放在Oracle的内存区里的表SQLselect table_name,cache from user_tables where instr(cache,Y)0;3、索引查看索引个数和类别SQLselect index_name,index_type,table_name from user_indexes order by table_name;查看索引被索引的字段SQLselect * from user_ind_columns where index_nameupper(index_name);查看索引的大小SQLselect sum(bytes)/(1024*1024) as size(M) from user_segmentswhere segment_nameupper(index_name);4、序列号查看序列号last_number是当前值SQLselect * from user_sequences;5、视图查看视图的名称SQLselect view_name from user_views;查看创建视图的select语句SQLset view_name,text_length from user_views;SQLset long 2000; 说明可以根据视图的text_length值设定set long 的大小SQLselect text from user_views where view_nameupper(view_name);6、同义词查看同义词的名称SQLselect * from user_synonyms;7、约束条件查看某表的约束条件SQLselect constraint_name, constraint_type,search_condition, r_constraint_namefrom user_constraints where table_name upper(table_name);SQLselect c.constraint_name,c.constraint_type,cc.column_namefrom user_constraints c,user_cons_columns ccwhere c.owner upper(table_owner) and c.table_name upper(table_name)and c.owner cc.owner and c.constraint_name cc.constraint_nameorder by cc.position;8、存储函数和过程查看函数和过程的状态SQLselect object_name,status from user_objects where object_typeFUNCTION;SQLselect object_name,status from user_objects where object_typePROCEDURE;查看函数和过程的源代码SQLselect text from all_source where owneruser and nameupper(plsql_name);