search
HomeDatabaseMysql TutorialDBCA启动问题(linux)

DBCA启动问题(linux)

Jun 07, 2016 pm 03:55 PM
linuxliststart upReport an errorquestion

报错列表: 1、[oracle@linuxserver1~]$ dbca bash: dbca: command not found 2、[oracle@linuxserver1~]$ dbca Xlib: connection to :0.0refused by server Xlib: No protocol specified 3、[oracle@linuxserver1~]$ dbca Exception in thread main $ 4、[or

报错列表:

1、[oracle@linuxserver1~]$ dbca

bash: dbca: command not found

2、[oracle@linuxserver1~]$ dbca

Xlib: connection to ":0.0"refused by server

Xlib: No protocol specified

3、[oracle@linuxserver1~]$ dbca

Exception in thread "main" $

4、[oracle@linuxserver1~]$dbca

$JRE_DIR/bin/jre -DORACLE_HOME=$OH-DJDBC_PROTOCOL=thin -mx64m -classpath $CLASSPATHoracle.sysman.assistants.dbca.Dbca $ARGUMENTS等错误

5、系统原因

报错处理方式:

1、[oracle@linuxserver1~]$ dbca
bash: dbca: command not found

报错原因:环境变量设置错误,dbca 可执行文件就在 /usr/sbin:$PATH:$ORACLE_HOME/bin下

解决办法:修改.bash_profile中的参数设置

方法一:

[oracle@linuxserver1 ~]$vi .bash_profile

删除原先export PATH设置,

添加export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

方法二:[oracle@linuxserver1 ~]$export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

2、[oracle@linuxserver1~]$ dbca
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

报错原因一:缺少支持打印的图形化动态链接库libXp.so.6

通过查看dbca的log日志发现缺少包libXp

[oracle@game_dbscripts]$ cd $ORACLE_HOME/cfgtoollogs/dbca

[oracle@game_dbdbca]$ ls

trace.log

[oracle@game_dbdbca]$ tail -50 trace.log

java.lang.UnsatisfiedLinkError:/home/oracle_app_10204/jdk/jre/lib/i386/libawt.so:libXp.so.6: cannot openshared object file: No such file or directory

atjava.lang.ClassLoader$NativeLibrary.load(Native Method)

atjava.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)

atjava.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)

atjava.lang.Runtime.loadLibrary0(Runtime.java:788)

atjava.lang.System.loadLibrary(System.java:834)

atsun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)

atjava.security.AccessController.doPrivileged(Native Method)

atsun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)

atsun.awt.DebugHelper.(DebugHelper.java:29)

atjava.awt.Component.(Component.java:506)

atoracle.sysman.assistants.util.wizard.WizardObject.(WizardObject.java:64)

atoracle.sysman.assistants.dbca.ui.DBCAWizard.(DBCAWizard.java:425)

atoracle.sysman.assistants.dbca.ui.UIHost.(UIHost.java:214)

atoracle.sysman.assistants.dbca.ui.InteractiveHost.(InteractiveHost.java:54)

atoracle.sysman.assistants.dbca.Dbca.getHost(Dbca.java:160)

atoracle.sysman.assistants.dbca.Dbca.execute(Dbca.java:94)

atoracle.sysman.assistants.dbca.Dbca.main(Dbca.java:180)

解决办法:将包libXp打上

解决步骤

1、验证一下包:

[oracle@linuxserver1 ~]$ rpm -qa|grep libXp

libXpm-devel-3.5.5-3

libXpm-3.5.5-3

2、将libXp 包打上:

[root@linuxserver1 ~]$# ll

-rwxrwSrwx 1 root root 229962007-07-26libXp-1.0.0-8.1.el5.i386.rpm

-rwxrwSrwx 1 root root 152622007-07-26libXp-devel-1.0.0-8.1.el5.i386.rpm

[root@linuxserver1 ~]$# rpm -ivh libXp*.rpm
warning: libXp-1.0.0-8.1.el5.i386.rpm:Header V3 DSA signature: NOKEY, key ID37017186
Preparing... ########################################### [100%]
1:libXp ########################################### [ 50%]
2:libXp-devel ########################################### [100%]
[oracle@linuxserver1 ~]$# rpm -qa|grep libXp
libXpm-devel-3.5.5-3
libXp-1.0.0-8.1.el5
libXpm-3.5.5-3
libXp-devel-1.0.0-8.1.el5

3、root用户下执行xhosts+命令保证图形化安装界面可以启动
[root@linuxserver1 ~]$# xhost +
access control disabled, clients canconnect from any host
[root@linuxserver1 ~]# su - oracle
[oracle@linuxserver1 ~]$ exportDISPLAY=192.168.3.189:0.0
[oracle@linuxserver1 ~]$ dbca

注意: 

一、使用SecureCRT实现远程应用程序的图形显示步骤:

1、 在root用户下修改/etc/ssh/sshd_config文件中的X11Forwarding的值为yes。

2、 设置SecureCRT的”会话选项”中的”远程/X11”中勾选”转发X11”数据包。

3、 重启服务,servicesshrestart。

4、 推出会话,重新连接。此时,echo$DISPLAY将会有值显示。

5、 在客户端这边,开启Xmanager(:0.0)。

6、 在SecureCRT端登入,设置DISPLAY变量(export DISPLAY=客户端IP:0.0)。

二. 在用oracle登录之前现在root用户下输入xhost +命令,oracle用户才能利用图形方式安装oracle或者建库

报错原因二:DISPLAY 环境变量设置错误。因为Xserver默认情况下不允许别的用户的图形程序的图形显示在当前屏幕上.

解决办法:如果需要别的用户的图形显示在当前屏幕上, 则应以当前登陆的用户, 也就是切换身份前的用户执行如下命令

[root@linuxserver1 ~]$xhost +

解决办法:用root登陆,在#提示符后输入:
xhost local:oracle non-network local connections being added to access controllist
此时再 su - oracle 切换到Oracle用户执行图形界面任务就可以了
man xhost中有这样一段
A complete name has the syntax‘‘family:name’’ where the families are as follows:
inet Internet host (IPv4)
inet6 Internet host (IPv6)
dnet DECnet host
nis Secure RPC network name
krb Kerberos V5 principal
local contains only one name, the empty string
si Server Interpreted
其中local那个是用来解决同一台机器的不同用户访问X的问题的

3、[oracle@linuxserver1~]$ dbca
Exception in thread "main" $

报错原因:DISPLAY参数设置

解决方法:

[oracle@linuxserver1 ~]$exportDISPLAY=127.0.0.1:0.0

[oracle@linuxserver1 ~]$ exportDISPLAY=:0.0

[oracle@linuxserver1 ~]$ xhost +

access control disabled, clients canconnect from any host

[oracle@linuxserver1 ~]$ dbca

4、[oracle@linuxserver1~]$dbca
$JRE_DIR/bin/jre -DORACLE_HOME=$OH -DJDBC_PROTOCOL=thin -mx64m -classpath$CLASSPATH oracle.sysman.assistants.dbca.Dbca $ARGUMENTS等错误

报错原因:JRE 的版本不对。oracle 的dbca脚本里默认的JRE 是 1.1.8

解决办法:

1. rm $ORACLE_HOME/JRE (此JRE链接是1.1.8 的符号链接,需要改指向向1.3.1的)

  2. ln -s $ORACLE_BASE/jre/1.3.1 $ORACLE_HOME/JRE

  3. cd $ORACLE_BASE/jre/1.3.1/bin

  4. ln -s java jre

  5. cd i386/native_threads

  6. ln -s java jre

注意:

JRE介绍:http://baike.baidu.com/view/160710.htm

版本管理

Java的解决办法是每个程序自己携带一套JRE。

比如说某人的机器上已经被安装了好多套JRE和JDK(JDK包括了同版本的JRE,此外还包括有编译器和其它工具),它们分别是:

BEAWeblogic Server 7.0 自带一套 JDK1.3.1_02, 还下载了一套最新的JDK1.4.1_02

JBuilder9自带一套JDK1.4.1_02

Oracle8.1.7自带一套JRE1.1.7

RationRose自带一套JDK1.3

DreamWeaver自带一套JDK1.3

6套JRE,每套JRE都被各自安装到不同的目录,不会互相影响。当在控制台执行java.exe,操作系统寻找JRE的方式如下:

先找当前目录下有没有JRE

再找父目录下有没有JRE

接着在PATH路径中找JRE

注册表HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JavaRuntime Environment\ 查看CurrentVersion的键值指向哪个JRE

最常用的是在PATH路径中找JRE,一般情况下,自己的程序运行之前都会先在批处理文件里面临时设置PATH,把自己用的JRE放到PATH路径最前面,所以肯定会运行自己带的JRE,不会造成版本混乱。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
What are stored procedures in MySQL?What are stored procedures in MySQL?May 01, 2025 am 12:27 AM

Stored procedures are precompiled SQL statements in MySQL for improving performance and simplifying complex operations. 1. Improve performance: After the first compilation, subsequent calls do not need to be recompiled. 2. Improve security: Restrict data table access through permission control. 3. Simplify complex operations: combine multiple SQL statements to simplify application layer logic.

How does query caching work in MySQL?How does query caching work in MySQL?May 01, 2025 am 12:26 AM

The working principle of MySQL query cache is to store the results of SELECT query, and when the same query is executed again, the cached results are directly returned. 1) Query cache improves database reading performance and finds cached results through hash values. 2) Simple configuration, set query_cache_type and query_cache_size in MySQL configuration file. 3) Use the SQL_NO_CACHE keyword to disable the cache of specific queries. 4) In high-frequency update environments, query cache may cause performance bottlenecks and needs to be optimized for use through monitoring and adjustment of parameters.

What are the advantages of using MySQL over other relational databases?What are the advantages of using MySQL over other relational databases?May 01, 2025 am 12:18 AM

The reasons why MySQL is widely used in various projects include: 1. High performance and scalability, supporting multiple storage engines; 2. Easy to use and maintain, simple configuration and rich tools; 3. Rich ecosystem, attracting a large number of community and third-party tool support; 4. Cross-platform support, suitable for multiple operating systems.

How do you handle database upgrades in MySQL?How do you handle database upgrades in MySQL?Apr 30, 2025 am 12:28 AM

The steps for upgrading MySQL database include: 1. Backup the database, 2. Stop the current MySQL service, 3. Install the new version of MySQL, 4. Start the new version of MySQL service, 5. Recover the database. Compatibility issues are required during the upgrade process, and advanced tools such as PerconaToolkit can be used for testing and optimization.

What are the different backup strategies you can use for MySQL?What are the different backup strategies you can use for MySQL?Apr 30, 2025 am 12:28 AM

MySQL backup policies include logical backup, physical backup, incremental backup, replication-based backup, and cloud backup. 1. Logical backup uses mysqldump to export database structure and data, which is suitable for small databases and version migrations. 2. Physical backups are fast and comprehensive by copying data files, but require database consistency. 3. Incremental backup uses binary logging to record changes, which is suitable for large databases. 4. Replication-based backup reduces the impact on the production system by backing up from the server. 5. Cloud backups such as AmazonRDS provide automation solutions, but costs and control need to be considered. When selecting a policy, database size, downtime tolerance, recovery time, and recovery point goals should be considered.

What is MySQL clustering?What is MySQL clustering?Apr 30, 2025 am 12:28 AM

MySQLclusteringenhancesdatabaserobustnessandscalabilitybydistributingdataacrossmultiplenodes.ItusestheNDBenginefordatareplicationandfaulttolerance,ensuringhighavailability.Setupinvolvesconfiguringmanagement,data,andSQLnodes,withcarefulmonitoringandpe

How do you optimize database schema design for performance in MySQL?How do you optimize database schema design for performance in MySQL?Apr 30, 2025 am 12:27 AM

Optimizing database schema design in MySQL can improve performance through the following steps: 1. Index optimization: Create indexes on common query columns, balancing the overhead of query and inserting updates. 2. Table structure optimization: Reduce data redundancy through normalization or anti-normalization and improve access efficiency. 3. Data type selection: Use appropriate data types, such as INT instead of VARCHAR, to reduce storage space. 4. Partitioning and sub-table: For large data volumes, use partitioning and sub-table to disperse data to improve query and maintenance efficiency.

How can you optimize MySQL performance?How can you optimize MySQL performance?Apr 30, 2025 am 12:26 AM

TooptimizeMySQLperformance,followthesesteps:1)Implementproperindexingtospeedupqueries,2)UseEXPLAINtoanalyzeandoptimizequeryperformance,3)Adjustserverconfigurationsettingslikeinnodb_buffer_pool_sizeandmax_connections,4)Usepartitioningforlargetablestoi

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.