修改oracle数据库文件

休闲思考
0 513

注:也可以用plsql连接远程数据库(只要有oracle的

network\admin\tnsnames.ora

就行)。

product\11.2.0\dbhome_1\NETWORK\ADMIN\

listener.ora

文件内容,添加一个SID_DESC:

 listener.ora Network Configuration File: D:\app\shuhao\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
  
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\shuhao\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\shuhao\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
#下面的SID_DESC是新增加的内容,注意修改ORACLE_HOME路径
    (SID_DESC =
      (SID_NAME = orcl)
      (ORACLE_HOME = D:\app\shuhao\product\11.2.0\dbhome_1)
      (GLOBAL_DBNAME = orcl)
    )
  )
  
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )
  
ADR_BASE_LISTENER = D:\app\shuhao

修改oracle数据库文件

product\11.2.0\dbhome_1\NETWORK\ADMIN\

tnsnames.ora

文件内容,源文件没有做改动:

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )
  
LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  
ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )