9I中如何修改Ddid和Dbname方法测试小结

来源:互联网 发布:在线教育培训系统源码 编辑:程序博客网 时间:2024/06/08 12:35
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
测试环境:Windows2000+9.2.0.1
具体操作如下:
一、NID工具使用:(oracle工具,安装完成后,就自动安装了),具体用法如看;
C:/>nid
DBNEWID:Release9.2.0.1.0-Production
Copyright(c)1995,2002,OracleCorporation.  Allrightsreserved.

Keyword    Description              (Default)
----------------------------------------------------
TARGET    Username/Password          (NONE)
Dbname    Newdatabasename          (NONE)
LOGFILE    OutputLog              (NONE)
REVERT    Revertfailedchange        NO
SETNAME    Setanewdatabasenameonly  NO
APPEND    Appendtooutputlog        NO
HELP      Displaysthesemessages      NO

用法举例:
ChangingOnlytheDBID
ThefollowingexampleconnectswithoperatingsystemauthenticationandchangesonlytheDBID:

%nidTARGET=/

ChangingtheDBIDandDatabaseName
ThefollowingexampleconnectsasuserSYSandchangestheDBIDandalsochangesthedatabasenametotest2:

%nidTARGET=SYS/oracle@test1Dbname=test2

ChangingOnlytheDatabaseName
ThefollowingexampleconnectsasuserSYSTEMandchangesonlythedatabasename,andalsospecifiesalogfilefortheoutput:

%nidTARGET=SYSTEM/manager@test2Dbname=test3SETNAME=YESLOGFILE=dbid.out

二、修改步骤如下:

1)、SQL>connsys/admin@testassysdba
Connected.
SQL>shutdownimmediate
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>
SQL>startupmount
ORACLEinstancestarted.

TotalSystemGlobalArea  101784276bytes
FixedSize            453332bytes
VariableSize          75497472bytes
DatabaseBuffers        25165824bytes
RedoBuffers            667648bytes
Databasemounted.
SQL>hostnidtarget=sys/admin@testDbname=testdb
DBNEWID:Release9.2.0.1.0-Production
Copyright(c)1995,2002,OracleCorporation.  Allrightsreserved.

ConnectedtodatabaseTEST(DBID=1835076349)

ControlFilesindatabase:
  C:/ORACLE/ORADATA/TEST/CONTROL01.CTL
  C:/ORACLE/ORADATA/TEST/CONTROL02.CTL
  C:/ORACLE/ORADATA/TEST/CONTROL03.CTL

ChangedatabaseIDanddatabasenameTESTtoTESTDB?(Y/[N])=>y

Proceedingwithoperation
ChangingdatabaseIDfrom1835076349to2321050327
ChangingdatabasenamefromTESTtoTESTDB
  ControlFileC:/ORACLE/ORADATA/TEST/CONTROL01.CTL-modified1<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
原创粉丝点击