Oracle: Turn on monitoring
--lsnrctl start
Oracle: Start/Close Database
--sqlplus/nolog
--conn/as SYSDBA
--startup (Open)
--shutdown (OFF)
Oracle: Create a table space
1. Create a temporary table space
--create temporary tablespace XXX (name) tempfile ' xxxx.dbf (save file path) ' size 50m autoextend on next 50m maxsize 20480m extent Management local;
2. Create a data table space
--create tablespace XXX (name) logging datafile ' xxxx.dbf (save file path) ' size 50m autoextend on next 50m maxsize 20480m extent MA Nagement Local;
3. Create a user and specify a tablespace
--create User XXX (username) identified by XXX (password) default tablespace xxx (tablespace name) temporary tablespace xxx (temporary space name);
4. User authorization limit
--grant connect,resource,dba to XXX (username);
Oracle: View table space name, path, physical space size
--select Tablespace_name, file_id, file_name, round (bytes/(1024*1024), 0) Total_space from Dba_data_files ORDER by Tablespace_name;
Oracle: Modify Table Space size
--alter database DataFile ' xxx.dbf (save file path) ' Resize 1000M
Oracle: Delete Table space
--drop tablespace XXX (table space name)
Oracle: Deleting users
--drop User XXX (username) cascade; (Cascade Delete User--maybe the user created the object?)
Oracle: Database Backup and restore
First, backup
1. Fully export the database test, user Name System Password Manager exported to D:\daochu.dmp
--exp System/[email protected] file=d:\daochu.dmp full=y
2. Export the system user in the database and the SYS user's table
--exp System/[email protected] file=d:\daochu.dmp owner= (System,sys)
3. Export the tables in the database table1, table2
--exp System/[email protected] file=d:\daochu.dmp tables= (table1,table2)
4. Export the field filed1 in table table1 in the database with data beginning with "00"
--exp System/[email protected] file=d:\daochu.dmp tables= (table1) query=\ "where filed1 like ' 0% ' \"
Second, restore
1. Import the data from the D:\DAOCHU.DMP into the test database
--imp System/[email protected] file=d:\daochu.dmp full=y ignore=y
2. Import the table table1 in D:\daochu.dmp
--imp System/[email protected] file=d:\daochu.dmp tables= (table1)
oracle--Common Commands