目录
- 66.1. SQL*Plus
-
- 66.1.1. conn
- 66.1.2. startup/shutdown
-
- 66.1.2.1. startup
- 66.1.2.2. shutdown
- 66.1.3. $ORACLE_HOME/sqlplus/admin/glogin.sql
- 66.1.4. @运行SQL
- 66.1.5. 链接数据库
- 66.2. exp/imp
-
- 66.2.1. exp
- 66.2.2. imp
-
- 66.2.2.1. A用户导出B用户导入
- 66.3. expdp/impdp
-
- 66.3.1. expdp
- 66.3.2. impdp
- 66.3.3. 数据泵演示
- 66.3.4. 查看dmp文件的表空间
- 66.4. RMAN
-
- 66.4.1. 数据库模式
- 66.4.2. 完全备份
- 66.4.3. 增量备份
- 66.4.4. 恢复数据库
- 66.4.5. 是用tar打包rman文件
- 66.4.6. 打包 rman 备份文件
66.1. SQL*Plus
sqlplus /nolog
[oracle@wcs ~]$ sqlplus /nolog SQL*Plus: Release 11.2.0.1.0 Production on Sat May 28 18:19:53 2011 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn / as sysdba; Connected to an idle instance. SQL> exit
sqlplus / as sysdba
[oracle@wcs ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Sat May 28 18:31:25 2011 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL>
66.1.1. conn
SQL>conn system/manger@orcl as sysdba
conn sys/sys@ip:1521/orainstance as sysdba
66.1.2. startup/shutdown
[oracle@localhost ~]$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jan 5 09:44:13 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter user-name: sys as sysdba Enter password:
SQL> conn / as sysdba;
66.1.2.1. startup
SYS@orcl> startup
66.1.2.2. shutdown
SYS@orcl> shutdown immediate
66.1.3. $ORACLE_HOME/sqlplus/admin/glogin.sql
set line 2000 set linesize 2000 set pagesize 100 col ename format a30 col sal format 999,999.999 alter session set nls_date_format = 'yyyy-mm-dd hh24:mi:ss';
66.1.4. @运行SQL
SQL> @ /home/oracle/your.sql
set pagesize 0 set linesize 80 set term off set feed off set echo off set show off set veri off set head off spool outputfile select * from dba_users; / spool off
66.1.5. 链接数据库
Example: Connect to database using Net Service Name and the database net service name is ORCL.
sqlplus myusername/mypassword@ORCL
sqlplus "user/password@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.4.9)(Port=1521))(CONNECT_DATA=(SERVER = DEDICATED)(SERVICE_NAME = orcl.example.com)))"
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。