Posts

Showing posts from February, 2024

Oracle Dataguard Recovery Steps & Status Check

Steps below can be used to recover disconnected & unrecoverable standby databases. The commands below should be run on standby server.   1) Create pfile: create pfile='/tmp/pfile.ora' from spfile;   2) Drop old database. RMAN> startup mount; RMAN> sql 'alter system enable restricted session'; RMAN> drop database including backups noprompt;   3) Create spfile from pfile. sqlplus / as sysdba create spfile from pfile='/tmp/pfile.ora'; startup nomount;   4) Start database recover operation. rman target sys@primarydb auxiliary sys@stbydb (names coming from tnsnames.ora) duplicate target database for standby from active database dorecover nofilenamecheck; 5) After recovery completed, run the command below: alter database recover managed standby database disconnect from session; Note: If you get an error, shutdown the database and re-mount it. (startup mount)    6) Run the select below, if GAP_STATUS column equals to "NO GAP"  then recover the da

Oracle Database Gateway Setup On Linux (For MSSQL Connections)

Here are the steps for MSSQL Connections. Download the Compatible Oracle Gateway Version depending on your database version. Setup via GUI. Be sure that ORACLE_BASE is as same as existing database, but ORACLE_HOME should be different than database's ORACLE_HOME.      database oracle_home: /oracle/db/19/dbhome_1     gateway oracle_home: /oracle/db/19/sql_gateway Specify only for SQL Server tools as that you'll need, ignore the rest. You can enter MSSQL Database ip, servername, port and databasename. On the next step where you have to configure listener, assign different port than existing database port (for example, GATEWAY_LISTENER) After GUI Setup has been finished, copy the init file like below and edit it. For the example, QADB is our remote MSSQL database name. [root@testserver admin]# cd /oracle/db/19/sql_gateway/dg4msql/admin [root@testserver admin]#cp initdg4msql.ora initQADB.ora [root@testserver admin]# vi initQADB.ora # # HS init parameters # HS_FDS_CONNECT_INFO=[<t