一、 ORACLE客户端安装
1. 安装路径设置
instantclient_11_2整个文件夹复制到要安装的路径下如D:\Program Files\Oracle\,接着设置系统环境变量
2. 系统环境变量设置
1)右击桌面“计算机”选择“属性”,进入控制面板
2)控制面板,点击高级系统设置,进入系统属性界面
3)系统属性界面,高级页签,点击环境变量
4)环境变量中新建系统变量
变量名:NLS_LANG
变量值:AMERICAN_AMERICA.ZHS16GBK
变量名:ORACLE_HOME
变量值:D:\Program Files\Oracle\instantclient_11_2\
变量名:TNS_ADMIN
变量值:D:\Program Files\Oracle\instantclient_11_2\network\admin\
二、PL/SQL的安装与配置
1. 安装PL/SQL
点击plsqldev1102.exe安装pl/sql
2. 破解PL/SQL
点击‘help’里面的‘register’,输入以下文件里的注册信息,完成注册
PLSQL注册信息
Product Code:4t46t6vydkvsxekkvf3fjnpzy5wbuhphqz
serial Number:601769
password:xs374ca
3. 设置oracle home 和ocilibary
打开pl\sql,点击cancel进入
点击工具栏tools->preferences,设置oracle home 和ocilibary
oracle home:
D:\Program Files\Oracle\instantclient_11_2
Ocilibary:
D:\Program Files\Oracle\instantclient_11_2\oci.dll
4. 保存登录记录的设置
5. 保存页面布局
关闭不需要的窗口,点击window>save Layout
6. 修改tnsnames
D:\Program Files\Oracle\instantclient_11_2\network\admin\tnsnames.ora(注意,不要直接复制黏贴,有可能会有格式问题导致读取失败)
# Sample:
#DatabaseName =
# (DESCRIPTION =
# (ADDRESS_LIST =
# (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
# )
# (CONNECT_DATA =
# (SERVER = DEDICATED)
# (SERVICE_NAME = ServiceName)
# (INSTANCE_NAME = InstanceName)
# )
# )
# Modify the following content to fit your own needs.
ORCL_175 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.175)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
QS_166DB1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 112.124.18.166)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = db1)
)
)
7. 连接数据库
点击钥匙图标
输入用户名密码,登录
Username:adm_sale
Password:adm_sale