Search This Blog

Total Pageviews

Sunday 15 December 2013

ASM Default Disk String location ....

ASM Default Disk String location .... 



Operating System           Default Search String
===============                  ===================
Solaris (32/64 bit)       /dev/rdsk/*
Windows NT/XP             \\.\orcldisk*
Linux (32/64 bit)         /dev/raw/*
HP-UX                     /dev/rdsk/*
HP-UX(Tru 64)             /dev/rdisk/*
AIX                       /dev/rhdisk/*

connect sqlplus without tnsname.ora file .... 



sqlplus user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.85.132)(Port=1521))(CONNECT_DATA=(SID=MYSID)))

sqlplus "user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.85.132)(Port=1521))(CONNECT_DATA=(SID=MYSID)))"

sqlplus 'user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.85.132)(Port=1521))(CONNECT_DATA=(SID=MYSID)))'


sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.85.132)(Port=1521))(CONNECT_DATA=(SID=vihaan))) as sysdba'
 


ww
 sqlplus 'sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=xxxx)(Port=1521))(CONNECT_DATA=(SID=rac2))) as sysdba'


 sqlplus /nolog


idle sqlplus> connect sys@'(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxx)(PORT=1521)) (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=RAC)))' as sysdba
Enter password:
Connected.

connect sys with password ....

connect sys with password .... 




  sqlplus 'sys/sys@prim as sysdba'

sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.85.132)(Port=1521))(CONNECT_DATA=(SID=vihaan))) as sysdba'


to connect pluggable database as sys 
[oracle@cloud-ora ~]$ sqlplus 'sys/vih**n123@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=119.18.114.253)(Port=1521))(CONNECT_DATA=(SERVICE_NAME=anuj))) as sysdba'

SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 5 15:01:06 2018

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production


===



ww
sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.0.70)(Port=1521))(CONNECT_DATA=(SID=FREE))) as sysdba'

ww
sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.0.70)(Port=1521))(CONNECT_DATA=(SID=FREE) (SERVICE_NAME= FREEPDB1))) as sysdba'


sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.0.70)(Port=1521))(CONNECT_DATA=(SID=FREE))) as sysdba'

SQL*Plus: Release 23.0.0.0.0 - Production on Sat Nov 11 12:40:28 2023
Version 23.3.0.23.09

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


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> Disconnected from Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlplus 'sys/sys@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=192.168.0.70)(Port=1521))(CONNECT_DATA=(SID=FREE) (SERVICE_NAME= FREEPDB1))) as sysdba'

SQL*Plus: Release 23.0.0.0.0 - Production on Sat Nov 11 12:41:25 2023
Version 23.3.0.23.09

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


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

-===


sqlplus 'sys/sys@stdy as sysdba'
sqlplus sys/sys@stdy as sysdba
sqlplus sys/sys@'stdy as sysdba'
sqlplus sys/sys@'stdy' as sysdba


====
rman

run {
allocate channel d0_1 device type disk maxopenfiles 32 connect 'sys/sys@//192.168.0.28:1521/orcl' ;
DELETE EXPIRED ARCHIVELOG ALL;

release channel d0_1;
}
list backup summary;


=

Saturday 14 December 2013

How to use prelim option in sqlplus....

How to use prelim option in sqlplus....  


what is sqlplus -prelim : This is the backdoor entry method to access database (only SGA) in a hung situation 
 where no other methods are allowing to create new sessions in database.
 This will not create any session in DB rather connect to SGA directly ...

1) 

   sqlplus -prelim / as sysdba
   sqlplus system/mypass -prelim /nolog 

2) 

SQL> set _prelim on
SQL> conn / as sysdba
Prelim connection established

SQL> oradebug setmypid
Statement processed.

SQL> oradebug unlimit
Statement processed.

SQL> oradebug dump hanganalyze 1
Statement processed.

SQL> oradebug dump systemstate 10
Statement processed.

SQL> oradebug tracefile_name
/oracle/admin/diag/rdbms/demo11g/demo11g/trace/demo11g_ora_25010.trc


sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10


Note: 215858.1 – "Interpreting HANGANALYZE trace files to diagnose hanging and performance problems"

Note: 310830.1 – "How to Use Oradebug to Get Trace File Name and Location"

Note: 417879.1 – "-prelim Option When Running System State Dump"

Wednesday 4 December 2013

ORA-12012: error on auto execute of job ORACLE_OCM.MGMT_CONFIG_JOB_2_1 and ORA-29280: invalid directory


ORA-12012: error on auto execute of job ORACLE_OCM.MGMT_CONFIG_JOB_2_1
ORA-29280: invalid directory


when Newly installed 11.2.0.3 database, or recently upgraded to 11.2.0.3 from an earlier release.




when not using the OCM Collector, remove the OCM objects from database:

SQL> drop user ORACLE_OCM cascade;
OCM is a standalone, separate tool and removing won't affect the database functionality.

Or could simply disable the OCM jobs by running:

exec dbms_scheduler.disable('ORACLE_OCM.MGMT_CONFIG_JOB')
exec dbms_scheduler.disable('ORACLE_OCM.MGMT_STATS_CONFIG_JOB')




Oracle DBA

anuj blog Archive