日期:2014-05-16 浏览次数:20528 次
CREATE TABLESPACE "MYDATE" DATAFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\MYDATE' SIZE 1500M AUTOEXTEND ON NEXT 200M MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
-- Create the user highill create user highill identified by highill default tablespace MYDATA temporary tablespace TEMP profile DEFAULT; -- Grant/Revoke role privileges grant connect to highill; grant dba to highill; grant resource to highill; -- Grant/Revoke system privileges grant unlimited tablespace to highill with admin option;
ALTER DATABASE DATAFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\MYDATA' RESIZE 32000M
cmd > exp highill/highill@ORCL file=d:/highill_2012.dmp
cmd > imp highill/highill@ORCL file=d:/highill_2012.dmp full=y
imp highill/highill@ORCL file=d:/highill_2012.dmp tables=(MYTABLE)
SELECT USERNAME, DEFAULT_TABLESPACE FROM USER_USERS;
SELECT * FROM USER_ROLE_PRIVS;
SELECT * FROM USER_SYS_PRIVS; SELECT * FROM USER_TAB_PRIVS;
SELECT * FROM SESSION_PRIVS;-----显示指定用户所具有的系统权限
SELECT * FROM DBA_SYS_PRIVS WHERE GRANTEE = 'CSG_CEB_TRUST';
SELECT * FROM USER_TABLES; SELECT * FROM ALL_TABLES;
SELECT OBJECT_NAME, OBJECT_ID FROM USER_OBJECTS WHERE INSTR(OBJECT_NAME, 'LOG') > 0;
SELECT USER_OBJECTS.* FROM USER_OBJECTS WHERE OBJECT_NAME IN (SELECT USER_TABLES.TABLE_NAME FROM USER_TABLES);
SELECT SUM(BYTES) / (1024 * 1024) AS "size(M)" FROM USER_SEGMENTS WHERE SEGMENT_NAME = 'MYTABLE';
SELECT USER_TABLES.TABLE_NAME, SUM(BYTES) / (1024 * 1024) AS "size(M)" FROM USER_TABLES, USER_SEGMENTS WHERE USER_SEGMENTS.SEGMENT_NAME = USER_TABLES.TABLE_NAME GROUP BY USER_TABLES.TABLE_NAME;
SELECT TABLE_NAME, CACHE FROM USER_TABLES WHERE INSTR(CACHE, 'Y') > 0;
SELECT * FROM USER_INDEXES ORDER BY TABLE_NAME;
SELECT * FROM USER_IND_COLUMNS WHERE INDEX_NAME IN (SELECT USER_INDEXES.INDEX_NAME FROM USER_INDEXES);
SELECT USER_INDEXES.INDEX_NAME, SUM(BYTES) / (1024 * 1024) AS "size(M)" FROM USER_SEGMENTS, USER_INDEXES WHERE USER_SEGMENTS.SEGMENT_NAME = USER_INDEXES.INDEX_NAME GROUP BY USER_INDEXES.INDEX_NAME;
SELECT * FROM USER_SEQUENCES;