下载PL/SQL Developer - Registered Download,这里选择当前最新版12.0.7x64位plsqldev1207x64.msi
双击plsqldev1207x64.msi进行安装,注册码参见PLSQL Developer 12.0.7 64位 注册码,设置如下:
product code: 4vkjwhfeh3ufnqnmpr9brvcuyujrx3n3le
serial Number:226959
password: xs374ca
PL/SQL Developer使用配合Oracle Instant Client
下载Oracle Instant Client,这里选择Instant Client for Microsoft Windows (x64),版本Version 12.2.0.1.0
,选择instantclient-basic-windows.x64-12.2.0.1.0.zip
Version 12.2.0.1.0
的Oracle数据库安装可参见Linux命令行安装Oracle12c
将下载的instantclient-basic-windows.x64-12.2.0.1.0.zip解压到和PL/SQL Developer安装的同级目录下(也可以是别的目录,看个人需要)
①打开PLSQL Developer,登录界面如下,点击Cancel取消按钮
②点击菜单栏右上角按钮,或选择Configure-Preferences
③打开的Preferences窗口中,配置Oracle Home路径为Oracle Instant Client解压安装路径
OCI library为Oracle Instant Client解压安装路径下的oci.dll文件
点击Apply
-点击OK
,使配置生效
④关闭PLSQL Developer,重新打开,多出了Connect as选项
PLSQL Developer的登录界面没有数据库的初始化内容
在Oracle Instant Client解压安装目录下\NETWORK\ADMIN
新建tnsnames.ora
文件,instantclient_12_2下没有NETWORK\ADMIN
目录,也要新建
tnsnames.ora
内容如下:
cdb1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Oracle服务IP)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = cdb1)
)
)
Oracle服务IP
替换为Oracle的IP地址,配置完成后,关闭PLSQL Developer,重新启动
启动PLSQL Developer后出现的登录界面如下
这时如果不知道用哪个用户名登录,可以使用命令行语句查看oracle所有的用户,以及该用户的状态
select username,account_status from dba_users;
[oracle@solang ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon May 28 15:28:45 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> col username for a25
SQL> col account_status for a25
SQL> select username,account_status from dba_users;
USERNAME ACCOUNT_STATUS
------------------------- -------------------------
SYS OPEN
SYSTEM OPEN
XS$NULL EXPIRED & LOCKED
OJVMSYS EXPIRED & LOCKED
LBACSYS EXPIRED & LOCKED
OUTLN EXPIRED & LOCKED
SYS$UMF EXPIRED & LOCKED
DBSNMP EXPIRED & LOCKED
APPQOSSYS EXPIRED & LOCKED
DBSFWUSER EXPIRED & LOCKED
GGSYS EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------- -------------------------
ANONYMOUS EXPIRED & LOCKED
CTXSYS EXPIRED & LOCKED
SI_INFORMTN_SCHEMA EXPIRED & LOCKED
DVSYS EXPIRED & LOCKED
DVF EXPIRED & LOCKED
GSMADMIN_INTERNAL EXPIRED & LOCKED
ORDPLUGINS EXPIRED & LOCKED
MDSYS EXPIRED & LOCKED
OLAPSYS EXPIRED & LOCKED
ORDDATA EXPIRED & LOCKED
XDB EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------- -------------------------
WMSYS EXPIRED & LOCKED
ORDSYS EXPIRED & LOCKED
GSMCATUSER EXPIRED & LOCKED
MDDATA EXPIRED & LOCKED
SYSBACKUP EXPIRED & LOCKED
REMOTE_SCHEDULER_AGENT EXPIRED & LOCKED
GSMUSER EXPIRED & LOCKED
SYSRAC EXPIRED & LOCKED
AUDSYS EXPIRED & LOCKED
DIP EXPIRED & LOCKED
USERNAME ACCOUNT_STATUS
------------------------- -------------------------
SYSKM EXPIRED & LOCKED
ORACLE_OCM EXPIRED & LOCKED
SYSDG EXPIRED & LOCKED
SPATIAL_CSW_ADMIN_USR EXPIRED & LOCKED
36 rows selected.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
用户状态为OPEN的用户为SYS
和SYSTEM
,其中SYS
为超级管理员用户
用户SYS
和SYSTEM
的密码为数据库创建时的密码
忘记密码可进行修改
[oracle@solang ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon May 28 15:28:45 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> alter user you_username identified by you_password;
例alter user system identified by OraPasswd1;
system用户输入用户名和密码,数据库为cdb1,Normal方式连接
sys用户输入用户名和密码,数据库为cdb1,SYSDBA或SYSOPER方式连接
点击菜单栏右上角按钮,或选择Configure-Preferences,左侧找到SQL Window
,右侧找到Show gutter(line numbers)
并勾选,Apply
然后点击OK
。
①查看数据库字符集
select userenv('language') from dual;
字符集为AMERICAN_AMERICA.AL32UTF8
②查看本地字符集
select * from V$NLS_PARAMETERS;
发现第一行和第九行是相对应的,AMERICAN_AMERICA.AL32UTF8
③新建系统环境变量NLS_LANG
变量值和数据库的字符集相同,若已存在系统变量NLS_LANG
,则更新变量值
不新建到系统变量里,新建到上面的用户变量里也能正常使用。
最近登录过的用户记录会在打开PL/SQL Developer中显示
打开Preferences窗口,选择Logon History
,删除不常使用到的用户
将下载安装的PL/SQL Developer汉化成中文。
下载PLSQL Developer 12中文汉化包Chinese.lang或PLSQL Developer 12中文语言包
将Chinese.lang中文语言包放入到PLSQL Developer安装目录下
打开PL/SQL Developer,选择Preferences-Appearance-Language,选择Chinese.lang中文汉化包,点击Apply
显示为中文
本文参考:
PL/SQL Developer连接到Oracle 12c
PLSQL Developer 12.0.7 64位 注册码
plsql中文乱码问题(显示问号)