Common operations and commands for Oracle databases under Linux

Source: Internet
Author: User
Tags sqlplus

This article is from the "Happy F" blog, please be sure to keep this source http://gaoxingf.blog.51cto.com/612518/121138

Common commands for Oracle databases under Linux

Executed under Oracle users:

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

$ sqlplus System/manager Login sqlplus, using System user

$ sqlplus/nolog Starts the sqlplus in a way that does not connect to the database, which is used when starting the data

$ 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, Here I only use a few parameters, there are a lot of unused parameters, if there is no specific value, use the default value.

$ 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 many parameters are not written out.

Sqlplus under Execution:

sql> conn/as sysdba sysdba user mode connection

Sql> Startup Database

sql> shutdown immediate shut down the database immediately

sql> desc dba_users; Query Dba_users table structure

Sql> select username from dba_users; Query username for 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 delete an Oracle user named username

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

Common Database Operations tools: SQL Explorer Eclipse plug-in tools, can also download a separate package to run, free and convenient and practical. Temporarily in the use of this, other long time no use, also do not know what version, hehe ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

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.