首页 > 数据库 > Oracle > 通过SQL*Plus远程启动Oracle数据库实例
|
--1. 在服务器端配置一个静态监听程序 LISTENER0 = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = S1011.cuug.net)(PORT = 1522)) ) ) )
SID_LIST_LISTENER0 = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = TestDB11.cuug.net) (SID_NAME = TestDB11) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1) ) )
--2. 启动静态监听程序LISTENER0 [oracle@S1011:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin]$ lsnrctl start LISTENER0
LSNRCTL for Solaris: Version 11.2.0.3.0 - Production on 01-MAR-2014 16:53:41
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Solaris: Version 11.2.0.3.0 - Production System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=S1011.cuug.net)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=S1011.cuug.net)(PORT=1522))) STATUS of the LISTENER ------------------------ Alias LISTENER0 Version TNSLSNR for Solaris: Version 11.2.0.3.0 - Production Start Date 01-MAR-2014 16:53:42 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=S1011.cuug.net)(PORT=1522))) Services Summary... Service "TestDB11.cuug.net" has 1 instance(s). Instance "TestDB11", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
--3. 配置客户端的tnsnames.ora,添加如下内容
TESTDB11_STA_LSN = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = S1011.cuug.net)(PORT = 1522)) ) (CONNECT_DATA = (SERVICE_NAME = TestDB11.cuug.net) ) )
-- 从客户端远程启动Oracle实例 C:\Users\Administrator>sqlplus sys/sys@testdb11_sta_lsn as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期六 3月 1 18:02:29 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
已连接到空闲例程。
SQL> startup ORACLE 例程已经启动。
Total System Global Area 855982080 bytes Fixed Size 2230792 bytes Variable Size 641730040 bytes Database Buffers 209715200 bytes Redo Buffers 2306048 bytes 数据库装载完毕。 数据库已经打开。 |
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/17013648/viewspace-1150218/ ,如需转载,请注明出处,否则将追究法律责任。