Database Creation using DBCA:
[root@ram ~]#[root@ram ~]# xhost +
[root@ram ~]# su - oracle
Oracle Database "prod" will be created.
To check the database is created or not, goto oratab file and check the database name presented:
[oracle@ram ~]$cat /etc/oratab
prod:/u01/app/oracle/product/11.2.0/db_1:N
And now check the CRD files:
[oracle@ram ~]$ cd /u01/app/oracle/oradata/prod
[oracle@ram prod]$ ls
control01.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf
redo01.log redo03.log system01.dbf undotbs01.dbf
[oracle@ram prod]$
[oracle@ram prod]$
[oracle@ram ~]$ cd $ORACLE_HOME/dbs
[oracle@ram dbs]$ ls
dr1prime.dat hc_prime.dat lkPRIME peshm_DBUA0_0 peshm_sales_0
dr2prime.dat hc_prod.dat lkPROD peshm_prima_0 snapcf_prime.f
hc_DBUA0.dat hc_sales.dat orapwprime peshm_prime_0 spfileprime.ora
hc_prima.dat init.ora orapwprod peshm_prod_0 spfileprod.ora
[oracle@ram dbs]$
And now Open the database and check the status and files:
[oracle@ram ~]$ export ORACLE_SID=prod
[oracle@ram ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun May 1 15:50:11 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
prod OPEN
SQL> select name,open_mode from v$database;
NAME OPEN_MODE
--------- --------------------
PROD READ WRITE
SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/control01.ctl
/u01/app/oracle/flash_recovery_area/prod/control02.ctl
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/redo03.log
/u01/app/oracle/oradata/prod/redo02.log
/u01/app/oracle/oradata/prod/redo01.log
SQL>
SQL>
SQL>
SQL> select name from v$archived_log;
no rows selected
SQL> archive log list
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current log sequence 2
SQL>
No comments:
Post a Comment