C/C++教程

ORACLE 切换个实例,启动多个实例

本文主要是介绍ORACLE 切换个实例,启动多个实例,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
//切换用户
[root@CentosDB ~]# su - oracle
上一次登录:五 7月 16 10:05:08 CST 2021pts/0 上
//切换实例
[oracle@CentosDB ~]$ export ORACLE_SID=orcl
[oracle@CentosDB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 16 11:33:44 2021

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      orcl
db_unique_name                       string      orcl
global_names                         boolean     FALSE
instance_name                        string      orcl
lock_name_space                      string
log_file_name_convert                string
service_names                        string      orcl
SQL>
//切换到另一个实例
[oracle@CentosDB ~]$ export ORACLE_SID=orcl
[oracle@CentosDB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 16 11:33:44 2021

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> show parameter name
SP2-0640: Not connected
SQL> conn / as sysdba
Connected.
SQL> show parameter name

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert                 string
db_name                              string      orcl
db_unique_name                       string      orcl
global_names                         boolean     FALSE
instance_name                        string      orcl
lock_name_space                      string
log_file_name_convert                string
service_names                        string      orcl
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@CentosDB ~]$ clear
[oracle@CentosDB ~]$ export ORACLE_SID=zsny
[oracle@CentosDB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 16 11:38:12 2021

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> show parameter name
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

//启动另一个实例
SQL> startup
ORACLE instance started.

Total System Global Area 1302769664 bytes
Fixed Size                  2213056 bytes
Variable Size             805309248 bytes
Database Buffers          486539264 bytes
Redo Buffers                8708096 bytes
Database mounted.
Database opened.
SQL>

这篇关于ORACLE 切换个实例,启动多个实例的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!