oracle iSQL*PLUS配置设置图文说明
iSQL*PLUS是从ORACLE 9i开始提供的新功能,是SQL*PLUS的Web形式(ORACLE 11g已经不支持)是基于三层结构设计的,需要的朋友可以了解下
iSQL*PLUS介绍
iSQL*PLUS是从ORACLE 9i开始提供的新功能,是SQL*PLUS的Web形式(ORACLE 11g已经不支持)。是基于三层结构设计的。其client、middle、server可以位于同一台机器上也可以位于不同的机器。iSqlPlus不需要单独安装,通过isqlplus,用户可以不需要安装任何ORACLE客户端,就能够通过浏览器方式的使用SQL*PLUS进行数据操作与数据库管理。普通的数据库用户可以直接通过isqlplus的网址http://ip:port/isqlplus登陆,进入该网址后会直接进入数据库用户登陆界面,使用数据库中的普通用户即可登陆;但如果是DBA用户登陆isqlpus,则需要首先配置iSQL*PLUS DBA的用户和口令,然后输入网址http://ip:port/isqlplus/dba,进入该网址后首先会弹出一个登陆框,要求先输入iSQL*Plus DBA的用户和密码,注意这里不是数据库用户,而是iSQL*PLUS应用服务器要求的用户和密码,然后才能出现iSQL*PLUS登陆界面,此时可以输入sys或者system用户,登陆数据库进行管理。要以DBA身份登陆isqlplus,必须先配置好oc4j用户。采用xml配置文件认证的方式。该配置文件位于$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus/config但是该配置文件中的密码是加密过的,所以我们不能手动修改该文件,而是通过JAZN(Java AuthoriZatioN)来配置。JAZN是ORACLE提供的一个JASS(Java Authentication and Authorization Service)工具.
如何进入JAZN命令环境?
1.进入到目录$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus/下,如下所示:
[oracle@DB-Server isqlplus]$ pwd
/database/product/dbhome_1/oc4j/j2ee/isqlplus/application-deployments/isqlplus
[oracle@DB-Server isqlplus]$ ls
application.log config isqlplus orion-application.xml
2.确保JAVA_HOME环境变量指向了正确的jdk(需要1.4以上)路径,可以使用ORACLE自带的jdk,位于$ORACLE_HOME/jdk
3.执行以下命令
[oracle@DB-Server isqlplus]$ $ORACLE_HOME/jdk/bin/java -Djava.security.properties=$ORACLE_HOME/oc4j/j2ee/home/config/jazn.security.props -jar $ORACLE_HOME/oc4j/j2ee/home/jazn.jar -user "iSQL*Plus DBA/admin" -password welcome -shell
其中realm=iSQL*Plus DBA,user=admin,这些可以从xml配置文件中看到,admin的默认密码是welcome,但是admin用户默认没有webDba权限,不能直接用于登陆isqlplus。通过JAZN,可以完成以下任务
1:新建用户kerry 密码设置为etl123!@#
JAZN:> adduser "iSQL*Plus DBA" kerry etl123!@#
2:列出用户
查看这个组的用户
JAZN:> listusers "iSQL*Plus DBA"
admin
kerry
JAZN:> listusers
iSQL*Plus DBA/admin
iSQL*Plus DBA/kerry
3.授予用户kerry DBA的权限
JAZN:> grantrole webDba "iSQL*Plus DBA" kerry
4.撤销用户kerry DBA的权限
JAZN:> revokerole webDba "iSQL*Plus DBA" kerry
5.查看角色
JAZN:> listroles
iSQL*Plus DBA/webDba
iSQL*Plus DBA/admin
6.删除用户
JAZN:> remuser "iSQL*Plus DBA" kerry
7.修改用户密码
JAZN:> setpasswd "iSQL*Plus DBA" kerry etl123!@# 123456
8.退出JAZN命令环境
JAZN:> exit
上面我们创建了一个用户kerry,密码为etl123!@#,并且已经授予webDba权限。接下来重新启动isqlplus应用服务器isqlplusctl stop、isqlplusctl start
再进入网址http://ip:5560/isqlplus/dba,在弹出的对话框中输入kerry和etl123!@#,就可以进入到数据库登陆界面了,选择以sysdba或sysoper身份登陆了。
启动iSQL*PLUS
如果登录isqlplus页面打不开(报错): http://ip:5560/isqlplus/,首先检查isqlplus服务启动没有,然后检查一下端口
[oracle@DB-Server ~]$ isqlplusctl start
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
getnameinfo failed
getnameinfo failed
Starting iSQL*Plus ...
iSQL*Plus started.
[oracle@DB-Server ~]$ netstat -an | grep 5560
tcp 0 0 0.0.0.0:5560 0.0.0.0:* LISTEN
停止iSQL*PLUS
[oracle@DB-Server ~]$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
getnameinfo failed
getnameinfo failed
iSQL*Plus instance on port 5560 is not running ...
日志信息
iSQL*PLUS使用的是Log4j,如下所示:
[oracle@DB-Server isqlplus]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/isqlplus/isqlplus/WEB-INF/classes
[oracle@DB-Server classes]$ ls
log4j.properties oracle
[oracle@DB-Server classes]$ more log4j.properties
# Log4j configuration file.
# Set root logger level and its only appender to A1.
#log4j.rootLogger=ALL, A1
#log4j.rootLogger=DEBUG, A1
#log4j.rootLogger=INFO, A1
#log4j.rootLogger=WARN, A1
#log4j.rootLogger=ERROR, A1
log4j.rootLogger=FATAL, A1
#log4j.rootLogger=OFF, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} %-5.5p [%t] %-20.20c{2} - %m%n
# R is a rolling log file appender
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=isqlplus.log
log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d{ISO8601} %-5.5p [%t] %-20.20c{2} - %m%n
[oracle@DB-Server classes]$
在ORACLE 10g的$oracle_home/oc4j/j2ee/isqlplus/log目录下,你可以看到如下一些日志:
日志文件位于$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus/application.log
[oracle@DB-Server WEB-INF]$ cd $ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus
[oracle@DB-Server isqlplus]$ ls
application.log config isqlplus orion-application.xml
[oracle@DB-Server isqlplus]$ more application.log
12/04/22 13:31:07 Started
12/04/22 13:31:09 isqlplus: jsp: init
12/04/22 13:31:09 isqlplus: config: init
12/04/22 13:31:09 isqlplus: uix: init
12/04/22 13:31:09 isqlplus: 9.0.4.1.0 Started
12/04/22 14:07:13 isqlplus: config: destroy
12/04/22 14:07:13 isqlplus: 9.0.4.1.0 Stopped
12/04/22 14:07:13 Stopped (JVM termination)
12/09/27 17:23:21 Started
12/09/27 17:23:29 isqlplus: jsp: init
12/09/27 17:23:30 isqlplus: config: init
12/09/27 17:23:31 isqlplus: uix: init
12/09/27 17:23:31 isqlplus: 9.0.4.1.0 Started
帮助的日志记录在:
$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplushelp/application.log
[oracle@DB-Server log]$ ls
global-application.log http-web-access.log rmi.log server.log
[oracle@DB-Server log]$ more rmi.log
12/04/22 13:31:07 9.0.4.1.0 Started
12/04/22 14:07:13 9.0.4.1.0 Stopped (JVM termination)
12/09/27 17:23:19 9.0.4.1.0 Started
12/11/08 17:43:38 9.0.4.1.0 Started
12/11/08 17:54:01 9.0.4.1.0 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost), 2)
12/11/08 17:55:42 9.0.4.1.0 Started
[oracle@DB-Server log]$ more server.log
12/04/22 13:31:07 9.0.4.1.0 Started
12/04/22 13:31:07 9.0.4.1.0 Started
12/04/22 14:07:13 9.0.4.1.0 Stopped (JVM termination)
12/09/27 17:23:19 9.0.4.1.0 Started
12/09/27 17:23:21 9.0.4.1.0 Started
12/11/08 17:43:37 9.0.4.1.0 Started
12/11/08 17:43:38 Forced or abrupt (crash etc) server shutdown detected, starting recovery process...
12/11/08 17:43:38 Recovery completed, 0 connections committed and 0 rolled back...
12/11/08 17:43:38 9.0.4.1.0 Started
12/11/08 17:54:01 9.0.4.1.0 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost), 2)
12/11/08 17:55:42 9.0.4.1.0 Started
12/11/08 17:55:42 9.0.4.1.0 Started
[oracle@DB-Server log]$ more http-web-access.log
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/ HTTP/1.1" 200 9154
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/cabo/styles/cache/blaf-A0-zh_CN-ie-windows.css HTTP/1
.1" 200 13850
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/cabo/images/cache/c-ghss.gif HTTP/1.1" 200 97
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/images/logo.gif HTTP/1.1" 200 7361
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/cabo/images/t.gif HTTP/1.1" 200 85
172.20.61.185 - - [27/Sep/2012:17:24:39 +0800] "GET /isqlplus/images/help.gif HTTP/1.1" 200 288
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/jsLibs/MarlinCoreA4.js HTTP/1.1" 200 26036
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/c-ghsc.gif HTTP/1.1" 200 72
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/c-ghe.gif HTTP/1.1" 200 85
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/c-ghse.gif HTTP/1.1" 200 219
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/c-ghc.gif HTTP/1.1" 200 133
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/zhs/b-login.gif HTTP/1.1" 200 715
172.20.61.185 - - [27/Sep/2012:17:24:40 +0800] "GET /isqlplus/cabo/images/cache/c-skir.gif HTTP/1.1" 200 66
172.20.61.185 - - [27/Sep/2012:17:24:43 +0800] "GET /favicon.ico HTTP/1.1" 404 135
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "POST /isqlplus/login.uix HTTP/1.1" 200 11618
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/t.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/images/logo.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/jsLibs/MarlinCoreA4.js HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/images/logout.gif HTTP/1.1" 200 360
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/styles/cache/blaf-A0-zh_CN-ie-windows.css HTTP/1
.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/cache/c-ghss.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/cache/zhs/tb-56-0.gif HTTP/1.1" 200 971
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/images/help.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/cache/c-ghsc.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/cache/c-ghc.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/images/cache/c-ghse.gif HTTP/1.1" 304 0
172.20.61.185 - - [27/Sep/2012:17:24:52 +0800] "GET /isqlplus/cabo/i
[oracle@DB-Server log]$ more global-application.log
12/04/22 13:31:07 Started
12/04/22 13:31:08 defaultWebApp: jsp: init
12/04/22 13:31:08 defaultWebApp: 9.0.4.1.0 Started
12/04/22 14:07:13 defaultWebApp: 9.0.4.1.0 Stopped
12/04/22 14:07:13 Stopped (JVM termination)
12/09/27 17:23:20 Started
12/09/27 17:23:27 defaultWebApp: jsp: init
12/09/27 17:23:27 defaultWebApp: 9.0.4.1.0 Started
12/11/08 17:43:38 Started
12/11/08 17:43:39 defaultWebApp: jsp: init
12/11/08 17:43:39 defaultWebApp: 9.0.4.1.0 Started
12/11/08 17:54:01 defaultWebApp: 9.0.4.1.0 Stopped
12/11/08 17:54:01 Stopped (Shutdown executed by jazn.com/admin from 127.0.0.1 (localhost), 2)
12/11/08 17:55:42 Started
12/11/08 17:55:43 defaultWebApp: jsp: init
12/11/08 17:55:43 defaultWebApp: 9.0.4.1.0 Started
配置问题
1:变更session的有效期:
在$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/isqlplus/isqlplus/WEB-INF下的web.xml文件中。
设置:
为分钟状态。
2:限制登录
[oracle@DB-Server WEB-INF]$ vi web.xml
, separated by a semicolon (;). If there are no entries, database access is not restricted through iSQL*Plus.
其中的
如果
3:修改iSQL*PLUS端口
转到$ORACLE_HOME/oc4j/j2ee/isqlplus/config下,编辑http-web-site.xml文件
问题锦集
1:中文环境,按钮字体出现乱码。可以选址语言。切换到英文环境即可看到按钮的字体
解决办法:
[oracle@DB-Server zhs]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@DB-Server lib]$ ls
audio font.properties.ja.Redhat6.2 font.properties.zh_CN.Redhat2.1 images
charsets.jar font.properties.ja.Redhat7.2 font.properties.zh_CN.Sun jce.jar
cmm font.properties.ja.Redhat7.3 font.properties.zh_CN_UTF8.Sun jsse.jar
content-types.properties font.properties.ja.Redhat8.0 font.properties.zh_HK.Sun jvm.hprof.txt
ext font.properties.ja.Turbo font.properties.zh_HK_UTF8.Sun jvm.jcov.txt
flavormap.properties font.properties.ja.Turbo6.0 font.properties.zh_HK_UTF8.Sun2003 locale
font.properties font.properties.ko_KR.Sun font.properties.zh.Turbo logging.properties
font.properties_back font.properties.ko_KR_UTF8.Sun font.properties.zh_TW.Redhat plugin.jar
font.properties.ja font.properties.ko_KR_UTF8.Sun2003 font.properties.zh_TW.Redhat2.1 psfontj2d.properties
font.properties.ja_JP.Sun font.properties.ko.Redhat font.properties.zh_TW.Sun psfont.properties.ja
font.properties.ja_JP.Sun2003 font.properties.ko.Redhat2.1 font.properties.zh_TW_UTF8.Sun rt.jar
font.properties.ja_JP_UTF8.Sun font.properties.Redhat6.1 font.properties.zh_TW_UTF8.Sun2003 security
font.properties.ja_JP_UTF8.Sun2003 font.properties.Redhat8.0 fonts sunrsasign.jar
font.properties.ja.Redhat3 font.properties.SuSE8.0 i386 zi
font.properties.ja.Redhat6.1 font.properties.zh_CN.Redhat im
[oracle@DB-Server lib]$
备份font.properties
[oracle@DB-Server lib]$ cp font.properties font.properties_back
[oracle@DB-Server lib]$ cp font.properties.zh_CN.Redhat font.properties
查看font.properties文件,确认文件中指定的字体文件zysong.ttf在系统内存在。若不存在需要修改此文件或安装这个字体
[oracle@DB-Server lib]$ tail -10 font.properties
fontset.dialoginput.plain=\
-b&h-luxi mono-medium-r-normal--*-%d-*-*-m-*-iso8859-1,\
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
fontset.default=\
-b&h-luxi sans-medium-r-normal--*-%d-*-*-p-*-iso8859-1,\
-isas-song ti-medium-r-normal--*-%d-*-*-c-*-gb2312.1980-0
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf
[oracle@DB-Server lib]$
转到/usr/share/fonts目录下,发现没有zh_CN目录,新建目录zh_CN/TrueType,去网上下载字体zysong.ttf放在/usr/share/fonts/zh_CN/TrueType目录下。
然后
[oracle@DB-Server fonts]$ cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/isqlplus/isqlplus/cabo/images/cache/zhs/
[oracle@DB-Server zhs]$ ls
b-0dac.gif b-54.gif b-cancel.gif b-execute.gif b-login.gif b-save.gif tb-56-0.gif
b-0dac.imx b-54.imx b-cancel.imx b-execute.imx b-login.imx b-save.imx tb-56-0.imx
[oracle@DB-Server zhs]$ rm *
[oracle@DB-Server zhs]$ isqlplusctl stop
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
getnameinfo failed
getnameinfo failed
Stopping iSQL*Plus ...
iSQL*Plus stopped.
[oracle@DB-Server zhs]$ isqlplusctl start
iSQL*Plus 10.2.0.1.0
Copyright (c) 2003, 2005, Oracle. All rights reserved.
getnameinfo failed
getnameinfo failed
Starting iSQL*Plus ...
iSQL*Plus started.
[oracle@DB-Server zhs]$
2:以DBA账号登录时,如果不指定连接标识符,则会报如下错误:ORA-12154:TNS:could not resolve the connect identifier specified.

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

全表掃描在MySQL中可能比使用索引更快,具體情況包括:1)數據量較小時;2)查詢返回大量數據時;3)索引列不具備高選擇性時;4)複雜查詢時。通過分析查詢計劃、優化索引、避免過度索引和定期維護表,可以在實際應用中做出最優選擇。

是的,可以在 Windows 7 上安裝 MySQL,雖然微軟已停止支持 Windows 7,但 MySQL 仍兼容它。不過,安裝過程中需要注意以下幾點:下載適用於 Windows 的 MySQL 安裝程序。選擇合適的 MySQL 版本(社區版或企業版)。安裝過程中選擇適當的安裝目錄和字符集。設置 root 用戶密碼,並妥善保管。連接數據庫進行測試。注意 Windows 7 上的兼容性問題和安全性問題,建議升級到受支持的操作系統。

InnoDB的全文搜索功能非常强大,能够显著提高数据库查询效率和处理大量文本数据的能力。1)InnoDB通过倒排索引实现全文搜索,支持基本和高级搜索查询。2)使用MATCH和AGAINST关键字进行搜索,支持布尔模式和短语搜索。3)优化方法包括使用分词技术、定期重建索引和调整缓存大小,以提升性能和准确性。

MySQL是一個開源的關係型數據庫管理系統。 1)創建數據庫和表:使用CREATEDATABASE和CREATETABLE命令。 2)基本操作:INSERT、UPDATE、DELETE和SELECT。 3)高級操作:JOIN、子查詢和事務處理。 4)調試技巧:檢查語法、數據類型和權限。 5)優化建議:使用索引、避免SELECT*和使用事務。

聚集索引和非聚集索引的區別在於:1.聚集索引將數據行存儲在索引結構中,適合按主鍵查詢和範圍查詢。 2.非聚集索引存儲索引鍵值和數據行的指針,適用於非主鍵列查詢。

MySQL 和 MariaDB 可以共存,但需要謹慎配置。關鍵在於為每個數據庫分配不同的端口號和數據目錄,並調整內存分配和緩存大小等參數。連接池、應用程序配置和版本差異也需要考慮,需要仔細測試和規劃以避免陷阱。在資源有限的情況下,同時運行兩個數據庫可能會導致性能問題。

MySQL 數據庫中,用戶和數據庫的關係通過權限和表定義。用戶擁有用戶名和密碼,用於訪問數據庫。權限通過 GRANT 命令授予,而表由 CREATE TABLE 命令創建。要建立用戶和數據庫之間的關係,需創建數據庫、創建用戶,然後授予權限。

數據集成簡化:AmazonRDSMySQL與Redshift的零ETL集成高效的數據集成是數據驅動型組織的核心。傳統的ETL(提取、轉換、加載)流程複雜且耗時,尤其是在將數據庫(例如AmazonRDSMySQL)與數據倉庫(例如Redshift)集成時。然而,AWS提供的零ETL集成方案徹底改變了這一現狀,為從RDSMySQL到Redshift的數據遷移提供了簡化、近乎實時的解決方案。本文將深入探討RDSMySQL零ETL與Redshift集成,闡述其工作原理以及為數據工程師和開發者帶來的優勢。
