Common commands for Oracle databases under Linux

Source: Internet
Author: User

Reprinted from: http://blog.csdn.net/mal327/article/details/6458907

Performed by Oracle User:

$ sqlplus system/manager @ file.sql Execute SQL script file

$ sqlplus System/manager Login sqlplus, using the system user

$ sqlplus/nolog starts Sqlplus in a way that does not connect to the database, and uses the data when it starts

$ lsnrctl status/stop/start Oracle Listener Listener Status View/stop/start

$ imp system/manager file=/tmp/expfile.dmp log=/tmp/implogfile.log ignore=y fromuser=expuser touser=impuser user-mode table data import, I only use a few parameters here, there are a lot of unused parameters, if not specifically specified value, the default value is used.

$ exp Username/password file=/tmp/expfile.dmp log=/tmp/prov114_exp.log user mode table data export, this is the simplest way to export, there are a lot of parameters are not written out.

Sqlplus under Execution:

sql> conn/as sysdba sysdba user mode connection

Sql> Startup Database

Sql> shutdown immediate immediately close the database

sql> desc dba_users; Querying the Dba_users table structure

Sql> select username from dba_users; Querying the username of all users under the current SID

Sql> Select COUNT (*) from Username.tablename; Query the number of rows in a tablename table

Sql> drop user username cascade; To remove an Oracle user named username

Sql> SELECT DISTINCT table_name from User_tab_columns; View all table names in the current user mode ~~~~~~ think of this today, first write this, hehe ~ ~ ~

Common Database Operations Tool: SQL Explorer Eclipse Plug-in tool, you can also download a separate package to run, free and convenient and practical. Temporarily in use this, other long time useless, also do not know what version, hehe ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Oracle database Common commands (GO) under Linux

Related Article

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.