1. 程式人生 > >手工配置oracle資料庫

手工配置oracle資料庫

在安裝oralce的過程中,最後彈出這樣的報錯,


參照文章http://www.2cto.com/database/201109/102928.html

[[email protected] ~]$ emca -deconfig dbcontrol db -repos drop

STARTED EMCA at Nov 18, 2013 8:52:28 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: oracle
Listener port number: 1521
Password for SYS user:  
Password for SYSMAN user:  

----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 18, 2013 8:52:51 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/oracle/emca_2013_11_18_20_52_27.log.
Nov 18, 2013 8:52:52 PM oracle.sysman.emcp.ParamsManager checkListenerStatusForDBControl
WARNING: ORA-12541: TNS:no listener

Nov 18, 2013 8:52:52 PM oracle.sysman.emcp.EMConfig perform
SEVERE: 

Database connection through listener failed. Fix the error and run EM Configuration Assistant again.

Some of the possible reasons may be: 

1) Listener port 1521 provided is incorrect. Provide the correct port.
2) Listener is not up. Start the Listener.
3) Database service oracle is not registered with listener. Register the database service. 
4) Listener is up on physical host and ORACLE_HOSTNAME environment variable is set to virtual host. Unset ORACLE_HOSTNAME environment variable. 
5) Listener is up on virtual host. Set environment variable ORACLE_HOSTNAME=<virtual host>.
6) /etc/hosts does not have correct entry for hostname. 

Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/oracle/emca_2013_11_18_20_52_27.log for more details.
Could not complete the configuration. Refer to the log file at /u01/app/oracle/cfgtoollogs/emca/oracle/emca_2013_11_18_20_52_27.log for more details.
[
[email protected]
~]$
排除問題,確定為第六可能是原因,於是修改/etc/hosts
[[email protected] ~]# cat /etc/hosts
127.0.0.1   RedHatOS(原來為空,修改)  localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.10.10         RedHatOS
重新刪除
[[email protected]
~]$ emca -deconfig dbcontrol db -repos drop STARTED EMCA at Nov 18, 2013 9:00:31 PM EM Configuration Assistant, Version 11.2.0.3.0 Production Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information: Database SID: oracle Listener port number: 1521 Password for SYS user: Password for SYSMAN user: ---------------------------------------------------------------------- WARNING : While repository is dropped the database will be put in quiesce mode. ---------------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: Y Nov 18, 2013 9:00:47 PM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/oracle/emca_2013_11_18_21_00_31.log. Nov 18, 2013 9:00:48 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration WARNING: EM is not configured for this database. No EM-specific actions can be performed. Some of the possible reasons may be: 1) EM is configured with different hostname then physical host. Set environment variable ORACLE_HOSTNAME=<hostname> and re-run EMCA script 2) ORACLE_HOSTNAME is set. Unset it and re-run EMCA script Nov 18, 2013 9:00:48 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Dropping the EM repository (this may take a while) ... Nov 18, 2013 9:07:15 PM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped Enterprise Manager configuration completed successfully FINISHED EMCA at Nov 18, 2013 9:07:15 PM
成功,然後建立
[[email protected] ~]$ emca -config dbcontrol db -repos create

STARTED EMCA at Nov 18, 2013 9:09:22 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:
Database SID: oracle
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2/db_1 ]: /u01/app/oracle/product/11.2/db_1
Password for SYS user:  
Password for DBSNMP user:  
Password for SYSMAN user:  
Email address for notifications (optional): 
Outgoing Mail (SMTP) server for notifications (optional): 
-----------------------------------------------------------------

You have specified the following settings

Database ORACLE_HOME ................ /u01/app/oracle/product/11.2/db_1

Local hostname ................ RedHatOS
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2/db_1
Listener port number ................ 1521
Database SID ................ oracle
Email address for notifications ............... 
Outgoing Mail (SMTP) server for notifications ............... 

-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 18, 2013 9:10:07 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/oracle/emca_2013_11_18_21_09_21.log.
Nov 18, 2013 9:10:09 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Nov 18, 2013 9:27:06 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Nov 18, 2013 9:27:17 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Nov 18, 2013 9:30:05 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Nov 18, 2013 9:30:12 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Nov 18, 2013 9:30:33 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Nov 18, 2013 9:30:33 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Nov 18, 2013 9:33:01 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Nov 18, 2013 9:33:01 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://RedHatOS:1158/em <<<<<<<<<<<
Nov 18, 2013 9:33:10 PM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: 
************************  WARNING  ************************

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /u01/app/oracle/product/11.2/db_1/RedHatOS_oracle/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. 

***********************************************************
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 18, 2013 9:33:10 PM

檢視狀態,說明配置成功
[[email protected] ~]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 
Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://RedHatOS:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running. 
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.2/db_1/RedHatOS_oracle/sysman/log 



相關推薦

手工配置oracle資料庫

在安裝oralce的過程中,最後彈出這樣的報錯, 參照文章http://www.2cto.com/database/201109/102928.html [[email protected] ~]$ emca -deconfig dbcontrol db -r

PL/SQL資料來源配置配置oracle資料庫的資料來源

1.登入PL/SQL Developer 這裡省略Oracle資料庫和PL/SQL Developer的安裝步驟,注意在安裝PL/SQL Developer軟體時,不要安裝在Program Files (x86)目錄下,不然無法啟動PL/SQL Developer。   奇怪這

Spring Boot 初級入門教程(十六) —— 配置 Oracle 資料庫和使用 MyBatis 測試

日常專案開發除了 MySQL 資料庫之外,用的最多的還有 Oracle 資料庫,所以這邊來說說如何在專案中配置 Oracle 資料庫,並測試是否配置成功。 一、引入依賴的 jar 包 檢視 pom.xml 檔案中是否引入了 ojdbc 的 jar 包,如果沒有引用,則需要引用才

Metabase配置Oracle資料庫

        在這裡分別講解一下在linux作業系統上基於docker安裝的Metabase配置oracle資料庫和Windows作業系統直接使用java -jar執行metabase配置oracle資料庫。 一、linux作業系統上基於docker安裝的Metabase

配置oracle資料庫容許遠端連線(包括通過plsql進行遠端連線)

oracle為了讓其能進行遠端連線, 通過程式的jdbc和客戶端的plsql進行遠端連線。 需要修改的地方: E:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora 中: LISTENE

Linux環境下在docker中配置Oracle資料庫並實現資料持久化

一  CentOs安裝docker 前置條件: 64-bit 系統 kernel 3.10+ 作者以下操作皆在root使用者下進行 1.檢查核心版本,返回的值大於等於3.10即可。   # uname -r 2.確保yum是最新的   # yum up

ASP.NET 兩種配置ORACLE資料庫的連線方式

ASP.NET 兩種配置ORACLE資料庫的連線方式 1.使用"connectionStrings"標籤定義 2.使用"appSettings"標籤定義 1.使用"connectionStrings"標籤定義 在ASP.NET中的 W

Linux下配置Oracle資料庫的客戶端

今天在用python的cx_Oracle 連結操作oracle資料庫的時候遇到連結Oracle伺服器失敗錯誤:cx_Oracle.DatabaseError: ORA-28547: connection to server failed, probable Oracle Ne

更改網路ip後如何重新配置Oracle資料庫監聽

premise:本地環境是win7,由於在公司換了工位,之前用的固定ip:192.168.3.83,oracle監聽也是此ip. 但是現在的自動獲取,Oracle監聽君與我從此成為路人。 解決辦法:

Maven專案中oracle資料庫連線不上(已經在pom檔案中配置jdbc驅動檔案)

在Maven專案中配置資料庫連線的過程中,出現java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver: 但是檢查了很久都沒有發現哪裡出現錯誤,該配置的都配置了,然後在百度找了一下,發現是oracle版本不同造成的: 參

非歸檔模式下如何手工備份和恢復整個oracle資料庫

非歸檔模式下如何手工備份和恢復oracle資料庫? 1.確定資料庫處於非歸檔模式 2.一致性關閉資料庫後,手工copy備份資料檔案、聯機重做日誌檔案、控制檔案 3.啟動資料庫,操作一段時間後,模擬資料檔案、聯機重做日誌檔案、控制檔案全部丟失 4.關閉資料庫後,手工copy備份

oracle資料庫如何手工完全恢復操作?(總結)

oracle資料庫如何手工完全恢復操作? 1.當全部或大部分資料檔案損壞時,需在mount 下進行“資料庫還原恢復”操作: 具體為手工在作業系統中,通過cp 還原受損的 dbf,不一定需要還原全部資料檔案,可以通過查詢v$recover_file來確定哪些檔案需要被還原。

在windows下python指令碼訪問Oracle資料庫環境變數配置常見報錯與解決方法集合

4. ImportError: No module named luhn:下載地址 https://pypi.org/project/luhn/#files,下載後的包直接解壓到 ~:\Python27\Lib\site-packages下。或者直接cmd命令列直

WildFly10 配置連線Oracle資料庫

一、Oracle資料庫的連線引數 1、URL: jdbc:oracle:thin:@127.0.0.1:1521:XE   // 127.0.0.1是本機地址,XE是精簡版Oracle的預設資料庫名 2、username/password 自己建立的使用者名稱和密

arcsde 連線oracle ,配置空間資料庫(附帶史上最全oracle安裝步驟)

想好好的來一次排版,讓大家看的舒服我也寫的舒服,可是一到寫的時候,又不知道如何去下手。。。算了直接一步步來吧。                  加油!你是最土的~~ 首先我們要進行準備工作,那就是先裝

ORACLE資料庫全量備份指令碼(windows/linux)配置使用說明

ORACLE資料庫全量備份指令碼(windows/linux)配置使用說明 配置資訊 Oracle_All_backup.bat配置資訊如下   需要配置的有四個引數: BACKPATH:備份檔案存放根目錄 USERNAME:使用者名稱

關於win10下同一區域網其他使用者訪問本地Oracle資料庫配置方法

1、點選windows鍵,彈出如下視窗 2 、找到如下圖的資料夾 3、開啟這個Oracle-OraDb11g_home1資料夾列表,找到如下圖所示的管理程式,點選進入 4、進入之後,點選本地下的監聽程式,然後點選LISTENER 5、點選LISTENER後出現如

Oracle資料庫的安裝配置過程和解除安裝步驟

5. 刪除HKEY_CURRENT_USER/SOFTWARE/Microsoft/windows/CurrentVersion/Explorer/MenuOrder/Start Menu/Programs中所有以oracle 開頭的鍵。

Django連線Oracle資料庫配置

Django專案中,settings.py檔案中: service_name   DATABASES = {     'default': {       'ENGINE': 'django.db.backends.oracle',       'NAME': 'IP:埠號/service_name',   

安裝Oracle資料庫時出現網路配置需求檢查失敗

錯誤提示: 正在檢查網路配置需求...  檢查完成。此次檢查的總體結果為: 失敗 <<<< 問題: 安裝檢測到系統的主 IP 地址是 DHCP 分配的地址。 提示方法:將 Mi