Detailed description of basic database creation operations in Oracle databases.
Graph database creation:
1. Determine whether the database to be created exists
View
$ ORACLE_BASE/admin/and $ ORACLE_BASE/oradata
2. Run dbca
3. Select the new Database -- General Purpose (General Library) template -- Global Database Name: Database Name. domain Name. You can only use the Database Name -- SID to distinguish between case and case --...... -- Data path selection. The default template is $ ORACLE_BASE/oradata/dababase -- backup data path -- Memory Allocation (dedicated memory for SGA, mainly for transaction processing; PGA system memory, mainly for data) | the block size in Sizing can only be modified in the initial configuration. Each SGA user corresponds to a process and each PGA connection pool is provided for the user, number of connection processes = number of users + number of processes running in the background (20) | AL32UTF8 (xml supported) is recommended for character sets )--...... -- Save the script when creating the database. The script is stored in $ ORACLE_BASE/admin/oradata /.
4. Configure oem
Run dbca, select configure database, select database, select configure oem, And next step ......
Database creation based on OMF commands (databaseName: ulp ):
1.
mkdir $ORACLE_BASE/admin/ulp/{a,b,c,u,dp}dump –p
2.
mkdir $ORACLE_BASE/oradata/ULP
3.
Cd $ ORACLE_HOME/dbs/----> prepare the parameter file
4.
vi initulp.ora
Compatible = '10. 2.0.1.0 'db _ name = 'ulp' db _ block_size = 8192core_dump_dest = '/u01/oracle/admin/ulp/cdump' ----> log user_dump_dest = '/u01/oracle/admin/ ulp/udump 'background _ dump_dest = '/u01/oracle/admin/ulp/bdump' sga _ max_size = 200 m ----> automatic db_create_file_dest = '/u01/oracle/oradata/ '----> data storage db_create_online_log_dest_1 ='/u01/oracle/oradata/'----> log undo_management = autoundo_tablespace = 'sys _ UNDOTS'
5.
Orapwd file = orapwulp password = oracle ----> Generate a password file
6.
Export ORACLE_SID = ulp ----> specify a startup instance
7.
sqlplus “/as sysdba”
8.
> Startup nomount ----> Start the instance
9.
>create spfile from pfile;
10.
>startup force nomount;
11.
> Create database ulp; ----> create database ulp
12.
> Create tablespace users; ----> create a user tablespace
13.
> Create temporary tablespace temp; ----> create a temporary tablespace
14.
>alter database default tablespace users;
15.
>alter database default temporary tablespace temp;
16.
>create undo tablespace undotbs;
17.
#vi ulp.sql
@/u01/oracle/10g/rdbms/admin/catalog.sql@/u01/oracle/10g/rdbms/admin/catproc.sqlconn system/oracle@/u01/oracle/10g/sqlplus/admin/pupbld.sqlconn /as sysdbashutdown immediatestartup
18.
> @ Ulp. SQL ----> Create a data dictionary
19. configure remote access to database net 1521
Modify/u01/oracle/10g/network/admin/listener. ora and/u01/oracle/10g/network/admin/tnsnames. ora
20. test whether the database is created successfully:
>shutdown immediate>startup
21. Configure to allow dbca to manage ulp
vi /etc/oratab
Add:
ulp:/u01/oracle/10g:N
22. Configure oem if necessary
Emca-repos createemca-config dbcontrol dbexport ORACLE_SID = ulpemctl start dbconsoleemca-reconfig ports-dbcontrol_http_port 1180 ----> you can change the port emca-reconifg ports-agent_port 3940 ----> you can change the proxy Port
Dbca silent database creation
1. Use the response file:
dbca -silent -cloneTemplate -gdbName orcl -sid orcl -datafileDestion $ORACLE_BASE/oradata -sysPassword oracle -systemPassword oracle -emConfiguration LOCAL -dbsnmpPassword oracle -sysmanPassword oracle -responseFile /mnt/response/dbca.rsp
-DatafileDestion: $ ORACLE_BASE/oradata is not writable by default.
-EmConfiguration: Configure oem (if needed)
-ResponseFile: Specify the response file.
Change Password:
select username,account_status from dba_users where account_status='OPEN';alter user XXX identified by newpassword;
Network Configuration:
vi $ORACLE_HOME/network/admin/tnsnames.ora
2. Use the template:
Create a template (clone database) from an existing database ):
dbca -silent -createCloneTemplate -sourceDB orcl -templateName tempname
The template tempname is stored in $ ORACLE_HOME/assistants/dbca/templates/
In this directory, ctl is the backup control file; dbc is the template; dfb is the backup set made through rman, including all the running files in the library
You can also use the built-in Oracle template. The following example uses the built-in template.
-----
dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc -gdbName foway -sid foway -responseFile NO_VALUE -characterSet al32utf8 -nationalCharacterSet al16utf16 -datafileDestion $ORACLE_BASE/oradata -emConfiguration LOCAL
-DatafileDestion: $ ORACLE_BASE/oradata is not writable by default.
-TemplateName: Specifies the template.
-CharacterSet: Specify the sequence set.
-EmConfiguration: Configure oem (if needed)
Appendix: dbca silent database Deletion
dbca -silent -deleteDatabase -sourceDB dbname
Articles you may be interested in:
- Tutorial on installing and starting or disabling Oracle databases in Linux
- How to move Oracle tablespace data files
- How to execute an SQL job in an oracle session deadlock