Posts

DBCC checkdb for SQL Server database

DBCC CHECKDB Generally in a very large database it's no feasible to run the check for complete database because it's a resource intensive, so we different option to check the health. Command-1: DBCC CHECKDB ('AdventureWorks2012') Output: DBCC results for 'AdventureWorks2012'. Service Broker Msg 9675, State 1: Message Types analyzed: 14. Service Broker Msg 9676, State 1: Service Contracts analyzed: 6. Service Broker Msg 9667, State 1: Services analyzed: 3. Service Broker Msg 9668, State 1: Service Queues analyzed: 3. Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0. Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0. Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0. Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0. DBCC results for 'sys.sysrscols'. There are 1754 rows in 21 pages for object "sys.sysrscols". DBCC results for 'sys.sysrowsets'. There are 324 rows i...

Duplicate database using RMAN duplicate oracle 12c

Target database : primdb Duplicate database: dupdb   Step-1: Configure password file for duplicate database export ORACLE_SID=dupdb export ORACLE_HOME=/u01/app/oracle/product/12.2.0/db_1 cd $ORACLE_HOME/dbs orapwd file=orapwdupdb password = xxxxx Note: Make sure password should be same a primdb (target database) Step-2: Configure listener and TNS file for duplicate database PRIMDB =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = oracle12c.localdomain)(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = primdb)     )   ) DUPDB =   (DESCRIPTION =     (ADDRESS_LIST =       (ADDRESS = (PROTOCOL = TCP)(HOST = oracle12c.localdomain)(PORT = 1521))     )     (CONNECT_DATA =       (SERVICE_NAME = dupdb)     )   ) Step-3: Create pfile for duplicate database [oracle@oracle12c dbs]$ cat initdupdb.ora d...

Configure Dataguard Broker in oracle 12c

There are 5 steps to configure the DG broker: Configure Listener file on both Primary and Standby database, Add the below lines in the listener file. Reload the listener on both primary and standby Enable dg broker related parameters on both primary and standby database Configure DGMGRL Enable the configuration Step-1: Configure Listener file on both Primary and Standby database, Add the below lines in the listener file. SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (GLOBAL_DBNAME = primdb)       (ORACLE_HOME= /u01/app/oracle/product/12.2.0/dbhome_1)           (SID_NAME = primdb)     ) (SID_DESC =       (GLOBAL_DBNAME = stndb)       (ORACLE_HOME= /u01/app/oracle/product/12.2.0/dbhome_1)           (SID_NAME = stndb)     ) (SID_DESC =       (GLOBAL_DBNAME = primdb_DGMGRL)       (ORACLE_HOME=...

PostgreSQL Backup and Recovery

SQL Server database backup

Image
  Types of backups in the SQL Server   a.      Common types of backups: ·         Full ·         Differential ·         Transaction log ·         Tail log backup b.      Other types of backups: ·         Copy-only backup ·         File backup ·         Partial backup .      Backup Administration   Full Backups It backs up everything. It is a base backup of any database backup. This is also called a complete database backup which includes all of the objects like tables, indexes, views, procedures, functions etc. How to create full database backup: Using T-SQL: BACKUP DATABASE [AdventureWorks2012] TO DISK = 'D:\SQL_backup\full\adventu...