Oracle客户端安装步骤:
-
-
配置tnsnames
- 配置环境变量
- 我的电脑 - 属性 - 高级 - 环境变量 - 系统变量
- 新建 Path = C:\app\Administrator\product\11.2.0\client_1
- 新建TNS_ADMIN = C:\app\Administrator\product\11.2.0\client_1\network\admin
- 新建NLS_LANG = SIMPLIFIED CHINESE_CHINA.ZHS16GBK
- 安装、配置PL/sql
C:\app\Administrator\product\11.2.0
C:\app\Administrator\product\11.2.0\client_1\oci.dll
- 重启PL/sql
需要使用拥有dba权限的用户登录PLsql,打开Command Window窗口,然后创建表空间及在该表空间下创建用户;
命令:
--创建表空间
sql> Create tablespace JYTTableSpace
2 logging
3 datafile ‘C:\DB\JYTTest\JYTTableSpace.dbf‘
4 size 50m
5 autoextend on
6 next 50m
7 extent management local;
Tablespace created
--创建表空间用户
sql> Create user JYT_Users identified by 123456 default tablespace JYTTableSpace temporary tablespace temp;
User created
--为用户授权
sql> Grant connect,dba to JYT_Users;
Grant succeeded
不用PL/sql,还可以使用Navicat Premium管理Oracle数据库
配置:
Oracle服务端安装步骤:
按提示安装完成后需要操作 :
l listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
(ORACLE_HOME = C:\app\jyt\product\11.2.0\dbhome_1)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\jyt\product\11.2.0\dbhome_1\BINoraclr11.dll")
)
(SID_DESC =
(SID_NAME = JYTTEST)
(ORACLE_HOME = C:\app\jyt\product\11.2.0\dbhome_1)
(GLOBAL_DBNAME= JYTTEST)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.80)(PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\app\jyt
l sqlnet.ora
sqlNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (TNSNAMES,EZCONNECT)
l tnsnames.ora
JYTTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = WindowsServer2012R2-Image)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = JYTTest)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = WindowsServer2012R2-Image)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)