晕菜!昨天刚装的windows系统。接着把oracle数据库也装了,还用oem看了看。结果今早一开机……oem竟然启动不起来%#·!
胡乱折腾了一番,没有效果。最后无耐了,将原资料库删掉重建!!!! 呵呵,能删不能建。查看日志 ORA-20001: SYSMAN already exists 。
唉,真无语了。上google
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
手工启动:emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it.
当执行set OARCLE_SID=orcl,继续报错
Unable to determine local host from URL REPOSITORY_URL=http://localhost:%EM_UPLOAD_PORT%/em/upload/
注意以下地方:
1: 主机名:
C:\WINDOWS\system32\drivers\etc\hosts
2: EM链接JDBC:
$ORACLE_HOME\oc4j\j2ee
OC4J_DBConsole_fox-kook_kook
OC4J_DBConsole_localhost_kook (从fox-kook主机名复制这个目录为localhost)
3: 监听修改为主机名的连接方式,不要以IP方式。
$ORACLE_HOME\NETWORK\ADMIN\listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = kook.glfsoft.com)
(ORACLE_HOME = G:\oracle\product\10.2.0\db_1)
(SID_NAME = kook)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fox-kook)(PORT = 1521))
)
$ORACLE_HOME\NETWORK\ADMIN\tnsnames.ora同样。
KOOK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fox-kook)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = kook.glfsoft.com)
)
)
最终实现,IP更改不会影响到Oracle的EM启动问题。
附重建EM的命令组
引用
emca [操作] [模式] [数据库类型] [标记] [参数]
-h | --h | -help | --help: 打印此帮助消息
-version: 打印版本
-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [参数]: 配置数据库的 Database Control
-config centralAgent (db | asm) [-cluster] [-silent] [参数]: 配置中心代理管理
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [参数]: 配置 Database Control 和中心代理管理
-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [参数]: 取消配置中心代理管理
-deconfig all db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control 和中心代理管理
-addInst (db | asm) [-silent] [参数]: 为新的 RAC 实例配置 EM
-deleteInst (db | asm) [-silent] [参数]: 取消为指定的 RAC 实例配置 EM
-reconfig ports [-cluster] [参数]: 重新明确分配 Database Control 端口
-reconfig dbcontrol -cluster [-silent] [参数]: 重新配置 RAC Database Control 部署
-displayConfig dbcontrol -cluster [-silent] [参数]: 显示有关 RAC Database Control 配置的信息
-upgrade (db | asm | db_asm) [-cluster] [-silent] [参数]: 将较低版本的 EM 配置升级到当前版本
-restore (db | asm | db_asm) [-cluster] [-silent] [参数]: 将当前版本的 EM 配置还原到较低版本
参数和选项:
[参数]: [ -respFile fileName ] [ -paramName paramValue ]*
db: 对数据库 (包括使用 ASM 的数据库) 执行配置操作
asm: 仅对 ASM 实例执行配置操作
db_asm: 对数据库和 ASM 实例执行升级/还原操作
-repos create: 创建新的 Database Control 资料档案库
-repos drop: 删除当前的 Database Control 资料档案库
-repos recreate: 删除当前的 Database Control 资料档案库并重新创建一个
-cluster: 对 RAC 数据库执行配置操作
-silent: 在不提示参数的情况下执行配置操作
-backup: 配置数据库的自动备份
单实例数据库的参数
HOST: 数据库主机名
SID: 数据库 SID
PORT: 监听程序端口号
ORACLE_HOME: 数据库 ORACLE_HOME
HOST_USER: 自动备份的主机用户名
HOST_USER_PWD: 自动备份的主机用户口令
BACKUP_SCHEDULE: 自动备份调度 (HH:MM)
EMAIL_ADDRESS: 通知的电子邮件地址
MAIL_SERVER_NAME: 通知的发件 (SMTP) 服务器
ASM_OH: ASM ORACLE_HOME
ASM_SID: ASM SID
ASM_PORT: ASM 端口
ASM_USER_ROLE: ASM 用户角色
ASM_USER_NAME: ASM 用户名
ASM_USER_PWD: ASM 用户口令
SRC_OH: 要升级的数据库的 ORACLE_HOME
DBSNMP_PWD: DBSNMP 用户的口令
SYSMAN_PWD: SYSMAN 用户的口令
SYS_PWD: SYS 用户的口令
DBCONTROL_HTTP_PORT: Database Control HTTP 端口
AGENT_PORT: EM 代理端口
RMI_PORT: Database Control 的 RMI 端口
JMS_PORT: Database Control 的 JMS 端口
集群数据库的其他参数
CLUSTER_NAME: 集群名
DB_UNIQUE_NAME: 数据库的唯一名称
SERVICE_NAME: 服务名
EM_NODE: Database Control 节点名
EM_SID_LIST: 代理 SID 列表 [以逗号分隔]
20100107 em 创建出问题。查询 log 发现报 sys连接不了 support.oracle.com解决如下
Symptoms
After installing Oracle 10.2.0.1 and manually creating a new database (did not use DBCA). emctl start dbconsole fails with the following error:
"OC4J Configuration issue. ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_ sid not found."
The 10.2 database was created successfully but there is no hostname_sid directory under ORACLE_HOME. So then trying to create the DB Control configuration files and repository using "emca -config dbcontrol db -repos recreate", the following message was captured in the emca_repos_drop_.log:
"Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521)))(CON ECT_DATA=(SERVICE_NAME=sid))):
ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin) "
Cause
The ORA-01031: insufficient privileges error has been attributed to the REMOTE_LOGIN_PASSWORDFILE not being set correctly in the 10g database. There is also no password fle..
Solution
To resolve this problem,
Ensure REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE is set in the init.ora for the database
1. Create a password file:
Unix: $ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=sys entries=5
Windows: C:\> orapwd file=%ORACLE_HOME%\database\pwd%ORACLE_SID% password= sys entries=5
NOTE: The password will be "sys" in the above examples
2. Re-run EMCA to create the DB Control configuration files and repository. See Note 278100.1
胡乱折腾了一番,没有效果。最后无耐了,将原资料库删掉重建!!!! 呵呵,能删不能建。查看日志 ORA-20001: SYSMAN already exists 。
唉,真无语了。上google
Logon SQLPLUS as user SYS or SYSTEM, and drop the sysman account and management objects:
SQL> drop user sysman cascade;
SQL> drop role MGMT_USER;
SQL> drop user MGMT_VIEW cascade;
SQL> drop public synonym MGMT_TARGET_BLACKOUTS;
SQL> drop public synonym SETEMVIEWUSERCONTEXT;
手工启动:emctl start dbconsole
Environment variable ORACLE_SID not defined. Please define it.
当执行set OARCLE_SID=orcl,继续报错
Unable to determine local host from URL REPOSITORY_URL=http://localhost:%EM_UPLOAD_PORT%/em/upload/
注意以下地方:
1: 主机名:
C:\WINDOWS\system32\drivers\etc\hosts
2: EM链接JDBC:
$ORACLE_HOME\oc4j\j2ee
OC4J_DBConsole_fox-kook_kook
OC4J_DBConsole_localhost_kook (从fox-kook主机名复制这个目录为localhost)
3: 监听修改为主机名的连接方式,不要以IP方式。
$ORACLE_HOME\NETWORK\ADMIN\listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = kook.glfsoft.com)
(ORACLE_HOME = G:\oracle\product\10.2.0\db_1)
(SID_NAME = kook)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = fox-kook)(PORT = 1521))
)
$ORACLE_HOME\NETWORK\ADMIN\tnsnames.ora同样。
KOOK =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = fox-kook)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = kook.glfsoft.com)
)
)
最终实现,IP更改不会影响到Oracle的EM启动问题。
附重建EM的命令组
引用
emca [操作] [模式] [数据库类型] [标记] [参数]
-h | --h | -help | --help: 打印此帮助消息
-version: 打印版本
-config dbcontrol db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [参数]: 配置数据库的 Database Control
-config centralAgent (db | asm) [-cluster] [-silent] [参数]: 配置中心代理管理
-config all db [-repos (create | recreate)] [-cluster] [-silent] [-backup] [参数]: 配置 Database Control 和中心代理管理
-deconfig dbcontrol db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control
-deconfig centralAgent (db | asm) [-cluster] [ -silent] [参数]: 取消配置中心代理管理
-deconfig all db [-repos drop] [-cluster] [-silent] [参数]: 取消配置 Database Control 和中心代理管理
-addInst (db | asm) [-silent] [参数]: 为新的 RAC 实例配置 EM
-deleteInst (db | asm) [-silent] [参数]: 取消为指定的 RAC 实例配置 EM
-reconfig ports [-cluster] [参数]: 重新明确分配 Database Control 端口
-reconfig dbcontrol -cluster [-silent] [参数]: 重新配置 RAC Database Control 部署
-displayConfig dbcontrol -cluster [-silent] [参数]: 显示有关 RAC Database Control 配置的信息
-upgrade (db | asm | db_asm) [-cluster] [-silent] [参数]: 将较低版本的 EM 配置升级到当前版本
-restore (db | asm | db_asm) [-cluster] [-silent] [参数]: 将当前版本的 EM 配置还原到较低版本
参数和选项:
[参数]: [ -respFile fileName ] [ -paramName paramValue ]*
db: 对数据库 (包括使用 ASM 的数据库) 执行配置操作
asm: 仅对 ASM 实例执行配置操作
db_asm: 对数据库和 ASM 实例执行升级/还原操作
-repos create: 创建新的 Database Control 资料档案库
-repos drop: 删除当前的 Database Control 资料档案库
-repos recreate: 删除当前的 Database Control 资料档案库并重新创建一个
-cluster: 对 RAC 数据库执行配置操作
-silent: 在不提示参数的情况下执行配置操作
-backup: 配置数据库的自动备份
单实例数据库的参数
HOST: 数据库主机名
SID: 数据库 SID
PORT: 监听程序端口号
ORACLE_HOME: 数据库 ORACLE_HOME
HOST_USER: 自动备份的主机用户名
HOST_USER_PWD: 自动备份的主机用户口令
BACKUP_SCHEDULE: 自动备份调度 (HH:MM)
EMAIL_ADDRESS: 通知的电子邮件地址
MAIL_SERVER_NAME: 通知的发件 (SMTP) 服务器
ASM_OH: ASM ORACLE_HOME
ASM_SID: ASM SID
ASM_PORT: ASM 端口
ASM_USER_ROLE: ASM 用户角色
ASM_USER_NAME: ASM 用户名
ASM_USER_PWD: ASM 用户口令
SRC_OH: 要升级的数据库的 ORACLE_HOME
DBSNMP_PWD: DBSNMP 用户的口令
SYSMAN_PWD: SYSMAN 用户的口令
SYS_PWD: SYS 用户的口令
DBCONTROL_HTTP_PORT: Database Control HTTP 端口
AGENT_PORT: EM 代理端口
RMI_PORT: Database Control 的 RMI 端口
JMS_PORT: Database Control 的 JMS 端口
集群数据库的其他参数
CLUSTER_NAME: 集群名
DB_UNIQUE_NAME: 数据库的唯一名称
SERVICE_NAME: 服务名
EM_NODE: Database Control 节点名
EM_SID_LIST: 代理 SID 列表 [以逗号分隔]
20100107 em 创建出问题。查询 log 发现报 sys连接不了 support.oracle.com解决如下
Symptoms
After installing Oracle 10.2.0.1 and manually creating a new database (did not use DBCA). emctl start dbconsole fails with the following error:
"OC4J Configuration issue. ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_hostname_ sid not found."
The 10.2 database was created successfully but there is no hostname_sid directory under ORACLE_HOME. So then trying to create the DB Control configuration files and repository using "emca -config dbcontrol db -repos recreate", the following message was captured in the emca_repos_drop_.log:
"Could not connect to SYS/(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521)))(CON ECT_DATA=(SERVICE_NAME=sid))):
ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin) "
Cause
The ORA-01031: insufficient privileges error has been attributed to the REMOTE_LOGIN_PASSWORDFILE not being set correctly in the 10g database. There is also no password fle..
Solution
To resolve this problem,
Ensure REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE is set in the init.ora for the database
1. Create a password file:
Unix: $ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=sys entries=5
Windows: C:\> orapwd file=%ORACLE_HOME%\database\pwd%ORACLE_SID% password= sys entries=5
NOTE: The password will be "sys" in the above examples
2. Re-run EMCA to create the DB Control configuration files and repository. See Note 278100.1
for information on the commands to run.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11780477/viewspace-705081/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11780477/viewspace-705081/