ORACLE创建实例是我们最常用的操作之一,下面就为您详细介绍ORACLE创建实例的全过程,希望对您能够有所帮助。
一、ORACLE创建实例过程:
1、安装好ORACLE服务端。
2、ORACLE创建实例,使用ORAHOME目录下的"Configuration and Migration Tools"下的"Database Configuration Assistant"工具。
3、步骤2:选择"创建数据库"。
4、步骤3:选择数据库模板。
5、步骤4:选择"专用服务器模式"。
6、步骤5:设置初始化参数。
7、其它默认,点击"完成"。
创建一个数据库实例,在系统服务里会增加一个服务,名为:"OracleServer"+所创建的数据库实例的SID,该服务需要启动。
二、接着需要配置监听文件,如果没有的话,在OEM中"将数据库添加到数",打开,输入SYSTEM/PASSWORD,会提示没有监听器的。
监听文件路径:ORAHOME/ora92/network/admin/listener.ora
另外监听器日志文件路径是:ORAHOME/ora92/network/log/listener.log
用编辑器打开listener.ora文件,修改设置信息。例如(下面是一个完成的文件内容):
# listener.ora Network Configuration File: d:\oracle\product\10.2.0\db_2\network\admin\listener.ora
# Generated by Oracle configuration tools.
LISTENERJDWORACLE =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.12.104)(PORT = 1522))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_2)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_2)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = jdworcl)
(ORACLE_HOME = D:\oracle\product\10.1.0\db_2)
(SID_NAME = jdworcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.12.104)(PORT = 1522))
)
)
)
重启监听服务,配置本地NET服务名,测试连接。
一个tnsnames.ora例子如下:
# tnsnames.ora Network Configuration File: d:\oracle\product\10.2.0\db_2\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
JDWORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.12.104)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = jdworcl)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
转载于:https://blog.51cto.com/3449639/665138