Created
April 30, 2012 15:11
-
-
Save ghsyeung/2559116 to your computer and use it in GitHub Desktop.
Oracle useful commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select default_tablespace, temporary_tablespace | |
from dba_users | |
where username = 'g' | |
select sum(bytes) from dba_segments where owner='g' | |
select * from dba_segments where owner='g' | |
select * from dba_segments where owner='g' | |
select * from dba_free_space where tablespace_name = 'USERS' order by bytes desc | |
ALTER TABLESPACE USERS ADD DATAFILE '/oracle/product/11.1.0/oradata/ORA11G/users02.dbf' SIZE 5242880 AUTOEXTEND ON NEXT 268435456 MAXSIZE 65535M | |
ALTER DATABASE DATAFILE '/oracle/product/11.1.0/oradata/ORA11G/users02.dbf' RESIZE 68719443968 | |
select tablespace_name, block_size from dba_tablespaces | |
select * from v$version | |
where banner like 'Oracle%' | |
select * from dba_tablespaces | |
select * from v$datafile | |
CREATE USER g IDENTIFIED BY g | |
GRANT CONNECT, DBA TO g |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment