博客
关于我
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报错:the “ssl“ parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:128
查看>>
nginx报错:the “ssl“ parameter requires ngx_http_ssl_module in usrlocalnginxconfnginx.conf128
查看>>
nginx日志分割并定期删除
查看>>
Nginx日志分析系统---ElasticStack(ELK)工作笔记001
查看>>
Nginx映射本地json文件,配置解决浏览器跨域问题,提供前端get请求模拟数据
查看>>
Nginx映射本地静态资源时,浏览器提示跨域问题解决
查看>>
nginx最最最详细教程来了
查看>>
Nginx服务器---正向代理
查看>>
Nginx服务器上安装SSL证书
查看>>
Nginx服务器基本配置
查看>>
Nginx服务器的安装
查看>>
Nginx标准配置文件(包括反向代理、大文件上传、Https证书配置、文件预览等)
查看>>
Nginx模块 ngx_http_limit_conn_module 限制连接数
查看>>
Nginx模块 ngx_http_limit_req_module 限制请求速率
查看>>
nginx添加允许跨域header头
查看>>
nginx添加模块与https支持
查看>>
nginx状态监控
查看>>
Nginx用户认证
查看>>
Nginx的location匹配规则的关键问题详解
查看>>
Nginx的Rewrite正则表达式,匹配非某单词
查看>>