Saturday, 6 January 2018

H. Create A Database using DBCA Graphical Tool

Steps to be Executed:-

1. Set the environment and put "dbca" command to open Database Configuration Assistant and click
Next.

[oracle@oracle11gr2 ~]$ which dbca
/u01/app/oracle/product/11.2.0.4/db_1/bin/dbca
[oracle@oracle11gr2 ~]$ dbca

2. Click "Create a Database" option to proceed with create database.


3. Choose "General Purpose or Transaction Processing" and proceed with Next.


4. Put the Global Database name and SID and proceed with Next.


5. Choose to "Configure Enterprise Manager" and proceed with Next as we are setting up the OEM.


6. Put the passwords for SYS, SYSTEM user.


7. Click Use common file location and put the database file location in the space provided.


8. Specify the Fast Recovery Area location in the space provided.


9. Enable Archiving by providing the path to it.


10. Check the Sample Sachems as it will create the Scott user in database.


11. Choose the memory parameter and click Next.


12. Verify the database parameters and click Next to create the database.


13. Click Finish and OK to proceed.



14. Database creation is in progress.


15. Click Exit and finish the database creation script.


16. Verify the database is successfully created.

[oracle@oracle11gr2 ~]$ ps -ef|grep pmon
oracle   11092     1  0 16:07 ?        00:00:00 ora_pmon_DB11G
oracle   17204 17171  0 17:01 pts/2    00:00:00 grep pmon
[oracle@oracle11gr2 ~]$ ps -ef|grep tns
root        15     2  0 14:49 ?        00:00:00 [netns]
oracle   10361     1  0 15:47 ?        00:00:00 /u01/app/oracle/product/11.2.0.4/db_1/bin/tnslsnr LISTENER -inherit
oracle   17206 17171  0 17:01 pts/2    00:00:00 grep tns
[oracle@oracle11gr2 ~]$ lsnrctl status LISTENER

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 05-JAN-2018 17:01:58

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle11gr2.oracle.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                05-JAN-2018 15:47:26
Uptime                    0 days 1 hr. 14 min. 32 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle11gr2/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle11gr2.oracle.com)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DB11G" has 1 instance(s).
  Instance "DB11G", status READY, has 1 handler(s) for this service...
Service "DB11GXDB" has 1 instance(s).
  Instance "DB11G", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracle11gr2 ~]$ . oraenv
ORACLE_SID = [DB11G] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@oracle11gr2 ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Fri Jan 5 17:02:07 2018

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode,log_mode from v$database;

NAME      OPEN_MODE            LOG_MODE
--------- -------------------- ------------
DB11G     READ WRITE           ARCHIVELOG

SQL> set lines 180
SQL> col file_name for A50;
SQL> col tablespace_name for A20;
SQL> select tablespace_name,file_name,bytes/1024/1024/1024 from dba_data_files;

TABLESPACE_NAME      FILE_NAME                                          BYTES/1024/1024/1024
-------------------- -------------------------------------------------- --------------------
USERS                /oradata1/DB11G/DB11G/users01.dbf                            .004882813
UNDOTBS1             /oradata1/DB11G/DB11G/undotbs01.dbf                           .05859375
SYSAUX               /oradata1/DB11G/DB11G/sysaux01.dbf                             .5078125
SYSTEM               /oradata1/DB11G/DB11G/system01.dbf                           .732421875
EXAMPLE              /oradata1/DB11G/DB11G/example01.dbf                          .305786133

SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_data_files;

TABLESPACE_NAME      FILE_NAME                                          BYTES/1024/1024
-------------------- -------------------------------------------------- ---------------
USERS                /oradata1/DB11G/DB11G/users01.dbf                                5
UNDOTBS1             /oradata1/DB11G/DB11G/undotbs01.dbf                             60
SYSAUX               /oradata1/DB11G/DB11G/sysaux01.dbf                             520
SYSTEM               /oradata1/DB11G/DB11G/system01.dbf                             750
EXAMPLE              /oradata1/DB11G/DB11G/example01.dbf                        313.125

SQL> select tablespace_name,file_name,bytes/1024/1024 from dba_temp_files;

TABLESPACE_NAME      FILE_NAME                                          BYTES/1024/1024
-------------------- -------------------------------------------------- ---------------
TEMP                 /oradata1/DB11G/DB11G/temp01.dbf                                20

SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      /oradata1/DB11G/DB11G/control0
                                                 1.ctl, /oraarch/DB11G/DB11G/co
                                                 ntrol02.ctl
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL>
SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /oradata1/DB11G/DB11G/control0
                                                 1.ctl, /oraarch/DB11G/DB11G/co
                                                 ntrol02.ctl
SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /oraarch/DB11G
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence           4
SQL> show parameter log_archive_dest_1

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1                   string      LOCATION=/oraarch/DB11G
log_archive_dest_10                  string
log_archive_dest_11                  string
log_archive_dest_12                  string
log_archive_dest_13                  string
log_archive_dest_14                  string
log_archive_dest_15                  string
log_archive_dest_16                  string
log_archive_dest_17                  string
log_archive_dest_18                  string
log_archive_dest_19                  string
SQL>  exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oracle11gr2 ~]$




I. Login database with OEM

No comments:

Post a Comment