zoukankan      html  css  js  c++  java
  • 设置DBID

    查询源数据库的DBID,用rman登陆数据库或者select dbid from v$database;。

    源DBID=392820279。
    登陆到目标数据库,查看DBID

    C:/>rman target /

    Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 14 00:27:31 2009

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: MICHAEL (DBID=393099115)

    RMAN>

    设置DBID

    C:/Documents and Settings/Administrator>sqlplus sys/123@michael as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Apr 14 00:33:28 2009

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    Connected to:

    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

    With the Partitioning, OLAP and Data Mining options

    SQL> select dbid from v$database;

    DBID

    ----------

    393099115

    SQL> show parameter db_name

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------

    db_name string michael

    SQL> exec dbms_backup_restore.nidbegin('michael','MICHAEL','392820279', 393099115,0,0,10)

    PL/SQL procedure successfully completed.

    SQL> select dbid from v$database;

    DBID

    ----------

    393099115

    SQL> variable a number;

    SQL> variable b number;

    SQL> variable c number;

    SQL> exec dbms_backup_restore.nidprocessdf(0,0,:a,:b,:c);

    PL/SQL procedure successfully completed.

    SQL> print :a

    A

    ----------

    0

    SQL> print :b

    B

    ----------

    1

    SQL> print :c

    C

    ----------

    1

    SQL> exec dbms_backup_restore.nidprocesscf(:a,:b);

    PL/SQL procedure successfully completed.

    SQL> print :a

    A

    ----------

    1

    SQL> print :b

    B

    ----------

    1

    SQL> exec dbms_backup_restore.nidend;

    PL/SQL procedure successfully completed.

    SQL> select dbid from v$database;

    DBID

    ----------

    392820279

    代码说明:

    show parameter db_name

    NAME TYPE VALUE

    ------------------------------------ ----------- ------------------------------

    db_name string testing

    SQL> exec dbms_backup_restore.nidbegin('michael','MICHAEL','392820279', 393099115,0,0,10)

    Param 1:目标数据库的实例名,即VALUE。

    Param 2:为更改后的实例名,必须大写。

    Param 3:为更改后的DBID。

    Param 4:为原来的DBID。

  • 相关阅读:
    关于返回上一页功能
    Mybatis Update statement Date null
    SQLite reset password
    Bootstrap Validator使用特性,动态(Dynamic)添加的input的验证问题
    Eclipse使用Maven2的一次环境清理记录
    Server Tomcat v7.0 Server at localhost failed to start
    PowerShell一例
    Server Tomcat v7.0 Server at libra failed to start
    商标注册英语
    A glance for agile method
  • 原文地址:https://www.cnblogs.com/liuyou/p/2618483.html
Copyright © 2011-2022 走看看