博客
关于我
nid修改oracle11gR2数据库名
阅读量:795 次
发布时间: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/

你可能感兴趣的文章
ng6.1 新特性:滚回到之前的位置
查看>>
nghttp3使用指南
查看>>
Nginx
查看>>
nginx + etcd 动态负载均衡实践(一)—— 组件介绍
查看>>
nginx + etcd 动态负载均衡实践(三)—— 基于nginx-upsync-module实现
查看>>
nginx + etcd 动态负载均衡实践(二)—— 组件安装
查看>>
nginx + etcd 动态负载均衡实践(四)—— 基于confd实现
查看>>
Nginx + Spring Boot 实现负载均衡
查看>>
Nginx + Tomcat + SpringBoot 部署项目
查看>>
Nginx + uWSGI + Flask + Vhost
查看>>
Nginx - Header详解
查看>>
Nginx - 反向代理、负载均衡、动静分离、底层原理(案例实战分析)
查看>>
Nginx - 反向代理与负载均衡
查看>>
nginx 1.24.0 安装nginx最新稳定版
查看>>
nginx 301 永久重定向
查看>>
nginx connect 模块安装以及配置
查看>>
nginx css,js合并插件,淘宝nginx合并js,css插件
查看>>
Nginx gateway集群和动态网关
查看>>
nginx http配置说明,逐渐完善。
查看>>
Nginx keepalived一主一从高可用,手把手带你一步一步配置!
查看>>