Table of Contents
Primer kreiranje clone template from existing database glob1
Primer brisanje baze korišćenjem dbca
Primer kreiranja baze korišćenjem dbca
Create database using glob1clone.dbc template.
Kreiranje uzorka (template) dbt iz postojeće baze
Primer: Kreiranje uzorka (template), brisanje baze I rekreiranje pomoću uzorka (template)
Primer: Kreiranje skripta korišćenjem uzorka (template) i rekreiranje baze
Crete db scripts in directory D:\oracle\product\10.2.0\db_1\assistants\dbca\templates\scr
DBCA Database Configuration Assistant koristi uzorke (templates) da:
· kreira nove baze od postojećih uzoraka ili
· da kreira uzorke od postojećih baza
· glob1 tested on v19.20
dbc – DataBase Clone (Seed Template)
dbt - DataBase Template (Non Seed Template)
DBCA uzorci (templates) su XML datoteke koje sadrže informaciju o bazi uključujuči:
- database options
- init.ora parameters
- storage attributes (datafiles, tablespaces, controlfiles and redologs)
Demo template datoteke se nalaze se u direktorijumu %ORACLE_HOME%/assistants/dbca/templates
directory. Npr.:
- Data_Warehouse.dbc
- General_Purpose.dbc
- Transaction_Processing.dbc
- New_Database.dbt
dbca -silent -createCloneTemplate -sourceSID glob1 -sysDBAUserName SYS -sysDBAPassword elcaro -templateName glob1clone.dbc
Prepare for db operation
18% complete
Gathering information from the source database
22% complete
25% complete
29% complete
33% complete
36% complete
Backup datafiles
42% complete
91% complete
Creating template file
100% complete
The generation of the clone database template "/u01/app/oracle/product/19.0.0/dbhome_1/assistants/dbca/templates/glob1clone.dbc" is successful.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/silent.log_2023-10-03_07-38-06PM" for further details.
REM delete database glob with the progress info
dbca -deleteDatabase -progressOnly -sourceDB glob1 -sysDBAUserName SYS -sysDBAPassword elcaro
[WARNING] [DBT-19202] The Database Configuration Assistant will delete the Oracle instances and datafiles for your database. All information in the database will be destroyed.
Prepare for db operation
32% complete
Connecting to database
35% complete
39% complete
42% complete
45% complete
48% complete
52% complete
65% complete
Updating network configuration files
68% complete
Deleting instance and datafiles
84% complete
100% complete
Database deletion completed.
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/glob1/glob1.log" for further details.
REM delete database glob with the progress info
dbca -deleteDatabase -progressOnly -deleteDatabase -sourceDB GLOB -sysDBAUserName sys -sysDBAPassword my_password
REM delete database glob silently ... molim pažljivo!!
dbca -silent -deleteDatabase -sourceDB GLOB -sysDBAUserName sys -sysDBAPassword my_password
dbca -silent -createDatabase -templateName glob1clone.dbc -gdbname glob1 -sid glob1
Enter SYS user password:
Enter SYSTEM user password:
Enter PDBADMIN User Password:
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
10% complete
Copying database files
40% complete
Creating and starting Oracle instance
42% complete
46% complete
50% complete
54% complete
60% complete
Completing Database Creation
66% complete
69% complete
70% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
/u01/app/oracle/cfgtoollogs/dbca/glob1.
Database Information:
Global Database Name:glob1
System Identifier(SID):glob1
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/glob1/glob10.log" for further details.
Oracle Template (kreira non container db)
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname glob -sid glob -characterset AL32UTF8
SQL> select name,dbid,con_dbid,cdb,con_id from v$database;
NAME DBID CON_DBID CDB CON_ID
--------- ---------- ---------- --- ----------
GLOB1 811810575 811810575 NO 0
REM Create db glob with the location od datafiles - kreiranje baze sa lokacijom gde se smeštaju datoteke – datafiles
dbca -silent -createDatabase -templateName glob1.dbc -gdbname glob -sid glob -characterset AL32UTF8 -datafiledestination C:\APP\ORACLEHOMEUSER1\ORADATA\GLOB
REM template dbt
dbca -silent -createTemplateFromDB -sourceDB GLOB -sysDBAUserName sys -sysDBAPassword change_on_install -templateName glob_template
REM Create a clone template glob_clone from an existing database by specifying the following parameters:
dbca -silent -createCloneTemplate -sourceDB GLOB -sysDBAUserName sys -sysDBAPassword change_on_install -templateName glob_clone
REM delete database glob silently or copy glob_clone.dbc and GLOB_CLONE.DFB to other host !
dbca -silent -deleteDatabase -sourceDB GLOB -sysDBAUserName sys –sysDBAPassword change_on_install
REM Create database using database clone template
dbca -silent -createDatabase -templateName glob_clone.dbc -gdbname glob -sid glob -characterset AL32UTF8
--from SQL*Plus
alter user DBSNMP account unlock;
alter user dbsnmp identified by DBSNMP;
REM Create EM support emConfiguration
dbca -silent -configureDatabase -sourceDB GLOB -emConfiguration LOCAL -dbsnmpPassword DBSNMP -sysmanPassword elcaro -smtpServer mail.saga-infotech.net -emailAddress darko@saga-infotech.net
dbca -silent -generateScripts -templateName glob_clone.dbc -gdbName glob -scriptDest D:\oracle\product\10.2.0\db_1\assistants\dbca\templates\scr
set ORACLE_SID=GLOB
glob.bat
dbca -help
Usage: dbca [<flag>] [<command> <option>]
Following are the possible flags:
-help
-contextId <RAC | SI>
-ignorePreReqs - Ignore prerequisite checks for current operation.
-ignorePrereqFailure - Ignore all prerequisites failures.
-silent - This flag allows you to carry on configuration in silent mode.
-<command>
Following are the possible commands:
-addInstance - Command to Add an instance to an admin managed cluster database.
-configureDatabase - Command to Configure a database.
-configurePluggableDatabase - Command to Configure a pluggable database.
-createCloneTemplate - Command to Create a clone template from an existing database.
-createDatabase - Command to Create a database.
-createDuplicateDB - Command to Duplicate a database.
-createPluggableDatabase - Command to Create a pluggable database.
-createTemplateFromDB - Command to Create a template from an existing database.
-createTemplateFromTemplate - Command to Create a template from an existing template.
-deleteDatabase - Command to Delete a database.
-deleteInstance - Command to Delete an instance from an admin managed cluster database.
-deletePluggableDatabase - Command to Delete a pluggable database.
-deleteTemplate - Command to delete a template.
-executePrereqs - Command to execute prerequisite checks.
-generateScripts - Command to Generate scripts which can be used to create database.
-relocatePDB - Command to Relocate a pluggable database.
-unplugDatabase - Command to Unplug a pluggable database.