Oracle Database frequently used operation commands recently encountered a server that uses Oracle databases. After learning Oracle +, I finally got all the user passwords on the website background management interface, I found that Oracle operations were really too troublesome. In order to avoid detours in the future, I sorted out the necessary commands during the intrusion. All rights reserved for the whole week. For reprinted instructions, please indicate the author.
1. Su-Oracle is not required. It is suitable for use without a DBA password. You do not need a password to enter the sqlplus interface.
2. sqlplus/nolog, sqlplus system/manager, or./sqlplus system/manager @ ora9i;
3. SQL> connect/As sysdba; (as sysoper) or
Connect internal/Oracle AS sysdba; (Scott/TIGER)
Conn sys/change_on_install as sysdba;
4. SQL> startup; start the database instance
5. view all current databases: Select * from V $ database;
Select name from V $ database;
Desc v $ databases; view database structure Fields
7. How to check which users have sysdba and sysoper permissions:
SQL> select * from V _ $ pwfile_users;
Show user; view the current database connection user
8. Enter the Test Database: Database test;
9. View All database instances: Select * from V $ instance;
For example, ora9i
10. view all data tables of the current database:
SQL> select table_name from all_tables;
Select * From all_tables;
SQL> select table_name from all_tables where table_name like 'U ';
Table_name ---------------Default_auditing_options
11. view the table structure: DESC all_tables;
12. display the structure of all fields of CQI. t_bbs_xuser:
Desc CQI. t_bbs_xuser;
13. Obtain records in the CQI. t_bbs_xuser table:
Select * From CQI. t_bbs_xuser;
14. Add database users: (test11/test)
Create user test11 identified by test default tablespace users temporary tablespace temp;
15. user authorization:
Grant connect, resource, DBA to test11;
Grant sysdba to test11;
Commit;
16. change the password of the Database User: (change the password of SYS and system to test .)
Alter user SYS indentified by test;
Alter user system indentified by test;
Http://news.csdn.net/n/20061127/98323.html