Posts

Showing posts from 2021

Connecting to database,expdp without supplying username/password

Image
  Configuring client to use external password Store Saving password in a plain text file is a security risk and SOC will not accept using clear text password in scripts. This can be solved by using external password stores. Utilities like sqlplus,expdp,etc can pass db connection string to connect to database. There are four steps to achieve this Create a TNS entry  Add necessary entries in sqlnet.ora Create wallet Add/Create credential Create a tns entry (this is going to be used while connecting to the database ) tnsnames.ora exp_bkp = (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = hol)(PORT = 1521))     (CONNECT_DATA =        (SERVER = DEDICATED)        (SERVICE_NAME = PDB_TST)     )   ) 2 Modify sqlnet.ora WALLET_LOCATION =  (SOURCE = (METHOD = FILE)  (METHOD_DATA =  (DIRECTORY = /home/oracle/19_hm_2/wallet))) SQLNET.WALLET_OVERRIDE = TRUE SSL_CLIENT_AUTHENTICATION = FALSE 3 Create wallet Create a directory for wallet mkdir /home/oracle/19_hm_2/wallet  mkstore -wrl  /home/or

Cloning(runInstaller -createGoldImage) new oracle home with goldimage - 19c

Go to existing oracle home (A new oracle home can be created with latest RU patch applied so that gold image has latest RU) ./runInstaller -createGoldImage -destinationLocation /home/oracle This will start wizard and complete the image creation automatically. Wizard  will show the status This will create image in a zipped format in the /home/oracle directory ex:     /home/oracle/19_hm_2/db_home_2021-09-14_11-42-14AM.zip extract the newly created image.zip file in the target location to create a new oracle home cd /home/oracle mkdir 19_hm_2 cd 19_hm_2 unzip  /home/oracle/19_hm_2/db_home_2021-09-14_11-42-14AM.zip pwd /home/oracle/19_hm_2 then run the runInstaller from the newly extracted home (target home) ./runInstaller -silent -debug -force oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=dba ORACLE_HOME=/home/oracle/19_hm_2 ORACLE_BASE=/u01/app/oracle oracle.install.db.InstallEdition=EE oracle.install.db.DBA_GROUP=dba oracle.install.db.OPER_GROUP=dba oracle.install.db.OSBACKUPD

ADR snapshot and ORA-13707 message

Image
      ADDM snapshot status(dba_advisor_tasks) shows FATAL Error and error_message is ORA-13707: Either the start snapshot     or the end snapshot     is incomplete or missing key statistics.       Recently control_management_pack_access parameter was changed to DIAGNOSTIC+TUNING that was the cause of the issue. Though this parameter is dynamic due to a BUG it needs a database restart .   Once database restarted snapshots were successful and ADDM was able to run succesfully.   Ref Note: 1999635.1    

ORA-01017: invalid username/password logon denied

     DB: 12.1.0.2 Two node RAC instance Password file is on ASM   Though password file exist and correct password is available sys is not able to log in remotely (ORA-01017: invalid username/password logon denied)   pwget   -- dbuniquename   acmd8   +DGDATA1/ACMD8/PASSWORD/pwdacm88.312.1082199199   Recreated the password file Still the same error   Deleted the password file with   pwdelete   and created password file locally on the machine, yet the issue remained the same      checking further revealed Show parameter   sec_case_sensitive_logon      is set to false   sec_case_sensitive_logon                boolean        FALSE   so recreated the password file with ignore option   orapwd   file='+DGDATA1' password='Capandsamll2021'   dbuniquename = ACMD8   ignorecase =y   Now sys is able to connect remotely without issues  

Import fails with ORA-39002, ORA-31694, ORA-31644

    While running import using an old dump backup impdp was failing with ORA-39002, ORA-31694, ORA-31644   Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options ORA-39002: invalid operation ORA-31694: master table "SYSTEM"."SYS_SQL_FILE_FULL_01" failed to load/unload ORA-31644: unable to position to block number 27248734 in dump file "/d04/bkp/imo_mxdtb_expdp_full_25_05_2021.dmp"   The export dump was restore from an archive. After doing a little research we found that the backup dump generated that day was not complete, it has failed due to space constraint on the disk. It was only clear after checking the export log file for that day.   Resolution to the problem is only restoring a full intact export backup and continue with the import.    Reference : MOS Doc: 1413746.1  

GLOBAL_NAMES Parameter and its impact on oracle database (ORA-02085)

      Remote database name: UPGR (database link is made to connect to this database) On Local database  set the parameter global_names  This will make sure that connection to remote db is allowed only if db link name match with global_name of remote database show parameter global_names                         boolean     TRUE Get global name from remote database select * from global_name; GLOBAL_NAME ----------------------- UPGR Create a test database link on the local database with any name and test Create a database link with any name create database link  a   connect to  test identified by ***  using 'tst:1521/UPGR' ; Database link created. SQL> select * from a@ a ; select * from a@a                 * ERROR at line 1: ORA-02085: database link A connects to UPGR SQL> drop database link a ; Database link dropped. Create a database link with same name as remote database global_name SQL> create database link upgr connect to test identified by **** using 'tst:1521