博客
关于我
nid修改oracle11gR2数据库名
阅读量:794 次
发布时间:2023-02-15

本文共 1658 字,大约阅读时间需要 5 分钟。

查看数据库信息

show parameter instance_nameshow parameter db_nameshow parameter service_name
select dbid from v$database;

正常关闭数据库

sqlplus / as sysdbaSQL> shutdown immediate

启动数据库到mount模式

SQL> startup mount

确认LISTENER是启动的

lsnrctl status

修改数据库名

host nid target=sys/password dbname=ocp setname=y

Change database ID and database name ORATEST to TEST? (Y/[N]) => y

修改参数文件

shutdown immediatestartup nomount;create pfile='E:\app\Administrator\admin\test\pfile\initocp.ora' from spfile;

将参数文件:E:\app\Administrator\admin\test\pfile\initocp.ora中:

db_domain=""db_name=ocp
shutdown immediate

重设密码文件

host orapwd file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWDocp.ora password=password entries=5

Windows平台需要以下两步:

重新创建服务

更改instance_namenet stop OracleServiceTESToradim -delete -sid test
oradim -new -sid ocp -STARTMODE auto -SRVCSTART system

修改注册表SID

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb11g_home1\ORACLE_SID值修改为ocp

启动数据库

sqlplus / as ysdbaSQL> startup pfile='E:\app\Administrator\admin\test\pfile\initocp.ora'

新建spfile

create spfile from pfile='E:\app\Administrator\admin\test\pfile\initocp.ora';

重新加载监听文件

lsnrctl reload

Windows平台需要以下两步:

orapwd file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWDocp.ora password=password entries=5

重新创建服务

更改instance_namenet stop OracleServiceTESToradim -delete -sid test
oradim -new -sid ocp -STARTMODE auto -SRVCSTART system

修改注册表SID

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraDb11g_home1\ORACLE_SID值修改为ocp

启动数据库

sqlplus / as ysdbaSQL> startup pfile='E:\app\Administrator\admin\test\pfile\initocp.ora'

新建spfile

create spfile from pfile='E:\app\Administrator\admin\test\pfile\initocp.ora';

重新加载监听文件

lsnrctl reload

转载地址:http://wfjfk.baihongyu.com/

你可能感兴趣的文章
nginx主要流程(未完成)
查看>>
Nginx之二:nginx.conf简单配置(参数详解)
查看>>
Nginx从入门到精通
查看>>
Nginx代理websocket配置(解决websocket异常断开连接tcp连接不断问题)
查看>>
Nginx代理初探
查看>>
nginx代理地图服务--离线部署地图服务(地图数据篇.4)
查看>>
Nginx代理外网映射
查看>>
Nginx代理模式下 log-format 获取客户端真实IP
查看>>
Nginx代理解决跨域问题(导致图片只能预览不能下载)
查看>>
Nginx代理访问提示ERR_CONTENT_LENGTH_MISMATCH
查看>>
Nginx代理配置详解
查看>>
Nginx代理静态资源(gis瓦片图片)实现非固定ip的url适配网络环境映射ip下的资源请求解决方案
查看>>
Nginx代理静态资源(gis瓦片图片)实现非固定ip的url适配网络环境映射ip下的资源请求解决方案
查看>>
nginx优化日志拒绝特定404请求写入
查看>>
Nginx使用proxy_cache指令设置反向代理缓存静态资源
查看>>
Nginx做反向代理时访问端口被自动去除
查看>>
Nginx入门教程-简介、安装、反向代理、负载均衡、动静分离使用实例
查看>>
nginx反向代理
查看>>
Nginx反向代理
查看>>
nginx反向代理、文件批量改名及统计ip访问量等精髓总结
查看>>