Friday, January 31, 2020

How to unlock the admin user in Netezza Database?

Issue:
we had faced issue where we unfortunately locked the admin user on Netezza and unable to conenct to NZSQL,NZADMIN and even aginity work bench.


User wrongly updated the system table .
update _t_user set uselocked=TRUE where usename='ADMIN';

because of the above admin user locked out and its throwing the  error "access denied".

SYSTEM.ADMIN(ADMIN)=> select uselocked from _t_user where USEname='ADMIN1';
 USELOCKED
-----------
 t
(1 row)

Solution:
we have special command to reset the admin  user and it worked.


nzsql -admin -c "alter user admin reset account" ;

SYSTEM.ADMIN(ADMIN)=> select uselocked from _t_user where USEname='ADMIN1';
 USELOCKED
-----------
 f
(1 row)

Monday, January 27, 2020

what are the features of AWS Redshift database?

Features of AWS Redshift database

  • Columnar data storage instead Row
  • Data compression
  • Cloud based Data-warehouse
  • Massive Parallel Processing
  • Easily scalable
  • Result caching
  • Fault tolerant

Wednesday, December 4, 2019

How to find when we opened the database in resetlog mode?

we can check it using the below 3 method.

1.using alert_SID.log search the date of "alter database open resetlog " issued date
2.using rman.

RMAN> LIST INCARNATION;


List of Database Incarnations
DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1       1       TESTDB1 1740129829       PARENT  1          17-MAY-11
2       2       TESTDB1 1740129829       CURRENT 1572286395 11-APR-19

3.using rman

1* select * from v$database_incarnation
SQL> /

INCARNATION# RESETLOGS_CHANGE# RESETLOGS PRIOR_RESETLOGS_CHANGE# PRIOR_RES STATUS  RESETLOGS_ID PRIOR_INCARNATION# FLASHBACK_DATABASE_ALLOWED
------------ ----------------- --------- ----------------------- --------- ------- ------------ ------------------ --------------------------
           1                 1 17-MAY-11                       0           PARENT     751390373                  0 NO

           2        1.5723E+13 11-APR-19                       1 17-MAY-11 CURRENT   1005338426                  1 NO

Friday, November 1, 2019

Oracle Data Guard interview questions

Oracle Data Guard interview questions

1.what is the differance between physical standby & logical standby?
2.what are the process involved in Physical standby?
3.what is active data guard?
4.what are the parameters that needed to set in DB level for physical standby?
5.what is the process used for data guard broker?
6.What is the use of standby redolog?
7.What are different protection modes in dataguard?
8.What is snapshot standby database?
9.What is the difference between switchover and failover?
10.What is the process to apply a psu patch in dataguard setup?
11.What is the use of  fal_client and fal_server parameter in dataguard environment?
12.What is standby_file_management parameter oracle?
13.few of the archives got deleted and  before applying to DG ,how to sync the DG with primary?
14.I added a tempfile on primary database, but the tempfile is not reflecting on standby database despite, the standby_file_management is set to AUTO,why?
15.What are the different types of redo transport services in dataguard.?
16.What are the different services available in Oracle Data Guard?
17.How to check what protection mode of primary database in your Oracle Data Guard?
18.What is the usage of DB_FILE_NAME_CONVERT parameter in Oracle Data Guard setup?
19.How to delay the application of logs to a physical standby?
20.How many standby databases we can create (in 10g/11g)?
21.What are differences between physical, logical, snapshot standby and ADG (or) what are different types of standby databases?
22.What are the parameters we’ve to set in primary/standby for Data Guard?
23.What is the use of fal_server & fal_client, is it mandatory to set these?
24.How to find out backlog of standby?
25.If you didn't have access to the standby database and you wanted to find out what error has occurred in a data guard configuration, what view would you check in the primary database to check the error message?
26.How can you recover standby which far behind from primary (or) without archive logs how can we make standby sync?
27.What are advantages offered by Maximum Performance protection mode?
28.What are the benefits of maximum protection mode?
29.How is the maximum protection mode enabled?
30.What are the advantages of maximum availability protection mode?
31.What is the utility of the Redo Transport Service?
32.What do you understand by Broker in this software?
33.What are the tasks that you can perform using Broker?
34.What are the disadvantages that are associated with the Logical Standby systems?
35. What Is Dg Broker?
36. What Is The Difference Between Data Guard And Standby?
37.What Are New Features In 11g Data Guard?
38.What Is the use of  Dg_config  parameter?
39.What Is Rta (real Time Apply) Mode Mrp?
40.What Is The Difference Between Sync/async, Lgwr/arch, And Affirm/noaffirm ?
41.What Is Staticconnectidentifier Property Used For?
42.Steps To Create Physical Standby Database?
43.what is Fast-Start Failover in DG?
44.Does DG broker needs separate licence?
45.what are the conditions Fast-Start Failover will initiate?
46.what is  Dataguard Broker Observer?
47.what is the use of NetTimeout parameter in DG?
48.how to find if real time apply enabled on DG?
49.which DG mode ,primary response will be good?
50.what will happen if standby down on max.protection mode?
51.what is the pre-request for Fast-Start Failover?
52.how to redirect data guard broker log into a file?
53.How to reinstate the old Primary as a Standby after Failover in Oracle DB?
54.what  is the view used to check that archive log applied to standby DB?
55.why do we need same password file used for DG setup?
56.how to stop archive shipping without stopping the DB?
57.how to recover/sync standby DB if primary object configured with nologging options?
58.how to move a datafile that created on primary but not created on standby ,even though standby_file=auto?
59.why do we need pwd file  need  while configuring the DG?
60.why standby db always has more redolog group than primary db?
61.when we configure the standby DB,will that standby DB in archive or no archive mode?
62.what are the steps to start the physical DB for real time apply mode?
63.can we open physical standby DB in read only mode?
64.can the init parameter change will reflect from primary to standby db?
65.How many MRP process would exist on the typical standby DB?
66.when the standby DB open what are the operations allowed?
67.There was a block corruption on Primary db  will that cause any problem on standby DB?
68.can you tell me paramater for 1 to many DG configuration ,cascading model?
69.can we cascade physical standby from RAC to another standby?
70.if we give access to DB how to find out physical standby configured or not for the database?
71.what are the pre-request for creating the snapshopt standby database?
72.what are the parameter change needed to configure RAC to standby configuration and NON RAC to standby configuration?
73.what are the various mehtod to cone/create the standby database from Primary  database?

Wednesday, July 24, 2019

How to get the Graphical user Interface when installing oracle binary using Mobaxterm?

I had recently  faced some  challenges to get the GUI mode when installing the oracle software on Linux machine.

I got the below issues when tried with XCLOCK.

Error: Can't open display: 

Reason:
1.xclock package not installed on the Linux machine -Linux admin installed
2.X11 service not started-Linux admin
3.Not getting the XCLOCK after setting the above.

Solution:
when you login as  user into the server it will create the file called .Xauthority under /home/user and move the file  under oracle_user and provide the  full privilege.

check the DISPLAY parameter value under your own id and note it down

env |grep -i display

Bala@servername:/home/Bala> env |grep -i DISPL
DISPLAY=localhost:10.0

export the above display into oracle user and do the xclock and you may able to get the GUI on the server.

Thursday, October 4, 2018

Rman DDboost issue when starting the backup

Issue:
we have installed DDboost for rman  backup configuration and the setup completed successfully,However when testing the backup got the below error.


allocated channel: c1
channel c1: SID=77 device type=SBT_TAPE
channel c1: Data Domain Boost API

Starting backup at 02-OCT-18
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including current control file in backup set
channel c1: starting piece 1 at 02-OCT-18
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on c1 channel at 10/02/2018 11:38:37
ORA-19506: failed to create sequential file, name="03telatp_1_1", parms=""
ORA-27028: skgfqcre: sbtbackup returned error
ORA-19511: non RMAN, but media manager or vendor specific failure, error text:
   sbtbackup: dd_rman_connect_to_backup_host failed

Root cause:
looks like some connection credential issStarting Control File and SPFILE Autobackup at 02-OCT-18
piece handle=LPMDMD_cf_c-292763313-20181002-01 comment=API Version 2.0,MMS Version 1.2.1.0

Solution:
make sure you have the  feed the variable like the below.

RUN {
ALLOCATE CHANNEL t1 TYPE SBT_TAPE PARMS 'BLKSIZE=1048576, SBT_LIBRARY=$ORACLE_HOME/lib/libddobk.so,ENV=(STORAGE_UNIT=$STORAGE_UNIT,BACKUP_HOST=$DATADOMAIN_HOST,ORACLE_HOME=$ORACLE_HOME)' FORMAT '%U-%d';
send 'set username $DDBOOST_USER password $PASSWORD servername $DATADOMAIN_HOST';
RELEASE CHANNEL t1;
}
Starting Control File and SPFILE Autobackup at 02-OCT-18
piece handle=DB_cf_c-292763313-20181002-01 comment=API Version 2.0,MMS Version 1.2.1.0
Finished Control File and SPFILE Autobackup at 02-OCT-18
released channel: c1


Monday, September 10, 2018

oracle golden gate 12.3 silent installation on Linux server


Here is the step by step to install the oracle golden gate using silent method


1)export the below variable
export JAVA_HOME=/usr/java6

  export PATH=$JAVA_HOME/bin:$PATH
   export LIBPATH=$JAVA_HOME/bin:$LIBPATH


export JAVA_HOME=/usr/bin/java

  export PATH=$JAVA_HOME/bin:$PATH
   export LIBPATH=$JAVA_HOME/bin:$LIBPATH

oggusr@<server_name>:/appshr/oggusrQL/9.5> uname -a
Linux <server_name> 2.6.32-573.7.1.el6.x86_64 #1 SMP Tue Sep 22 14:04:58 CDT 2015 x86_64 x86_64 x86_64 GNU/Linux


./runInstaller -silent -responseFile /usr/local/ogg/sw/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp


2)edit the response file

cat oggcore.rsp

####################################################################
## Copyright(c) Oracle Corporation 2017. All rights reserved.     ##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file should be secured to have read       ##
## permission only by the oracle user or an administrator who     ##
## own this installation to protect any sensitive input values.   ##
##                                                                ##
####################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v12_1_2


################################################################################
##                                                                            ##
## Oracle GoldenGate installation option and details                          ##
##                                                                            ##
################################################################################

#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ORA12c for installing Oracle GoldenGate for Oracle Database 12c and
#         ORA11g for installing Oracle GoldenGate for Oracle Database 11g
#-------------------------------------------------------------------------------
INSTALL_OPTION=ORA11g

#-------------------------------------------------------------------------------
# Specify a location to install Oracle GoldenGate
#-------------------------------------------------------------------------------
SOFTWARE_LOCATION=/ogg/ggs_home

#-------------------------------------------------------------------------------
# Specify true to start the manager after installation.
#-------------------------------------------------------------------------------
#START_MANAGER=

#-------------------------------------------------------------------------------
# Specify a free port within the valid range for the manager process.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
#MANAGER_PORT=

#-------------------------------------------------------------------------------
# Specify the location of the Oracle Database.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
#DATABASE_LOCATION=


################################################################################
##                                                                            ##
## Specify details to Create inventory for Oracle installs                    ##
## Required only for the first Oracle product install on a system.            ##
##                                                                            ##
################################################################################

#-------------------------------------------------------------------------------
# Specify the location which holds the install inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
#INVENTORY_LOCATION=

#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
# This parameter is not applicable if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------


SOFTWARE_LOCATION=/ogg/ggs_home
3)invoke the  runinstaller
./runInstaller -silent -responseFile /usr/local/ogg/sw/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp

oggusr@<server_name>:/usr/local/ogg/sw/fbo_ggs_Linux_x64_shiphome/Disk1> ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp                                               <
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 3685 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3642 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-09-07_01-07-05PM. Please wait ...oggusr@<server_name>:/usr/local/ogg/sw/fbo_ggs_Linux_x64_shiphome/Disk1> X11 connection rejected because of wrong authentication.
You can find the log of this install session at:
 /appshr/oraInventory/logs/installActions2018-09-07_01-07-05PM.log
The installation of Oracle GoldenGate Core was successful.
Please check '/appshr/oraInventory/logs/silentInstall2018-09-07_01-07-05PM.log' for more details.
Successfully Setup Software.

4)make sure the golden gate installation successful and check the logs

oracle golden gate installation error on IBM AIX

Issue:
when I tried to install oracle golden gate 12.3 with IBM AIX server got the below  error.
$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB. Actual 2024 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8192 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-07-10_02-44-46PM. Please wait ...cvidntcrkdwh1 {lpndwd} /appndwd/oradata/lpndwd.export/ogg/fbo_ggs_AIX_ppc_shiphome/Disk1>
$ Error: Port Library failed to initialize: -125 
Error: Could not create the Java Virtual Machine. 
Error: A fatal exception has occurred. Program will exit. 

Solution:
looks like Java environment was not set properly and set the Java  & other settings and issue will resolve.


root cause:
Jave & LIBPATH seeting has to be configured properly.

export JAVA_HOME=/usr/java6
export PATH=$JAVA_HOME/bin:$PATH



export LIBPATH=$JAVA_HOME/bin:$LIBPATH


Monday, August 20, 2018

How to get the DDL for the group in Netezza database

Issue:
How to get the DDL for the group in Netezza database

Solution:
Netezza we have utility to get the  DDL for the group.

nz_ddl_group <group_name>


/export/home/nz> nz_ddl_group TESTGRP

\echo
\echo *****  Creating group:  "TESTGRP"
CREATE GROUP TESTGRP WITH RESOURCE MINIMUM 1 RESOURCE MAXIMUM 5 ;

Monday, August 13, 2018

oracle DB crashed when opened after the full restore



Issue:
we have got the below issue  after opening the database from restore and it crashed the instance and throw the below error.
Tue Aug 07 22:47:12 2018
SMON: enabling cache recovery
Errors in file /apporadb1/oracle/product/11.2.0/log/diag/rdbms/oradb1/oradb1/trace/oradb1_ora_25952386.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Errors in file /apporadb1/oracle/product/11.2.0/log/diag/rdbms/oradb1/oradb1/trace/oradb1_ora_25952386.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Error 704 happened during db open, shutting down database
USER (ospid: 25952386): terminating the instance due to error 704
Instance terminated by USER, pid = 25952386
ORA-1092 signalled during: alter database open resetlogs...
opiodr aborting process unknown ospid (25952386) as a result of ORA-1092

Root cause:after checking this error and looks like  Db asking for upgrade and  we noticed the source database was 11.2.0 and target would be 11.2.0.4 .so in order to open the database ,we  just need to upgrade the database  to 11.2.0.4.

Solution:
1)startup the DB in upgrade mode
2)run the catupgrd.sql
3)run the utlrp.sql
4)do the sanity check on the database again.