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 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~