Commands commonly used when invading an Oracle database

Source: Internet
Author: User

Recently encountered a server using the Oracle database, in the Mad learning oracle+ to consult a master after finally got the site management interface of all user passwords, I found that Oracle operation is too troublesome, for the sake of the brothers after a few detours, I put the necessary commands in the invasion to sort out, One weeks of painstaking efforts, copyright, reproduced please specify the author.

1, Su–oracle is not required, suitable for no DBA password when used, can not use the password to enter the Sqlplus interface.

2, Sqlplus/nolog or Sqlplus system/manager or./sqlplus system/[email protected];

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 a DB 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 see which users have Sysdba, Sysoper permissions:

Sql>select * from V_$pwfile_users;

Show user; View current database connection users

8. Enter test database: DB test;

9. View all DB instances: SELECT * from V$instance;

such as: ora9i

10. View all data tables for the current library:

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 table structure: desc all_tables;

12. Display all field structures of Cqi.t_bbs_xuser:

Desc CQI. T_bbs_xuser;

13. Get the records in the Cqi.t_bbs_xuser table:

SELECT * from CQI. T_bbs_xuser;

14. Increase 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

For more information, please contact Ding Feng Hu Jiashong
qq.2881064155
skype.live:2881064155

Commands commonly used when invading an Oracle database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.