Search This Blog

Total Pageviews

Tuesday, 1 February 2011

How to check the Opatch version?

-bash-3.00$ pwd
/opt/oracle/product/10.2/OPatch
-bash-3.00$ ./opatch version
Invoking OPatch 10.2.0.4.3

OPatch Version: 10.2.0.4.3

OPatch succeeded.
-bash-3.00$ ./opatch -help
Invoking OPatch 10.2.0.4.3

Oracle Interim Patch Installer version 10.2.0.4.3
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Usage: opatch [ -help ] [ -r[eport] ] [ command ]

command := apply
lsinventory
napply
nrollback
rollback
query
version
prereq
util

:= -help Displays the help message for the command.
-report Print the actions without executing.

example:
'opatch -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch napply -help'
'opatch nrollback -help'
'opatch rollback -help'
'opatch prereq -help'
'opatch util -help'



OPatch succeeded.




Rolling back a patch

In case if a patch did not fix the issue or if you has applied wrong patch to oracle home, you can always rollback the patch using following comamnd.

opatch rollback -id


=============



wget --http-user=oracle@***.com --http-password=****** --no-check-certificate --output-document=p6880880_190000_Linux-x86-64.zip "https://updates.oracle.com/Orion/Services/download/p6880880_190000_Linux-x86-64.zip?aru=25541367&patch_file=p6880880_190000_Linux-x86-64.zip"


wget --http-user=oracle@***.com --http-password=****** --no-check-certificate --output-document=p6880880_190000_Linux-x86-64.zip "https://updates.oracle.com/Orion/Services/download/p6880880_190000_Linux-x86-64.zip?aru=25541367&patch_file=p6880880_190000_Linux-x86-64.zip"
--2024-02-14 08:45:07--  https://updates.oracle.com/Orion/Services/download/p6880880_190000_Linux-x86-64.zip?aru=25541367&patch_file=p6880880_190000_Linux-x86-64.zip
Resolving updates.oracle.com (updates.oracle.com)... 2a02:26f0:fd00:d81::4425, 2a02:26f0:fd00:da5::4425, 23.64.16.120
Connecting to updates.oracle.com (updates.oracle.com)|2a02:26f0:fd00:d81::4425|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to [updates.oracle.com]:443.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://aru-akam.oracle.com/adcarurepos/vol/patch47/PLATFORM/Linux-x86-64/P31944/R600000000122912/p6880880_190000_Linux-x86-64.zip?FilePath=/adcarurepos/vol/patch47/PLATFORM/Linux-x86-64/P31944/R600000000122912/p6880880_190000_Linux-x86-64.zip&File=p6880880_190000_Linux-x86-64.zip&params=YzJJaDdtRGpHb3l5WkpLQk1wYm9lQTphcnU9MjU1NDEzNjcmZW1haWw9bWFzdGVyYnJhbmQub2Vicy5tYWlsQHJhY2tzcGFjZS5jb20mZmlsZV9pZD0xMTIwMTQwOTAmcGF0Y2hfZmlsZT1wNjg4MDg4MF8xOTAwMDBfTGludXgteDg2LTY0LnppcCZ1c2VyaWQ9Ty1PUkFDTEVUQVJAUkFDS1NQQUNFLkNPTSZzaXplPTEyNzYyOTAzNCZjb250ZXh0PUFAMTArSEBwaHhwYWFydWxwcmRtdDAyLm10cHJvZGFlcGh4LnByb2RhcHBwaHhhZXYxLm9yYWNsZXZjbi5jb20rUEAmZG93bmxvYWRfaWQ9NDcyMTQ2ODgw&AuthParam=1707900432_f1301fcf05d1d8df2909dce6e2664958 [following]
--2024-02-14 08:45:12--  https://aru-akam.oracle.com/adcarurepos/vol/patch47/PLATFORM/Linux-x86-64/P31944/R600000000122912/p6880880_190000_Linux-x86-64.zip?FilePath=/adcarurepos/vol/patch47/PLATFORM/Linux-x86-64/P31944/R600000000122912/p6880880_190000_Linux-x86-64.zip&File=p6880880_190000_Linux-x86-64.zip&params=YzJJaDdtRGpHb3l5WkpLQk1wYm9lQTphcnU9MjU1NDEzNjcmZW1haWw9bWFzdGVyYnJhbmQub2Vicy5tYWlsQHJhY2tzcGFjZS5jb20mZmlsZV9pZD0xMTIwMTQwOTAmcGF0Y2hfZmlsZT1wNjg4MDg4MF8xOTAwMDBfTGludXgteDg2LTY0LnppcCZ1c2VyaWQ9Ty1PUkFDTEVUQVJAUkFDS1NQQUNFLkNPTSZzaXplPTEyNzYyOTAzNCZjb250ZXh0PUFAMTArSEBwaHhwYWFydWxwcmRtdDAyLm10cHJvZGFlcGh4LnByb2RhcHBwaHhhZXYxLm9yYWNsZXZjbi5jb20rUEAmZG93bmxvYWRfaWQ9NDcyMTQ2ODgw&AuthParam=1707900432_f1301fcf05d1d8df2909dce6e2664958
Resolving aru-akam.oracle.com (aru-akam.oracle.com)... 23.39.224.75
Connecting to aru-akam.oracle.com (aru-akam.oracle.com)|23.39.224.75|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 127629034 (122M) [application/zip]
Saving to: ‘p6880880_190000_Linux-x86-64.zip’

100%[================================================================================================================================================================================================>] 127,629,034 85.7MB/s   in 1.4s

2024-02-14 08:45:14 (85.7 MB/s) - ‘p6880880_190000_Linux-x86-64.zip’ saved [127629034/127629034]

[anuj@ ~]$ ls -ltr
total 1139892

-rw-------. 1 anuj2804  users  127629034 Jan 24 04:26 p6880880_190000_Linux-x86-64.zip




[anuj2804@cbast1 ~]$

 


Connect to SQL*Plus with no TNSnames




Oracle's easy connect naming method. EZCONNECT 


sqlplus [user]/[password]@//[database_host]:[port]/[service_name] 

service_name=SID

In order to be prompted for a password while using the EZCONNECT naming adapter, use the following syntax:

sqlplus username@\"[hostname]:[port]/[service name]\"

example: sqlplus system@\"netfl-unix1:1521/v10.us.oracle.com\" 


If you performed a "typical" Oracle database server installation, the default service name for the instance will be ORCL. Use the following easy connect syntax to connect to that instance:




SQL> select NAME from v$database; 

NAME
---------
ORCL


database DEV01

sqlplus scott/tiger@apt-lnxtst-01/orcl
if port no is default i.e. 1521 then there is no need for port

sqlplus scott/tiger@BIGSERVER:1616/DEV01


oracle@apt-lnxtst-01:~> 


sqlplus scott/tiger@192.168.2.232/orcl

sqlplus scott/tiger@apt-lnxtst-01/orcl


sqlplus scott/tiger@192.168.2.232:1521/orcl


sqlplus scott/tiger@192.168.2.232:1521/orcl


=================

**************
sqlplus anuj@'(DESCRIPTION_LIST=(LOAD_BALANCE=off)(FAILOVER=on)(DESCRIPTION=(ENABLE=broken)(ADDRESS=(PROTOCOL=TCP)(HOST=***-scan.****)(PORT=1521))(CONNECT_DATA=(UR=A)(SERVICE_NAME=arac))))'

SQL*Plus: Release 12.2.0.1.0 Production on Fri Dec 17 01:40:14 2021

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

Enter password:
ERROR:
ORA-28002: the password will expire within 7 days


Last Successful login time: Sat Oct 23 2021 07:48:12 -05:00

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

primary:anuj@******** sqlplus>


**************



sqlplus /@"(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.211.106.64)(PORT=1521)))(CONNECT_DATA=(SID=orcl)(FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=5)(DELAY=10))))"

Oracle DBA

anuj blog Archive