PL/Sql 连接数据库

2017-01-05 11:09:07来源:oschina作者:小南风人点击


默认密码: scott/tiger

我设置的 : system /123456


自动登入

方式1 : plsqldev.exe userid=junhe/123456@ORCL_LAN


方式2:



方法1:start.bat的方式启动

@echo off set path=D:/7-oracle-client/instantclient_10_2 set ORACLE_HOME=D:/7-oracle-client/instantclient_10_2 set TNS_ADMIN=D:/7-oracle-client/instantclient_10_2 set NLS_LANG=AMERICAN_AMERICA.AL32UTF8 start plsqldev.exe


@echo off set path=D:/7-oracle-client/instantclient_10_2 set ORACLE_HOME=%path% set TNS_ADMIN=%path% set NLS_LANG=AMERICAN_AMERICA.AL32UTF8 start plsqldev.exe


说明:

TNS_ADMIN 是指 tnsnames.ora的位置
NLS_LANG 设置编码:
ORACLE_HOME oracle 的oci.dll的位置


方法 :2
1.链接文件



ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.244.138)(PORT = 1521))
//删除注意:192.168.244.138 虚拟机地址

ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.244.138)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
)
)
//删除注意:192.168.244.138 虚拟机地址
Draw68 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.68)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = DRAWDB)
)
)

2.plsql 软件设置的工作目录


最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台