3.4 Using DBCA to Create a Data Guard Standby

简介: 3.4 Using DBCA to Create a Data Guard Standby
###复制完成数据库状态:READ ONLY

dbca -silent \
 -createDuplicateDB -gdbName cdb -sid sbcdb \
 -createAsStandby -dbUniqueName sbcdb -sysPassword oracle \
 -primaryDBConnectionString ora02:1521/cdb \
 -datafileDestination /u01/db -storageType FS \ 
 -initParams db_recovery_file_dest=/u01/arc,db_create_file_dest=/u01/db \   <===同一天机器复制,pdb失败的!!!db_create_file_dest

 -createListener LISTENERxxxxx:1522  


#去掉 createAsStandby:
dbca -silent \
 -createDuplicateDB -gdbName sbcdb -sid sbcdb \
 -dbUniqueName sbcdb -sysPassword oracle \
 -primaryDBConnectionString ora02:1521/cdb \
 -datafileDestination /u01/db -storageType FS \
 -initParams db_recovery_file_dest=/u01/arc


#在同一台主机克隆pdb目录问题更改问题:
dbca -silent \
 -createDuplicateDB -gdbName sbcdb -sid sbcdb \
 -dbUniqueName sbcdb -sysPassword oracle \
 -primaryDBConnectionString ora02:1521/cdb \
 -datafileDestination /u01/db/sbcdb -storageType FS \
 -initParams db_recovery_file_dest=/u01/arc2,PDB_FILE_NAME_CONVERT="/u01/app/oracle/oradata/CDB/,/u01/db/sbcdb/"


#需要指定PDB_FILE_NAME_CONVERT 文件参数:
PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/CDB/','/u01/db/sbcdb/'










ALTER SESSION SET PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/CDB/pdbseed/','/u01/app/oracle/oradata/CDB/pdb01/';

CREATE PLUGGABLE DATABASE pdb01 ADMIN USER pdb_adm IDENTIFIED BY Password1;
alter pluggable database pdb01 open;



drop pluggable database pdb01 including datafiles; 


## 1--从单实例到单实例
 2dbca -silent -createDuplicateDB -gdbName CDB2 -sid CDB2
 3-primaryDBConnectionString host01:1521/CDB1 -databaseConfigType SI
 4-initParams db_unique_name=CDB2 -sysPassword password
 5-datafileDestination /u02/oracle/app/oradata
 6
 7--从单实例到rac
 8dbca -silent -createDuplicateDB -gdbName RACDUP
 9-primaryDBConnectionString PRIMSI -sid dup -databaseConfigType RAC
10-adminManaged -nodelist node1,node2
11-initParams db_unique_name=RACDUP
12-sysPassword password -storageType ASM -datafileDestination +DG
13-useOMF true -createListener LISTENERRACDUP:1530

-initParams db_create_online_log_dest_1='+data' \
















-sid sbcdb -dbUniqueName sbpdb19c \
-gdbName pdb19c \
-datafileDestination '+data' \
-initParams db_create_online_log_dest_1='+data' \
-createAsStandby



-bash-4.2$ dbca -createDuplicateDB -h
[INS-04003] Invalid argument passed from command line. Specified argument ([-h]) is not a supported argument for this application.
    -createDuplicateDB - Command to Duplicate a database.
        -gdbName <Global database name>
        -primaryDBConnectionString <EZCONNECT string to connect to primary database for example "host:port/servicename">
        -sid <Database system identifier>
        [-useWalletForDBCredentials <true | false> Specify true to load database credentials from wallet]
            -dbCredentialsWalletLocation <Path of the directory containing the wallet files>
            [-dbCredentialsWalletPassword <Password to open wallet with auto login disabled>]
        [-initParams <Comma separated list of name=value pairs>]
            [-initParamsEscapeChar <Specify escape character for comma when a specific initParam has multiple values.If the escape character is not specified backslash is the default escape character>]
        [-policyManaged | -adminManaged]
        [-policyManaged <Policy managed database, default option is Admin managed database>]
            -serverPoolName <Specify the single server pool name in case of create server pool or comma separated list in case of existing server pools>
            [-pqPoolName <value>]
            [-createServerPool <Create a new server pool, which will be used by the database>]
                [-pqPoolName <value>]
                [-forceServerPoolCreation <To create server pool by force when adequate free servers are not available. This may affect the database which is already in running mode>]
                [-pqCardinality <value>]
                [-cardinality <Specify the cardinality of the new server pool that is to be created, default is the number of qualified nodes>]
        [-adminManaged <Admin managed database, this is default option>]
        [-datafileDestination <Destination directory for all database files>]
        [-nodelist <Node names separated by comma for the database>]
        [-databaseConfigType <SINGLE | RAC | RACONENODE>]
            [-RACOneNodeServiceName <Service name for the service to be created for RAC One Node database. This option is mandatory when the databaseConfigType is RACONENODE>]
        [-createAsStandby <Option to create a standby database>]
            [-dbUniqueName <db_unique_name for standby db>]
        [-customScripts <A comma separated list of SQL scripts which needs to be run post db creation.The scripts are run in order they are listed>]
相关文章
|
8天前
|
容器
How to set the Undo_tablespace in PDB in Physical Standby RAC Database. (Doc ID 2726173.1)
How to set the Undo_tablespace in PDB in Physical Standby RAC Database. (Doc ID 2726173.1)
24 1
|
12月前
|
Oracle 关系型数据库 数据库
change backup ... for db_unique_name不同步到control file
change backup … for db_unique_name 可以改变备份集所属的db_unique_name,但oracle官方文档里面没有说会不会同步到db_unique_name对应的数据库的control file。我自己测试发现不会同步到control file。
|
关系型数据库 数据库
ORA-01501: CREATE DATABASE failed
使用dbca建库时遇到ORA-01501: CREATE DATABASE failed这个错误,检查告警日志,发现有下面错误信息: SMON: enabling tx recovery Fri Apr 29 14:06:25 HKT 2016 replication_dependenc...
2033 0
|
负载均衡 Oracle 关系型数据库
|
数据库 网络协议 数据库管理
Data Guard 和DGMGRL
db_unique_name_DGB.db_domain: service name db_unique_name_DGMGRL.db_domain:  在每个配置了broker的数据库上面都存在一个服务器进程进行 broker的管理操作,这个服务器进程就是Data Guard broker monitor(DMON),而这个DMON所用到的所有配置信息都会保留在一个配置文件中。
1011 0