安装过程很顺利,但是使用PLSQL登录就发现出现很多问题,对于ora-12514 度娘上面很多解决方法不能解决问题,特把自己安装及处理方法写一遍,觉得有用可以参考,无用勿喷。。。。
1.oracle12C 下载
下载路径http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
文件:winx64_12102_database_1of2.zip和winx64_12102_database_2of2.zip 统一解压到一个文件夹中,然后直接安装即可
2. oracle 客户端下载
下载路径http://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html
文件:instantclient-basic-nt-12.2.0.1.0.zip ;解压到oracle 安装路径,比如:D:\app\welcome\product\12.1.0\dbhome_1
文件夹下面即可
3.tns等文件配置,路径:D:\app\welcome\product\12.1.0\dbhome_1\NETWORK\ADMIN,清参考自己安装路径
1)listener.ora 配置
# listener.ora Network Configuration File: D:\app\welcome\product\12.1.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\welcome\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\welcome\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME = D:\app\welcome\product\12.1.0\dbhome_1)
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-SDJVOB3L)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
2)sqlnet.ora 配置
# sqlnet.ora Network Configuration File: D:\app\welcome\product\12.1.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
3)tnsnames.ora 配置
#tnsnames.ora Network Configuration File: D:\app\welcome\product\12.1.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LAPTOP-SDJVOB3L)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
----------------------------------host 指计算机名称或IP地址---------------------
4.配置环境变量
变量名:ORACLE_HOME
值:D:\app\welcome\product\12.1.0\dbhome_1
针对可能出现中文乱码配置,保持与数据库或注册表一致即可
变量名:NLS_LANG
值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK
5.PL/SQL安装,安装过程省略,登录页面如下:
点击取消进入操作窗口,PLSQL配置(工具-首选项-连接),如下图所示:
第4步 主目录配置
oracle服务端安装路径,比如:D:\app\welcome\product\12.1.0\dbhome_1
第5步 客户端安装路径对应的oci.dll,注意不是服务端oci.dll,默认是服务端,需要改成客户端的oci.dll
比如:D:\app\welcome\product\12.1.0\instantclient_12_2\oci.dll
配置后页面如下图:
6 配置完成,重启监听服务,点击我的电脑>管理>服务;找到oracle 监听重启即可,登录PL/SQL ,如下图所示:
与之前比较多了个连接为,说明配置成功。