Wednesday 22 August 2018

oracle goldengate interview questions

1. what is suplimental logging and why its required for gg replication.
2. what is tranlog in goldengate level.
3. what is PASSTHROU parameter
4. what is ASSUMETARGETDEFS parameter
5. what is credential store
6. what is checkpoint table? which capture mode it will be used integrated/classic?
7. what is discard file. what data it will stores.
8. what si BATCHSQL mode.
9. difference between Lag at checkpoit and Time since checkpoint.
10. what is CDR.
11 difference between classic and integrated capture.
12. what all manager process can do.

Sunday 12 August 2018

password file auto resync in oracle standby in oracle 12cr2

Every time you change password for password file users like sys, system, sysdg..... in primary database, you need to copy password file to standby site every time. 

In oracle 12cr2 DBAs will have relief, any changes for the password file in database level like change password, adding new user to password file etc will automatically resync in all standby site.

This is possible as password file changes also becomes as redo.

Below the demonstration: In this demo, primary and standby are in same server with same ORACLE_HOME.

primary: orcl
standby: stdby

password files timestamp before creating new user.
[oracle@localhost dbs]$ pwd
/u01/app/oracle/product/12.2.0/dbhome_1/dbs
[oracle@localhost dbs]$ ls -lrt orapw*
-rw-r-----. 1 oracle oinstall 4.5K Aug 12 15:10 orapworcl
-rw-r-----. 1 oracle oinstall 3.5K Aug 12 15:11 orapwstdby
[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sun Aug 12 15:26:49 2018

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


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

SQL> grant connect,sysdba to dba_user identified by dba_user;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
password files timestamp after creating new user. orcl password file showing new timestamp
[oracle@localhost dbs]$ ls -lrt orapw*
-rw-r-----. 1 oracle oinstall 3.5K Aug 12 15:11 orapwstdby
-rw-r-----. 1 oracle oinstall 5.0K Aug 12 15:27 orapworcl

switch logfile in primary:
[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sun Aug 12 15:27:27 2018

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


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

SQL> alter system switch logfile;

System altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

password files timestamp after switch logfile. now standby password file also showing new timestamp, so its updated.
[oracle@localhost dbs]$ ls -lrt orapw*
-rw-r-----. 1 oracle oinstall 5.0K Aug 12 15:27 orapworcl
-rw-r-----. 1 oracle oinstall 4.0K Aug 12 15:27 orapwstdby

user is updated in standby database.
[oracle@localhost dbs]$ . oraenv
ORACLE_SID = [orcl] ? stdby
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sun Aug 12 15:38:17 2018

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


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

SQL> select username,sysdba from v$pwfile_users where username='TEST_USER';


USERNAME             SYSDB
-------------------- -----
TEST_USER            TRUE


EXPDP in readonly standby in oracle

Expdp is not possible while standby database is in "read only with apply"

Reason: every datapump job will create master table in database to track the job status. So the database is in readonly it cannot create master table in database and throw error.

[oracle@localhost app]$ expdp \'/as sysdba\' directory=dump dumpfile=test.dmp logfile=test.log tables=ramesh.test

Export: Release 12.2.0.1.0 - Production on Sun Aug 12 13:12:01 2018

Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
ORA-31626: job does not exist
ORA-31633: unable to create master table "SYS.SYS_EXPORT_TABLE_05"
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
ORA-06512: at "SYS.KUPV$FT", line 1161
ORA-16000: database or pluggable database open for read-only access
ORA-06512: at "SYS.KUPV$FT", line 1054
ORA-06512: at "SYS.KUPV$FT", line 1042