EM Express – 12c Edition
I registered my database with the newly created listener as follows
in sqlplus
alter system register;
to know the port of your em please run the following query
create pluggable database PDB$SEED as clone using '/media/12c_db/product/12.1.0/dbhome_1/assistants/dbca/templates//pdbseed.xml' source_file_nam
e_convert = ('/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/temp01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/pdbseed_temp01.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/system01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/o1_mf_system_8wz2hq6d_.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/sysaux01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/o1_mf_sysaux_8wz2hq68_.dbf') file_name_c
onvert=NONE NOCOPY
Sat Jun 29 18:30:39 2013
****************************************************************
Pluggable Database PDB$SEED with pdb id - 2 is created as UNUSABLE.
If any errors are encountered before the pdb is marked as NEW,
then the pdb must be dropped
****************************************************************
Database Characterset is US7ASCII
Deleting old file#2 from file$
Deleting old file#4 from file$
Adding new file#5 to file$(old file#2)
Adding new file#7 to file$(old file#4)
ALTER SYSTEM: Flushing buffer cache inst=0 container=2 local
****************************************************************
Post plug operations are now complete.
Pluggable database PDB$SEED with pdb id - 2 is now marked as NEW.
****************************************************************
Completed: create pluggable database PDB$SEED as clone using '/media/12c_db/product/12.1.0/dbhome_1/assistants/dbca/templates//pdbseed.xml' sour
ce_file_name_convert = ('/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/temp01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/pdbseed_temp01.dbf
',
'/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/system01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/o1_mf_system_8wz2hq6d_.dbf',
'/ade/b/3593327372/oracle/oradata/seeddata/pdbseed/sysaux01.dbf','/media/12c_db/oradata/ORA12CC1/datafile/o1_mf_sysaux_8wz2hq68_.dbf') file_name_c
onvert=NONE NOCOPY
alter pluggable database PDB$SEED open restricted
yum installor
yum install oracle-rdbms-server-11gR2-preinstall -y
running root scripts
$ su - root
Password:
[root@ovs1 ~]# /media/12c_db/product/12.1.0/dbhome_1/root.sh
Performing root user operation for Oracle 12c
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /media/12c_db/product/12.1.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
UNIX commands useful for DBA
Vi commands
FILE manipulation:
:x
:wq
:q
:q!
Cursor Movements:
j or
k [or up-arrow] move cursor up one line
h
l or
0 (zero) move cursor to start of current line (the one with the cursor)
$ move cursor to end of current line
w move cursor to beginning of next word
b move cursor back to beginning of preceding word
:0
:n
:$
FIND command
find . -type f -mtime -200 -size +1000c -exec ls -l {} \; | awk '{print $5, $NF}'| sort -k 1,1n
-mtime +n --> not modified n days
-mtime -n --> modified within n days
The above example will search the file which is modified with 200 days and have size greater than speificed
Another example
find . -mtime +200 -exec ls -l {} \; listing not modified more than 200 days
find . –type f –exec grep –l “ORA-” {} \; | grep –v sample > loc_files.lst
this above example will search the ORA- matching string in the files which are searched
CPIO command
cpio -idmv <
example : cpio –idmv <>
Checking OS bit commands
solaris --> isainfo –kv
example:
> isainfo -kv
64-bit sparcv9 kernel modules
AIX à getconf -a|grep KERN
$ getconf -a|grep KERN
KERNEL_BITMODE: 64
Windowsà
IP and servernames /etc/hosts
> more /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
10.231.5.24 xxx.admin xx-admin xxx.admin.telecom.co.nz xxx loghost
BASIC unix commands
Shared memory and semaphores
Ipcs
To see what semaphores have been allocated, use the Unix command 'ipcs -b'.
Ipcrm
To remove the shared memory and semaphores
ipcrm -m <== Use for the Shared Memory entryipcrm -s <== Use for the Semaphore entry TOP/TOPAS
This commands is used to check the top consuming resources