博客
关于我
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.conf中文详解(总结)
查看>>
nginx配置文件nginx.conf超详细讲解
查看>>
Nginx配置自带的stub状态实现活动监控指标
查看>>
Nginx配置详解
查看>>
nginx配置详解
查看>>
nginx配置详解、端口重定向和504
查看>>
nginx配置负载均衡
查看>>
Nginx配置负载均衡到后台网关集群
查看>>
Nginx配置限流,技能拉满!
查看>>
Nginx配置静态代理/静态资源映射时root与alias的区别,带前缀映射用alias
查看>>
Nginx面试三连问:Nginx如何工作?负载均衡策略有哪些?如何限流?
查看>>
Nginx(2):Nginx配置server节点
查看>>
nginx:/usr/src/fastdfs-nginx-module/src/common.c:21:25:致命错误:fdfs_define.h:没有那个文件或目录 #include
查看>>
Nginx:NginxConfig可视化配置工具安装
查看>>
Nginx:现代Web服务器的瑞士军刀 | 文章末尾送典藏书籍
查看>>
ngModelController
查看>>
ngrok | 内网穿透,支持 HTTPS、国内访问、静态域名
查看>>
ngrok内网穿透可以实现资源共享吗?快解析更加简洁
查看>>
ngrok内网穿透可以实现资源共享吗?快解析更加简洁
查看>>
NHibernate动态添加表
查看>>