<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>                                    DBA WORLD</title><description>Welcome to DBAWORLD!!! - Learning and Sharing is the main MOTO.
 
Pradyothana, PMP.

</description><managingEditor>noreply@blogger.com (PRADYOTHANA)</managingEditor><pubDate>Tue, 9 Jun 2026 12:13:07 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">482</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>https://www.msqlserver.in/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:summary>Welcome to DBAWORLD!!! - Learning and Sharing is the main MOTO. Pradyothana, PMP. </itunes:summary><itunes:subtitle>Welcome to DBAWORLD!!! - Learning and Sharing is the main MOTO. Pradyothana, PMP. </itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Oracle datapump utility EXPDP and IMPDP</title><link>https://www.msqlserver.in/2026/04/oracle-datapump-utility-expdp-and-impdp.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Sun, 12 Apr 2026 16:31:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-8982089698976715559</guid><description>&lt;p&gt;The Oracle Data Pump utilities — EXPDP (Export Data Pump) and IMPDP (Import Data Pump) — are powerful tools used for logical backup and restore in Oracle Database.&amp;nbsp;&lt;/p&gt;&lt;p&gt;They are faster and more flexible than the old exp/imp utilities.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Logical backups using Datapump:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Table level&amp;nbsp;&lt;/p&gt;&lt;p&gt;Schema level&lt;/p&gt;&lt;p&gt;Entire database&lt;/p&gt;&lt;p&gt;Tablespace level&lt;/p&gt;&lt;p&gt;Transportable tablespace level&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Create Data Pump Directory at OS level:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ mkdir -p /u01/app/datapump/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Create directory inside the database:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; create directory DATA_PUMP as '/u01/app/datapump/';&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Directory created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Grant permissions on directory to system user:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; GRANT READ,WRITE on directory DATA_PUMP to system;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Grant succeeded.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;View directory information:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; select * from dba_directories where DIRECTORY_NAME='DATA_PUMP';&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OWNER&lt;/div&gt;&lt;div&gt;--------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;DIRECTORY_NAME&lt;/div&gt;&lt;div&gt;--------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;DIRECTORY_PATH&lt;/div&gt;&lt;div&gt;--------------------------------------------------------------------------------&lt;/div&gt;&lt;div&gt;ORIGIN_CON_ID&lt;/div&gt;&lt;div&gt;-------------&lt;/div&gt;&lt;div&gt;SYS&lt;/div&gt;&lt;div&gt;DATA_PUMP&lt;/div&gt;&lt;div&gt;/u01/app/datapump/&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Table Level Export:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 datapump]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES,HR.JOBS dumpfile=HR_JOBS_EMPLOYEES.dump logfile=HR_JOBS_EMPLOYEES.log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES,INFODBA.DEPT1 dumpfile=HR_EMPLOYEES_INFODBA.DEPT1.dump logfile=HR_EMPLOYEESINFODBA.DEPT1.log&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 datapump]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES,INFODBA.DEPT1 dumpfile=HR_EMPLOYEES_INFODBA.DEPT1.dump logfile=HR_EMPLOYEESINFODBA.DEPT1.log PARALLEL=4&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES dumpfile=HR_EMPLOYEESDATA_ONLY.dump logfile=HR_EMPLOYEESDATA_ONLY.log content=DATA_ONLY&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES dumpfile=HR_EMPLOYEESMETADATA_ONL.dump logfile=HR_EMPLOYEESMETADATA_ONL.log content=METADATA_ONLY&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Table Level Import:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log table_exists_action=skip&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES REMAP_TABLE=HR.EMPLOYEES:HR dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES REMAP_SCHEMA=HR:INFODBA dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP tables=HR.EMPLOYEES REMAP_SCHEMA=HR:INFODBA REMAP_TABLE=EMPLOYEES:EMPLOYEES1&amp;nbsp; dumpfile=HR_EMPLOYEES.dump logfile=HR_EMPLOYEES.log&lt;/div&gt;&lt;/div&gt;&lt;div style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Schema Level Export:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP schemas=HR dumpfile=HR.dump logfile=HR.log PARALLEL=4&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP schemas=HR,INFODBA dumpfile=HR_INFODBA.dump logfile=HR_INFODBA.log PARALLEL=4&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP schemas=HR dumpfile=HR_DATA_ONLY.dump logfile=HR_DATA_ONLY.log content=DATA_ONLY&amp;nbsp; PARALLEL=4&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP schemas=HR dumpfile=HR_METADATA_ONLY.dump logfile=HR_METADATA_ONLY.log content=METADATA_ONLY PARALLEL=4&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Schema Level Export:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP dumpfile=HR.dump logfile=HR.log schemas=HR&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP dumpfile=HR.dump logfile=HR.log remap_schema=HR:HR&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP dumpfile=HR.dump logfile=HR.log remap_schema=HR:APP&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Database Level Export:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP FULL=Y dumpfile=PROD_FULL.dump logfile=PROD_FULL.log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Database Level Import:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Import full database&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On source&lt;/div&gt;&lt;div&gt;SQL&amp;gt; select name from v$tablespace;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On target&lt;/div&gt;&lt;div&gt;SQL&amp;gt; select name from v$tablespace;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create missing tablespaces on target&lt;/div&gt;&lt;div&gt;Make sure target tablespace has enough free space&lt;/div&gt;&lt;div&gt;Drop all non-oracle schemas (done during refresh)&lt;/div&gt;&lt;div&gt;DROP USER HR CASCADE;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP FULL=Y dumpfile=PROD_FULL.dump logfile=PROD_FULL.log&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@ora101 datapump]$ impdp system/Manager1 directory=DATA_PUMP FULL=Y dumpfile=PROD_FULL.dump logfile=PROD_FULL.log table_exists_action=skip&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Tablespace Level Export:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼe"&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP TABLESPACES&lt;/span&gt;&lt;span class="ͼ8"&gt;=HR&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;dumpfile=TBS_HR.dump logfile=TBS_HR.log&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;&lt;div&gt;&lt;span class="ͼe"&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP TABLESPACES&lt;/span&gt;&lt;span class="ͼ8"&gt;=HR,MANIT&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;dumpfile=TBS_HR_MANIT.dump logfile=TBS_HR_MANIT.log&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼe"&gt;[oracle@ora101 ~]$ expdp system/Manager1 directory=DATA_PUMP TABLESPACES&lt;/span&gt;&lt;span class="ͼ8"&gt;=HR&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="ͼ8"&gt;dumpfile=TBS_HR.dump logfile=TBS_HR.log&lt;/span&gt;&lt;span class="ͼe"&gt;&amp;nbsp;PARALLEL&lt;/span&gt;&lt;span class="ͼ8"&gt;=&lt;/span&gt;&lt;span class="ͼb"&gt;4&lt;/span&gt; &lt;span class="ͼe"&gt;COMPRESSION&lt;/span&gt;&lt;span class="ͼ8"&gt;=&lt;/span&gt;ALL&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Option&lt;span style="white-space: pre;"&gt;				&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Purpose&lt;/b&gt;&lt;/div&gt;&lt;div&gt;PARALLEL=4&lt;span style="white-space: pre;"&gt;			&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Faster export&lt;/div&gt;&lt;div&gt;COMPRESSION=ALL&lt;span style="white-space: pre;"&gt;			&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Reduce size&lt;/div&gt;&lt;div&gt;EXCLUDE=STATISTICS&lt;span style="white-space: pre;"&gt;		&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Skip stats&lt;/div&gt;&lt;div&gt;FLASHBACK_TIME=SYSTIMESTAMP&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Consistent backup&lt;/div&gt;&lt;div&gt;LOGTIME=ALL&lt;span style="white-space: pre;"&gt;			&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Detailed logs&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Option&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;What Happens&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Use Case&lt;/b&gt;&lt;/div&gt;&lt;div&gt;SKIP&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Ignore table&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Safe runs&lt;/div&gt;&lt;div&gt;APPEND&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Add rows&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Data merge&lt;/div&gt;&lt;div&gt;TRUNCATE&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Delete + reload&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Refresh&lt;/div&gt;&lt;div&gt;REPLACE&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Drop &amp;amp; recreate&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Migration&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Data Pump Export Progress %:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use below query to get the percentage (%) completion of the export process&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SELECT SID, SERIAL#, USERNAME, CONTEXT, SOFAR, TOTALWORK,ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE"FROM V$SESSION_LONGOPS WHERE TOTALWORK != 0 AND SOFAR &amp;lt;&amp;gt; TOTALWORK;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SELECT * FROM dba_datapump_sessions;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SET LINES 200&lt;/div&gt;&lt;div&gt;COL job_name FORMAT A25&lt;/div&gt;&lt;div&gt;COL state FORMAT A12&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SELECT owner_name, job_name, operation, job_mode, state&lt;/div&gt;&lt;div&gt;FROM dba_datapump_jobs;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SELECT sid, serial#, opname,&lt;/div&gt;&lt;div&gt;ROUND(sofar/totalwork*100,2) "%DONE"&lt;/div&gt;&lt;div&gt;FROM v$session_longops&lt;/div&gt;&lt;div&gt;WHERE opname LIKE 'SYS_EXPORT%' OR opname LIKE 'SYS_IMPORT%';&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Oracle Database Tablespace Management </title><link>https://www.msqlserver.in/2026/04/oracle-database-tablespace-management.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 10 Apr 2026 12:27:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-7014033895425031493</guid><description>&lt;p&gt;A tablespace is a logical storage container in Oracle Database used to store database objects such as tables and indexes. Each tablespace consists of one or more physical datafiles where the actual data is stored&lt;/p&gt;&lt;p&gt;We have two types tablespaces in oracle&lt;/p&gt;&lt;p&gt;1) Normal Tablespace&lt;/p&gt;&lt;p&gt;2) Big Tablespace&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Note: Data file MAX size is depends on the data block size.&lt;/p&gt;&lt;p&gt;Normal Tablespace&lt;/p&gt;&lt;p&gt;Block Size&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Max Datafile Size&lt;/p&gt;&lt;p&gt;2 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;8 GB&lt;/p&gt;&lt;p&gt;4 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;16 GB&lt;/p&gt;&lt;p&gt;8 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;32 GB&lt;/p&gt;&lt;p&gt;16 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;64 GB&lt;/p&gt;&lt;p&gt;32 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;128 GB&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Big Tablespace:&lt;/p&gt;&lt;p&gt;Block Size&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Max Datafile Size&lt;/p&gt;&lt;p&gt;8 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;32 TB&lt;/p&gt;&lt;p&gt;16 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;64 TB&lt;/p&gt;&lt;p&gt;32 KB&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;128 TB&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Default Tablespaces:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;SYSTEM:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Stores data dictionary objects&lt;/p&gt;&lt;p&gt;Contains core metadata of the database&lt;/p&gt;&lt;p&gt;Must always be ONLINE&lt;/p&gt;&lt;p&gt;&lt;b&gt;SYSAUX:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Auxiliary tablespace for SYSTEM&lt;/p&gt;&lt;p&gt;Stores components like:&lt;/p&gt;&lt;p&gt;AWR (Automatic Workload Repository)&lt;/p&gt;&lt;p&gt;OEM data&lt;/p&gt;&lt;div&gt;&lt;b&gt;UNDO:&lt;/b&gt;&lt;/div&gt;&lt;p&gt;Stores undo data:&lt;/p&gt;&lt;p&gt;Rollback operations ,Read consistency and Flashback&lt;/p&gt;&lt;p&gt;&lt;b&gt;Users:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Default tablespace for normal users&lt;/p&gt;&lt;p&gt;&lt;b&gt;Temp:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Temporary operations:&lt;/p&gt;&lt;p&gt;Sorting, Joins and Hash operations&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;You’ll deal with three main types:&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;Permanent tablespaces — where actual table/index data lives.&lt;/div&gt;&lt;div&gt;Temporary tablespaces — used for sorts, joins, and other temporary work.&lt;/div&gt;&lt;div&gt;Undo tablespaces — store undo data for rollbacks and read consistency.&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;Tablespace States:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;State&lt;span style="white-space: pre;"&gt;		&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Description&lt;/b&gt;&lt;/p&gt;&lt;p&gt;ONLINE&lt;span style="white-space: pre;"&gt;		&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Accessible&lt;/p&gt;&lt;p&gt;OFFLINE&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Not accessible&lt;/p&gt;&lt;p&gt;READ ONLY&lt;span style="white-space: pre;"&gt;	&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;No changes allowed&lt;/p&gt;&lt;p&gt;READ WRITE&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;Default&lt;/p&gt;&lt;p&gt;&lt;b&gt;To View Tablespace Information:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;v$tablespace&lt;/p&gt;&lt;p&gt;v$datafile&lt;/p&gt;&lt;p&gt;v$tempfile&lt;/p&gt;&lt;p&gt;dba_tablespaces&lt;/p&gt;&lt;p&gt;dba_data_files&lt;/p&gt;&lt;p&gt;dba_temp_files&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Create tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Create tablespace PROD_DATA datafile '/2a/data/oracle12c/SDADS/datafile/PROD_DATA.dbf' size 1G;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Create tablespace with autoextend on:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;CREATE TABLESPACE PROD DATAFILE '/2a/data/oracle12c/SDADS/datafile/PROD.dbf' SIZE 500M AUTOEXTEND ON;&lt;/p&gt;&lt;p&gt;CREATE TABLESPACE PROD_IDATA DATAFILE '/2a/data/oracle12c/SDADS/datafile/PROD_IDATA .dbf' SIZE 500M AUTOEXTEND ON NEXT 50M&lt;/p&gt;&lt;p&gt;MAXSIZE UNLIMITED;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Resize Datafile:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter database datafile '/2a/data/oracle12c/SDADS/datafile/prod1.dbf' resize 300m;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Add a new datafile to&amp;nbsp;existing&amp;nbsp;tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter tablespace PROD add datafile '/2a/data/oracle12c/SDADS/datafile/prod1.dbf' size 20m;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Big Tablespace:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;CREATE BIGFILE TABLESPACE Big_DATA DATAFILE '/2a/data/oracle12c/SDADS/datafile/Big_DATA.dbf' SIZE 5G AUTOEXTEND ON;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Resize Big Tablespace Datafile:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ALTER DATABASE DATAFILE '/2a/data/oracle12c/SDADS/datafile/Big_DATA.dbf'&amp;nbsp;&amp;nbsp;RESIZE 20G;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Enable Autoextend:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;ALTER DATABASE DATAFILE ''2a/data/oracle12c/SDADS/datafile/Big_DATA.dbf'&lt;/div&gt;&lt;div&gt;AUTOEXTEND ON;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;ALTER DATABASE DATAFILE ''2a/data/oracle12c/SDADS/datafile/Big_DATA.dbf'&lt;/div&gt;&lt;div&gt;AUTOEXTEND ON NEXT 1G MAXSIZE 100G;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;Drop Tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Drop a tablespace without removing the physical database files:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;drop tablespace PROD_DATA;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Drop tablespace including the physical datafiles:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Drop tablespace PROD_DATA including contents and datafiles;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Make tablespace Read only:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter tablespace PROD_DATA READ ONLY;&lt;/p&gt;&lt;p&gt;alter tablespace PROD_DATA read write;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Take tablespace offline:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;ALTER TABLESPACE PROD_DATA OFFLINE;&lt;/p&gt;&lt;p&gt;ALTER TABLESPACE PROD_DATA ONLINE;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Create a temporary tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;CREATE TEMPORARY TABLESPACE TEMP1 '/1a/app/oracle/oradata/ORCL/datafile/temp01.dbf' size 1G autoextend on next 200M;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Adding a tempfile:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter tablespace TEMP1 add tempfile '/1a/app/oracle/oradata/ORCL/datafile/temp02.dbf' size 1G autoextend on next 200M;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Resize tempfile:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter database tempfile '/1a/app/oracle/oradata/ORCL/datafile/temp02.dbf' resize 2G;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Drop Temp Tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;select FILE_NAME,FILE_ID,TABLESPACE_NAME,&lt;/p&gt;&lt;p&gt;AUTOEXTENSIBLE,STATUS,maxbytes/1024/1024/1024,BYTES/1024/1024/1024&amp;nbsp;&lt;/p&gt;&lt;p&gt;from dba_temp_files ;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Verify if any active sessions are using the temp files:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT b.tablespace,b.segfile#,b.segblk#,b.blocks,a.sid,a.serial#,&lt;/p&gt;&lt;p&gt;a.username,a.osuser, a.status&lt;/p&gt;&lt;p&gt;FROM v$session a,v$sort_usage b&lt;/p&gt;&lt;p&gt;WHERE a.saddr = b.session_addr;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;If any active sessions using the temp tablespace kill it:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;alter system kill session 'SID_NUMBER, SERIAL#' immediate;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Drop Temp Tablespace:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;ALTER TABLESAPCETEMP drop tempfile '/1a/app/oracle/oradata/ORCL/datafile/temp01.dbf';&lt;/p&gt;&lt;p&gt;ALTER DATABASE TEMPFILE '/1a/app/oracle/oradata/ORCL/datafile/temp02.dbf' DROP INCLUDING DATAFILES;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Tablespaces and Datafiles Info:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT file_name, tablespace_name, bytes/1024/1024 MB&lt;/p&gt;&lt;p&gt;FROM dba_data_files;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;SELECT tablespace_name, bigfile FROM dba_tablespaces WHERE tablespace_name = 'PROD_BIGTS';&lt;/div&gt;&lt;p&gt;select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024,STATUS,AUTOEXTENSIBLE from dba_data_files;&lt;/p&gt;&lt;p&gt;SELECT tablespace_name, ROUND((used_space / tablespace_size) * 100, 2) pct_used&lt;/p&gt;&lt;p&gt;FROM dba_tablespace_usage_metrics;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Tablespace Usage Query:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; df.tablespace_name,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(df.total_mb,2) total_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(fs.free_mb,2) free_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(df.total_mb - fs.free_mb,2) used_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND((df.total_mb - fs.free_mb)/df.total_mb * 100,2) used_pct&lt;/p&gt;&lt;p&gt;FROM&lt;/p&gt;&lt;p&gt;(SELECT tablespace_name, SUM(bytes)/1024/1024 total_mb&lt;/p&gt;&lt;p&gt;&amp;nbsp;FROM dba_data_files&lt;/p&gt;&lt;p&gt;&amp;nbsp;GROUP BY tablespace_name) df,&lt;/p&gt;&lt;p&gt;(SELECT tablespace_name, SUM(bytes)/1024/1024 free_mb&lt;/p&gt;&lt;p&gt;&amp;nbsp;FROM dba_free_space&lt;/p&gt;&lt;p&gt;&amp;nbsp;GROUP BY tablespace_name) fs&lt;/p&gt;&lt;p&gt;WHERE df.tablespace_name = fs.tablespace_name&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;ORDER BY used_pct DESC;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Tablespace Usage Report:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SET LINES 200&lt;/p&gt;&lt;p&gt;SET PAGES 100&lt;/p&gt;&lt;p&gt;COLUMN tablespace_name FORMAT A20&lt;/p&gt;&lt;p&gt;COLUMN total_mb FORMAT 999999&lt;/p&gt;&lt;p&gt;COLUMN used_mb FORMAT 999999&lt;/p&gt;&lt;p&gt;COLUMN free_mb FORMAT 999999&lt;/p&gt;&lt;p&gt;COLUMN pct_used FORMAT 999.99&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SELECT&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; df.tablespace_name,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(df.total_mb) total_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(df.total_mb - fs.free_mb) used_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND(fs.free_mb) free_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ROUND((df.total_mb - fs.free_mb)/df.total_mb * 100, 2) pct_used&lt;/p&gt;&lt;p&gt;FROM&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (SELECT tablespace_name, SUM(bytes)/1024/1024 total_mb&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM dba_data_files&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;GROUP BY tablespace_name) df,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; (SELECT tablespace_name, SUM(bytes)/1024/1024 free_mb&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;FROM dba_free_space&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;GROUP BY tablespace_name) fs&lt;/p&gt;&lt;p&gt;WHERE df.tablespace_name = fs.tablespace_name&lt;/p&gt;&lt;p&gt;ORDER BY pct_used DESC;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;TEMP Tablespace Monitoring:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; tablespace_name,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SUM(bytes_used)/1024/1024 used_mb,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SUM(bytes_free)/1024/1024 free_mb&lt;/p&gt;&lt;p&gt;FROM v$temp_space_header&lt;/p&gt;&lt;p&gt;GROUP BY tablespace_name;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Verify Tablesapce are comsuming above 85%:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT tablespace_name || ' ' || used_percent&amp;nbsp;&lt;/p&gt;&lt;p&gt;FROM dba_tablespace_usage_metrics&amp;nbsp;&lt;/p&gt;&lt;p&gt;WHERE used_percent &amp;gt; 85;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Monitor longest-running transactions with:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT s.sid, s.serial#, t.used_ublk, t.used_urec&lt;/p&gt;&lt;p&gt;FROM v$transaction t, v$session s&lt;/p&gt;&lt;p&gt;WHERE t.ses_addr = s.saddr;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Check usage:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT tablespace_name, SUM(blocks)*8/1024 MB_USED&lt;/p&gt;&lt;p&gt;FROM v$sort_usage&lt;/p&gt;&lt;p&gt;GROUP BY tablespace_name;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Check Overall Usage:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT tablespace_name, ROUND((used_space/tablespace_size)*100, 2) pct_used&lt;/p&gt;&lt;p&gt;FROM dba_tablespace_usage_metrics&lt;/p&gt;&lt;p&gt;ORDER BY pct_used DESC;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Identify Top Space Consumers:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT owner, segment_name, segment_type, bytes/1024/1024 MB&lt;/p&gt;&lt;p&gt;FROM dba_segments&lt;/p&gt;&lt;p&gt;ORDER BY bytes DESC FETCH FIRST 10 ROWS ONLY;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;TEMP Usage by Session:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT s.username, s.sid, u.tablespace, u.blocks*8/1024 AS mb_used&lt;/p&gt;&lt;p&gt;FROM v$sort_usage u, v$session s&lt;/p&gt;&lt;p&gt;WHERE u.session_addr = s.saddr&lt;/p&gt;&lt;p&gt;ORDER BY mb_used DESC;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Enable and Disabling Archive Log Mode In Oracle</title><link>https://www.msqlserver.in/2026/03/enable-and-disabling-archive-log-mode.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Sat, 28 Mar 2026 14:42:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-7939408699195289192</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Checking Archivelog Mode:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; archive log list;&lt;/p&gt;&lt;p&gt;You can also use below command&lt;/p&gt;&lt;p&gt;SQL&amp;gt; SELECT LOG_MODE FROM V$DATABASE;&lt;/p&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Set Archivelog Destination:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You must set a destination for archivelog files&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; alter system set log_archive_dest_1='location=/u01/app/oracle/archivelogs';&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;Enable Archivelog Mode:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; Shut immediate;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; Startup mount;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; alter database archivelog;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; alter database open;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; archive log list;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Disable Archivelog Mode:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; shut immediate;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; startup mount;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; alter database noarchivelog;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; alter database open;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; archive log list;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;How to Estimate Archive Destination Space:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;SELECT A.*,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Round(A.Count#*B.AVG#/1024/1024/1024) Daily_Avg_gb&amp;nbsp;&lt;/p&gt;&lt;p&gt;FROM&amp;nbsp;&lt;/p&gt;&lt;p&gt;(SELECT&amp;nbsp;&lt;/p&gt;&lt;p&gt;To_Char(First_Time,'YYYY-MM-DD') DAY,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Count(1) Count#,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Min(RECID) Min#,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Max(RECID) Max#&amp;nbsp;&lt;/p&gt;&lt;p&gt;FROM v$log_history&amp;nbsp;&lt;/p&gt;&lt;p&gt;GROUP&amp;nbsp;&lt;/p&gt;&lt;p&gt;BY To_Char(First_Time,'YYYY-MM-DD')&amp;nbsp;&lt;/p&gt;&lt;p&gt;ORDER&amp;nbsp;&lt;/p&gt;&lt;p&gt;BY 1&amp;nbsp;&lt;/p&gt;&lt;p&gt;) A,&amp;nbsp;&lt;/p&gt;&lt;p&gt;(SELECT&amp;nbsp;&lt;/p&gt;&lt;p&gt;Avg(BYTES) AVG#,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Count(1) Count#,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Max(BYTES) Max_Bytes,&amp;nbsp;&lt;/p&gt;&lt;p&gt;Min(BYTES) Min_Bytes&amp;nbsp;&lt;/p&gt;&lt;p&gt;FROM&amp;nbsp;&lt;/p&gt;&lt;p&gt;v$log ) B;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>RPO and RTO</title><link>https://www.msqlserver.in/2026/03/rpo-and-rto.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 27 Mar 2026 14:16:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-2279865838547422548</guid><description>&lt;p&gt;&amp;nbsp;RPO ==&amp;gt; Recover point object&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;How much data you can afford to lose&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Measured in time&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Defines backup frequency&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RPO = 15 minutes&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;You can lose max 15 minutes of data&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RTO ==&amp;gt; Recover time object&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;How quickly you must restore the system&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Measured in time&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Defines recovery speed&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RTO = 30 minutes&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;System must be back within 30 minutes&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEiqCR0F8ppsYn7D5EbA8xfW3eGRsb2XstCo5pfig4IqHR4P8fSQu5z6XwH_eHT8mWdgUgvPAWct6eUWBj6gCSI0frFeIes7v8PSiCFnPuDfqGHDlUzQVBz0CYZfnhw3NXJ0JTPSnmdU7D75W8395N8z0ViuihzPr_9JtO1zVCShybOgDhE1G7le3DJbMoLx" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="512" data-original-width="1024" height="200" src="https://blogger.googleusercontent.com/img/a/AVvXsEiqCR0F8ppsYn7D5EbA8xfW3eGRsb2XstCo5pfig4IqHR4P8fSQu5z6XwH_eHT8mWdgUgvPAWct6eUWBj6gCSI0frFeIes7v8PSiCFnPuDfqGHDlUzQVBz0CYZfnhw3NXJ0JTPSnmdU7D75W8395N8z0ViuihzPr_9JtO1zVCShybOgDhE1G7le3DJbMoLx" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEiqCR0F8ppsYn7D5EbA8xfW3eGRsb2XstCo5pfig4IqHR4P8fSQu5z6XwH_eHT8mWdgUgvPAWct6eUWBj6gCSI0frFeIes7v8PSiCFnPuDfqGHDlUzQVBz0CYZfnhw3NXJ0JTPSnmdU7D75W8395N8z0ViuihzPr_9JtO1zVCShybOgDhE1G7le3DJbMoLx=s72-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>PostgreSQL Source Code Installation</title><link>https://www.msqlserver.in/2026/03/postgresql-source-code-installation.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Wed, 11 Mar 2026 21:18:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-480727197368208580</guid><description>&lt;p&gt;&amp;nbsp;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;&lt;b&gt;Build From Source Code:&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;&lt;strong data-end="39" data-start="0"&gt;PostgreSQL Source Code Installation&lt;/strong&gt; means compiling and installing &lt;span class="hover:entity-accent entity-underline inline cursor-pointer align-baseline"&gt;&lt;span class="whitespace-normal"&gt;PostgreSQL&lt;/span&gt;&lt;/span&gt; directly from its source files instead of using prebuilt packages.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;Prerequisite:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Before we install PostgreSQL software/cluster, we need to ensure that we have all the necessary tools and libraries on our system.&lt;/p&gt;&lt;p&gt;We need install software using root user only&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ C Compiler: PostgreSQL is written in C, so a C compiler is a must. Popular choices include GCC (GNU Compiler Collection) and Clang.&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ Build Tools: Ensure you have essential build tools like make and autoconf installed. These tools help in compiling the source code efficiently.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ Libraries: PostgreSQL requires certain libraries like readline and zlib. We need to install these development libraries on our system.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ readline-devel: Provides the necessary libraries for command-line editing and history.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ zlib-devel: Required for compression support.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ gcc: The GNU Compiler Collection needed to compile the PostgreSQL source code.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;○ make: A build tool used to compile and install the software.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;b&gt;Step1)&amp;nbsp;&lt;/b&gt;Install Required Packages&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# sudo dnf groupinstall "Development Tools" -y&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 ~]# yum install readline-devel zlib-devel openssl-devel libxml2-devel libxslt-devel systemd-devel wget tar perl perl-core perl-FindBin -y&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;OR&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# sudo dnf install readline-devel zlib-devel openssl-devel libxml2-devel libxslt-devel systemd-devel wget tar perl perl-core perl-FindBin -y&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# sudo dnf groupinstall "Development Tools" -y&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step2)&amp;nbsp;&lt;/b&gt;Create postgres user and add user to sudoers file&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# adduser postgres&lt;/div&gt;&lt;div&gt;[root@post101 ~]# passwd postgres&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Retype new password:&lt;/div&gt;&lt;div&gt;passwd: all authentication tokens updated successfully.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# vi /etc/sudoers&lt;/div&gt;&lt;div&gt;&lt;div&gt;## Allow root to run any commands anywhere&lt;/div&gt;&lt;div&gt;root&amp;nbsp; &amp;nbsp; ALL=(ALL)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ALL&lt;/div&gt;&lt;div&gt;postgres ALL=(ALL)&amp;nbsp; &amp;nbsp; &amp;nbsp; ALL&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;&lt;b&gt;Step3)&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif" style="font-size: 12pt;"&gt;Download Source Code From&amp;nbsp;&lt;/span&gt;&lt;span face="Aptos, sans-serif"&gt;https://www.postgresql.org/download/&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif"&gt;Download software and copy software using WinSCP&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhj8oPFXdpbZH6-Nlt9N_46CDNuNpBR99t9Lyh04Bxdzn5O-N34hktXqsgA--s7WMGNfLMMDzz60OPEETukmcE67S-EVCSsdRF-DZMoCpLDaIHh-QWibCJIvt9vitD1HvtsGd8APWPrhdV8n6H0QSL9y5OvzmsVT8QZ_CuPajQleVTisj7o6tEpwNEsC75-" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="327" data-original-width="1342" height="97" src="https://blogger.googleusercontent.com/img/a/AVvXsEhj8oPFXdpbZH6-Nlt9N_46CDNuNpBR99t9Lyh04Bxdzn5O-N34hktXqsgA--s7WMGNfLMMDzz60OPEETukmcE67S-EVCSsdRF-DZMoCpLDaIHh-QWibCJIvt9vitD1HvtsGd8APWPrhdV8n6H0QSL9y5OvzmsVT8QZ_CuPajQleVTisj7o6tEpwNEsC75-" width="400" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;OR&lt;/p&gt;&lt;p&gt;&lt;span face="Aptos, sans-serif"&gt;Use below command if we have&amp;nbsp;&lt;/span&gt;internet&amp;nbsp;connection&amp;nbsp;&lt;/p&gt;&lt;p&gt;[root@post101 ~]#&amp;nbsp;&lt;/p&gt;&lt;p&gt;[root@post101 ~]# wget https://ftp.postgresql.org/pub/source/v17.1/postgresql-17.1.tar.gz&lt;/p&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjW6Te9bARHohVRctJ3syRw6lC7u9T3HucW43y5OF3ZPzar58P_hOcACabK5j8E95H6b28FksOwiGsVtIPN6xKRIrMDJDNu-ebLdJttUmQXCfHWwzN0gRtiyu2WXW7QWkJ2vO12EjJXvzm5IDGUOw5DLvRFLVjZIrJvjZk2a2wQ6GkiKmPdFi9EMdT1_0mn" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="205" data-original-width="742" height="110" src="https://blogger.googleusercontent.com/img/a/AVvXsEjW6Te9bARHohVRctJ3syRw6lC7u9T3HucW43y5OF3ZPzar58P_hOcACabK5j8E95H6b28FksOwiGsVtIPN6xKRIrMDJDNu-ebLdJttUmQXCfHWwzN0gRtiyu2WXW7QWkJ2vO12EjJXvzm5IDGUOw5DLvRFLVjZIrJvjZk2a2wQ6GkiKmPdFi9EMdT1_0mn=w400-h110" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;b&gt;Step4)&lt;/b&gt; untar zip file and go to&amp;nbsp;postgresql-17.1&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;[root@post101 ~]# tar -xvzf postgresql-17.1.tar.gz&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhz3Qu6Sgp4QqTUqX0vZbn_CGkCd3WiTMlxhEckP5uLsxw01fxEGCl1VDWIL6_gyfAqX3WFRvD_FaWg3P6e_-g9emQt7wg4OIvoGQ71kWG05rTNRUQ0lAfHczaey5I4iydfMbn3qdrdkZXFnulPo_dU2ELraAwX3nOQBI41GAibc0HlMsVUU_vN-fAZU-Df" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="232" data-original-width="580" height="160" src="https://blogger.googleusercontent.com/img/a/AVvXsEhz3Qu6Sgp4QqTUqX0vZbn_CGkCd3WiTMlxhEckP5uLsxw01fxEGCl1VDWIL6_gyfAqX3WFRvD_FaWg3P6e_-g9emQt7wg4OIvoGQ71kWG05rTNRUQ0lAfHczaey5I4iydfMbn3qdrdkZXFnulPo_dU2ELraAwX3nOQBI41GAibc0HlMsVUU_vN-fAZU-Df=w400-h160" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;div&gt;[root@post101 ~]# cd postgresql-17.1&lt;/div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# ls -lrt&lt;/div&gt;&lt;div&gt;total 820&lt;/div&gt;&lt;div&gt;drwxrwxr-x. 16 root root&amp;nbsp; &amp;nbsp;4096 Nov 12&amp;nbsp; 2024 src&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp; 983 Nov 12&amp;nbsp; 2024 README.md&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp;6484 Nov 12&amp;nbsp; 2024 meson_options.txt&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root 115220 Nov 12&amp;nbsp; 2024 meson.build&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp;1822 Nov 12&amp;nbsp; 2024 Makefile&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp; 277 Nov 12&amp;nbsp; 2024 HISTORY&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp;4176 Nov 12&amp;nbsp; 2024 GNUmakefile.in&lt;/div&gt;&lt;div&gt;drwxrwxr-x.&amp;nbsp; 3 root root&amp;nbsp; &amp;nbsp; &amp;nbsp;87 Nov 12&amp;nbsp; 2024 doc&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp;1192 Nov 12&amp;nbsp; 2024 COPYRIGHT&lt;/div&gt;&lt;div&gt;drwxrwxr-x. 59 root root&amp;nbsp; &amp;nbsp;4096 Nov 12&amp;nbsp; 2024 contrib&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; 88218 Nov 12&amp;nbsp; 2024 configure.ac&lt;/div&gt;&lt;div&gt;-rwxrwxr-x.&amp;nbsp; 1 root root 578504 Nov 12&amp;nbsp; 2024 configure&lt;/div&gt;&lt;div&gt;drwxrwxr-x.&amp;nbsp; 2 root root&amp;nbsp; &amp;nbsp;4096 Nov 12&amp;nbsp; 2024 config&lt;/div&gt;&lt;div&gt;-rw-rw-r--.&amp;nbsp; 1 root root&amp;nbsp; &amp;nbsp; 365 Nov 12&amp;nbsp; 2024 aclocal.m4&lt;/div&gt;&lt;div&gt;[root@post101 postgresql-17.1]#&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjFeUNiE1NYRly5PTv4Lf02fqaGiTMKrbVUs3f5GR_IBUIdFnPU_MrbxIjoJCY-6Klr9d-CcKnPcZ_6ZAHlhWwNgdBMaWIqPPOnCZgA_Xz1iOJU11SYrE-dsJTHZ_w3x4Cxcptm4LVhljCqeuTX_MAdLodEfrK8Fuxr0k5mY7qy0koIldKF3SW5i0MO4LZR" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="282" data-original-width="504" height="224" src="https://blogger.googleusercontent.com/img/a/AVvXsEjFeUNiE1NYRly5PTv4Lf02fqaGiTMKrbVUs3f5GR_IBUIdFnPU_MrbxIjoJCY-6Klr9d-CcKnPcZ_6ZAHlhWwNgdBMaWIqPPOnCZgA_Xz1iOJU11SYrE-dsJTHZ_w3x4Cxcptm4LVhljCqeuTX_MAdLodEfrK8Fuxr0k5mY7qy0koIldKF3SW5i0MO4LZR=w400-h224" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;b&gt;Step5)&lt;/b&gt;&amp;nbsp;Create directory for software binaries installation&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;[root@post101 ~]# mkdir -p /u01/pgsql-17/&lt;/div&gt;&lt;div&gt;[root@post101 ~]# cd /u01/pgsql-17/&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]# ls -lrt&lt;/div&gt;&lt;div&gt;total 0&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]#&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;b&gt;Step6) &lt;/b&gt;./&lt;/span&gt;configure&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="Aptos, sans-serif"&gt;&lt;div&gt;Configure the Build&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This prepares the build environment.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;prefix ==&amp;gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Installation directory&lt;/div&gt;&lt;div&gt;configure ==&amp;gt;&amp;nbsp;Checks OS libraries &amp;amp; prepares compilation&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# ./configure --prefix=/u01/pgsql-17&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;i got the below errors , so can skip by using below command '&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;checking for icu-uc icu-i18n... no&lt;/div&gt;&lt;div&gt;configure: error: ICU library not found&lt;/div&gt;&lt;div&gt;If you have ICU already installed, see config.log for details on the&lt;/div&gt;&lt;div&gt;failure.&amp;nbsp; It is possible the compiler isn't looking in the proper directory.&lt;/div&gt;&lt;div&gt;Use --without-icu to disable ICU support.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# ./configure --prefix=/u01/pgsql-17 --without-icu --without-readline&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This time this got succeed without any erros&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;config.status: creating src/include/pg_config_ext.h&lt;/div&gt;&lt;div&gt;config.status: creating src/interfaces/ecpg/include/ecpg_config.h&lt;/div&gt;&lt;div&gt;config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s&lt;/div&gt;&lt;div&gt;config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c&lt;/div&gt;&lt;div&gt;config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c&lt;/div&gt;&lt;div&gt;config.status: linking src/include/port/linux.h to src/include/pg_config_os.h&lt;/div&gt;&lt;div&gt;config.status: linking src/makefiles/Makefile.linux to src/Makefile.port&lt;/div&gt;&lt;div&gt;[root@post101 postgresql-17.1]#&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;step7)&lt;/b&gt; make (Compile the Source Code)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;This step builds PostgreSQL binaries.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# make&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Steep8)&lt;/b&gt; make install (Install PostgreSQL)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# cd /u01/pgsql-17/&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]# ls -lrt&lt;/div&gt;&lt;div&gt;total 16&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 6 root root 4096 Mar 11 20:42 include&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root 4096 Mar 11 20:43 bin&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 6 root root 4096 Mar 11 20:43 share&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 4 root root 4096 Mar 11 20:43 lib&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]#&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After installation, PostgreSQL will be located at:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;/u01/pgsql-17/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;we can see all executable files on bin location&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 postgresql-17.1]# cd /u01/pgsql-17/&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]# ls -lrt&lt;/div&gt;&lt;div&gt;total 16&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 6 root root 4096 Mar 11 20:42 include&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root 4096 Mar 11 20:43 bin&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 6 root root 4096 Mar 11 20:43 share&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 4 root root 4096 Mar 11 20:43 lib&lt;/div&gt;&lt;div&gt;[root@post101 pgsql-17]# cd bin/&lt;/div&gt;&lt;div&gt;[root@post101 bin]# ls -lrt&lt;/div&gt;&lt;div&gt;total 15360&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root 10154008 Mar 11 20:42 postgres&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; 1083408 Mar 11 20:42 ecpg&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;170704 Mar 11 20:42 initdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;115224 Mar 11 20:42 pg_amcheck&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 49664 Mar 11 20:42 pg_archivecleanup&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;173376 Mar 11 20:42 pg_basebackup&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;114304 Mar 11 20:42 pg_createsubscriber&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;116408 Mar 11 20:42 pg_receivewal&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;116160 Mar 11 20:42 pg_recvlogical&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 85440 Mar 11 20:42 pg_checksums&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;187312 Mar 11 20:42 pg_combinebackup&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 47808 Mar 11 20:42 pg_config&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 66592 Mar 11 20:42 pg_controldata&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 82176 Mar 11 20:42 pg_ctl&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;440376 Mar 11 20:42 pg_dump&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;220784 Mar 11 20:42 pg_restore&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;136528 Mar 11 20:42 pg_dumpall&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 77088 Mar 11 20:42 pg_resetwal&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;169448 Mar 11 20:42 pg_rewind&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 55160 Mar 11 20:42 pg_test_fsync&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 44120 Mar 11 20:42 pg_test_timing&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;189328 Mar 11 20:42 pg_upgrade&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;139072 Mar 11 20:42 pg_verifybackup&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;123536 Mar 11 20:42 pg_waldump&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 76488 Mar 11 20:42 pg_walsummary&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;211344 Mar 11 20:43 pgbench&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp;528168 Mar 11 20:43 psql&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 83648 Mar 11 20:43 createdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 79032 Mar 11 20:43 dropdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 88576 Mar 11 20:43 createuser&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 78968 Mar 11 20:43 dropuser&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 83888 Mar 11 20:43 clusterdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 97744 Mar 11 20:43 vacuumdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 93024 Mar 11 20:43 reindexdb&lt;/div&gt;&lt;div&gt;-rwxr-xr-x. 1 root root&amp;nbsp; &amp;nbsp; 78472 Mar 11 20:43 pg_isready&lt;/div&gt;&lt;div&gt;[root@post101 bin]#&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step8)&lt;/b&gt; Create Data Directory and grant Permissions to postgres user&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 bin]# mkdir -p /u01/pgdata&lt;/div&gt;&lt;div&gt;[root@post101 bin]# cd /u01/pgdata&lt;/div&gt;&lt;div&gt;[root@post101 pgdata]# ls -lrt&lt;/div&gt;&lt;div&gt;total 0&lt;/div&gt;&lt;div&gt;[root@post101 pgdata]#&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 pgdata]# chown -R postgres:postgres /u01/pgdata&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step9)&lt;/b&gt; switch to postgres user&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 pgdata]# su - postgres&lt;/div&gt;&lt;div&gt;[postgres@post101 ~]$ cd /u01/pg&lt;/div&gt;&lt;div&gt;pgdata/&amp;nbsp; &amp;nbsp;pgsql-17/&lt;/div&gt;&lt;div&gt;[postgres@post101 ~]$ cd /u01/pgdata/&lt;/div&gt;&lt;div&gt;[postgres@post101 pgdata]$ pwd&lt;/div&gt;&lt;div&gt;/u01/pgdata&lt;/div&gt;&lt;div&gt;[postgres@post101 pgdata]$ ls -lrt&lt;/div&gt;&lt;div&gt;total 0&lt;/div&gt;&lt;div&gt;[postgres@post101 pgdata]$&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step10)&amp;nbsp;&amp;nbsp;&lt;/b&gt;Initialize Database Cluster&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[postgres@post101 bin]$ /u01/pgsql-17/bin/initdb -D /u01/pgdata&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;The files belonging to this database system will be owned by user "postgres".&lt;/div&gt;&lt;div&gt;This user must also own the server process.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The database cluster will be initialized with locale "en_US.UTF-8".&lt;/div&gt;&lt;div&gt;The default database encoding has accordingly been set to "UTF8".&lt;/div&gt;&lt;div&gt;The default text search configuration will be set to "english".&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Data page checksums are disabled.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;fixing permissions on existing directory /u01/pgdata ... ok&lt;/div&gt;&lt;div&gt;creating subdirectories ... ok&lt;/div&gt;&lt;div&gt;selecting dynamic shared memory implementation ... posix&lt;/div&gt;&lt;div&gt;selecting default "max_connections" ... 100&lt;/div&gt;&lt;div&gt;selecting default "shared_buffers" ... 128MB&lt;/div&gt;&lt;div&gt;selecting default time zone ... Asia/Kolkata&lt;/div&gt;&lt;div&gt;creating configuration files ... ok&lt;/div&gt;&lt;div&gt;running bootstrap script ... ok&lt;/div&gt;&lt;div&gt;performing post-bootstrap initialization ... ok&lt;/div&gt;&lt;div&gt;syncing data to disk ... ok&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;initdb: warning: enabling "trust" authentication for local connections&lt;/div&gt;&lt;div&gt;initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Success. You can now start the database server using:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; /u01/pgsql-17/bin/pg_ctl -D /u01/pgdata -l logfile start&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[postgres@post101 bin]$&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step11)&lt;/b&gt; Start PostgreSQL cluster&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[postgres@post101 bin]$ /u01/pgsql-17/bin/pg_ctl&amp;nbsp; -D /u01/pgdata start&lt;/div&gt;&lt;div&gt;waiting for server to start....2026-03-11 20:56:42.024 IST [9732] LOG:&amp;nbsp; starting PostgreSQL 17.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44.0.3), 64-bit&lt;/div&gt;&lt;div&gt;2026-03-11 20:56:42.035 IST [9732] LOG:&amp;nbsp; listening on IPv6 address "::1%1", port 5432&lt;/div&gt;&lt;div&gt;2026-03-11 20:56:42.035 IST [9732] LOG:&amp;nbsp; listening on IPv4 address "127.0.0.1", port 5432&lt;/div&gt;&lt;div&gt;2026-03-11 20:56:42.417 IST [9732] LOG:&amp;nbsp; listening on Unix socket "/tmp/.s.PGSQL.5432"&lt;/div&gt;&lt;div&gt;2026-03-11 20:56:42.432 IST [9735] LOG:&amp;nbsp; database system was shut down at 2026-03-11 20:54:02 IST&lt;/div&gt;&lt;div&gt;2026-03-11 20:56:42.446 IST [9732] LOG:&amp;nbsp; database system is ready to accept connections&lt;/div&gt;&lt;div&gt;&amp;nbsp;done&lt;/div&gt;&lt;div&gt;server started&lt;/div&gt;&lt;div&gt;[postgres@post101 bin]$&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[postgres@post101 bin]$ ps -ef|grep postgres&lt;/div&gt;&lt;div&gt;root&amp;nbsp; &amp;nbsp; &amp;nbsp; 7357&amp;nbsp; 3458&amp;nbsp; 0 20:51 pts/0&amp;nbsp; &amp;nbsp; 00:00:00 su - postgres&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 7358&amp;nbsp; 7357&amp;nbsp; 0 20:51 pts/0&amp;nbsp; &amp;nbsp; 00:00:00 -bash&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9732&amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 /u01/pgsql-17/bin/postgres -D /u01/pgdata&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9733&amp;nbsp; 9732&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 postgres: checkpointer&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9734&amp;nbsp; 9732&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 postgres: background writer&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9736&amp;nbsp; 9732&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 postgres: walwriter&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9737&amp;nbsp; 9732&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 postgres: autovacuum launcher&lt;/div&gt;&lt;div&gt;postgres&amp;nbsp; 9738&amp;nbsp; 9732&amp;nbsp; 0 20:56 ?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 00:00:00 postgres: logical replication launcher&lt;/div&gt;&lt;div&gt;postgres 10878&amp;nbsp; 7358 99 20:59 pts/0&amp;nbsp; &amp;nbsp; 00:00:00 ps -ef&lt;/div&gt;&lt;div&gt;postgres 10879&amp;nbsp; 7358&amp;nbsp; 0 20:59 pts/0&amp;nbsp; &amp;nbsp; 00:00:00 grep --color=auto postgres&lt;/div&gt;&lt;div&gt;[postgres@post101 bin]$&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step12)&lt;/b&gt; Set&amp;nbsp;Environment Variables&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[postgres@post101 ~]$ vi .bash_profile&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;export PATH=$PATH:/u01/pgsql-17/bin&lt;/div&gt;&lt;div&gt;export PGDATA=/u01/pgdata&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[postgres@post101 ~]$ . .bash_profile&lt;/div&gt;&lt;div&gt;[postgres@post101 ~]$ source .bash_profile&lt;/div&gt;&lt;div&gt;[postgres@post101 ~]$ psql&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;psql (17.1)&lt;/div&gt;&lt;div&gt;Type "help" for help.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;postgres=# \l&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List of databases&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;Name&amp;nbsp; &amp;nbsp; |&amp;nbsp; Owner&amp;nbsp; &amp;nbsp;| Encoding | Locale Provider |&amp;nbsp; &amp;nbsp;Collate&amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; Ctype&amp;nbsp; &amp;nbsp; | Locale | ICU&lt;/div&gt;&lt;div&gt;Rules |&amp;nbsp; &amp;nbsp;Access privileges&lt;/div&gt;&lt;div&gt;-----------+----------+----------+-----------------+-------------+-------------+--------+-----&lt;/div&gt;&lt;div&gt;------+-----------------------&lt;/div&gt;&lt;div&gt;&amp;nbsp;postgres&amp;nbsp; | postgres | UTF8&amp;nbsp; &amp;nbsp; &amp;nbsp;| libc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | en_US.UTF-8 | en_US.UTF-8 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp;template0 | postgres | UTF8&amp;nbsp; &amp;nbsp; &amp;nbsp;| libc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | en_US.UTF-8 | en_US.UTF-8 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; | =c/postgres&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; | postgres=CTc/postgres&lt;/div&gt;&lt;div&gt;&amp;nbsp;template1 | postgres | UTF8&amp;nbsp; &amp;nbsp; &amp;nbsp;| libc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | en_US.UTF-8 | en_US.UTF-8 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; | =c/postgres&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; | postgres=CTc/postgres&lt;/div&gt;&lt;div&gt;(3 rows)&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step13) How to start postgres services auto start whenever server rebooted/shutdown&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Switch to root user&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[postgres@post101 ~]$ su -&lt;/div&gt;&lt;div&gt;Password:&lt;/div&gt;&lt;div&gt;Last login: Wed Mar 11 19:59:13 IST 2026 from 2406:7400:9a:e591:fc9d:9082:d6a7:20c1 on pts/0&lt;/div&gt;&lt;div&gt;[root@post101 ~]#&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[root@post101 ~]# cd /etc/rc.d&lt;/div&gt;&lt;div&gt;[root@post101 rc.d]# ls -lrt&lt;/div&gt;&lt;div&gt;total 8&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc6.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc5.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc4.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc3.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc2.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc1.d&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root&amp;nbsp; &amp;nbsp;61 Jun 12&amp;nbsp; 2024 rc0.d&lt;/div&gt;&lt;div&gt;-rw-r--r--. 1 root root&amp;nbsp; 473 Oct 10&amp;nbsp; 2024 rc.local&lt;/div&gt;&lt;div&gt;drwxr-xr-x. 2 root root 4096 Feb&amp;nbsp; 6 17:55 init.d&lt;/div&gt;&lt;div&gt;[root@post101 rc.d]# vi rc.local&lt;/div&gt;&lt;div&gt;[root@post101 rc.d]# cat rc.local&lt;/div&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;div&gt;# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# It is highly advisable to create own systemd services or udev rules&lt;/div&gt;&lt;div&gt;# to run scripts during boot instead of using this file.&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# In contrast to previous versions due to parallel execution during boot&lt;/div&gt;&lt;div&gt;# this script will NOT be run after all other services.&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure&lt;/div&gt;&lt;div&gt;# that this script will be executed during boot.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;touch /var/lock/subsys/local&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;su - postgres -c 'pg_ctl -D $PGDATA start'&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[root@post101 rc.d]#&lt;/div&gt;&lt;/div&gt;&lt;div&gt;[root@post101 rc.d]# chmod +x /etc/rc.d/rc.local&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEhj8oPFXdpbZH6-Nlt9N_46CDNuNpBR99t9Lyh04Bxdzn5O-N34hktXqsgA--s7WMGNfLMMDzz60OPEETukmcE67S-EVCSsdRF-DZMoCpLDaIHh-QWibCJIvt9vitD1HvtsGd8APWPrhdV8n6H0QSL9y5OvzmsVT8QZ_CuPajQleVTisj7o6tEpwNEsC75-=s72-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>RMAN Backup scripts ( Full, Level 0 and Level 1 Incremental )</title><link>https://www.msqlserver.in/2026/03/rman-backup-scripts-full-level-0-and.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Mon, 9 Mar 2026 17:32:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-1632983083370573307</guid><description>&lt;p&gt;Oracle Database, Recovery Manager (RMAN) backups are mainly of two types:&lt;/p&gt;&lt;p&gt;Full Backup and Incremental Backup (Level 0, Level 1).&lt;/p&gt;&lt;p&gt;Level 1 can be Differential or Cumulative.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;RMAN Full Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A Full Backup copies all blocks of the database datafiles, regardless of whether they changed or not.&lt;/p&gt;&lt;p&gt;Backs up entire database&lt;/p&gt;&lt;p&gt;Includes used + unused blocks&lt;/p&gt;&lt;p&gt;Does not act as a base for incremental backups&lt;/p&gt;&lt;p&gt;Larger backup size&lt;/p&gt;&lt;p&gt;Syntax&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup database; ## FRA Location&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Backup database plus archivelog;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup database format ='&lt;/span&gt;&lt;/span&gt;/backup/rman/Bak_%d_%T_%U.bkp'&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;Backup database format ='/backup/rman/Bak_%d_%T_%U.bkp'&amp;nbsp;plus archivelog format ='/backup/rman/Arch_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;RMAN Incremental Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Incremental backups copy only changed blocks since a previous backup.&lt;/p&gt;&lt;p&gt;Two levels of backups&lt;/p&gt;&lt;p&gt;Level 0&lt;/p&gt;&lt;p&gt;Level 1&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Level 0 Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A Level 0 backup is the base backup for incremental strategy.&lt;/p&gt;&lt;p&gt;Copies all used blocks&lt;/p&gt;&lt;p&gt;Acts as base for Level 1 backups&lt;/p&gt;&lt;p&gt;Similar to full backup but supports incremental chain&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 0 DATABASE;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 0 DATABASE format ='/backup/rman/Bak_L0_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Level 0 = foundation backup&lt;/p&gt;&lt;p&gt;Level 1 Backup&lt;/p&gt;&lt;p&gt;Level 1 backs up only blocks changed since the Level 0 backup or previous Level 1 backup.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Two types exist:&lt;/p&gt;&lt;p&gt;Differential&lt;/p&gt;&lt;p&gt;Cumulative&lt;/p&gt;&lt;p&gt;Level 1 Differential Backup&lt;/p&gt;&lt;p&gt;Backs up blocks changed since the last incremental backup (Level 0 or Level 1).&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 1 DATABASE;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 1 DATABASE format ='/backup/rman/Bak_L0_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Level 0 (Sunday)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Mon)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Tue)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Wed)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Thu)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Fri)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Differential (Sat)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Level 1 Cumulative Backup&lt;/p&gt;&lt;p&gt;Backs up all blocks changed since the last Level 0 backup.&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; BACKUP INCREMENTAL LEVEL 1 CUMULATIVE&amp;nbsp;&amp;nbsp;DATABASE format ='/backup/rman/Bak_L0_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Level 0 (Sunday)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Mon -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Tue -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Wed -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Thu -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Fri -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;|---- Level 1 Cum (Sat -Changes from since Sun)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Backup Archive Log&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; Backup archivelog all;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; Backup archivelog all format='/backup/rman/Arch_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Crontab Schedule :&lt;/b&gt;&lt;/p&gt;&lt;p&gt;crontab -e&lt;/p&gt;&lt;p&gt;# Sunday Level 0 Backup at 2 AM&lt;/p&gt;&lt;p&gt;0 2 * * 0 /u01/scripts/rman_level0.sh &amp;gt;&amp;gt; /u01/scripts/logs/l0_backup.log 2&amp;gt;&amp;amp;1&lt;/p&gt;&lt;p&gt;# Monday–Saturday Level 1 Cumulative Backup at 2 AM&lt;/p&gt;&lt;p&gt;0 2 * * 1-6 /u01/scripts/rman_level1_cum.sh &amp;gt;&amp;gt; /u01/scripts/logs/l1_cum_backup.log 2&amp;gt;&amp;amp;1&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;#Sunday – Level 0 Backup Script&lt;/p&gt;&lt;p&gt;#!/bin/bash&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;export ORACLE_SID=PROD&lt;/p&gt;&lt;p&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1&lt;/p&gt;&lt;p&gt;export PATH=$ORACLE_HOME/bin:$PATH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;rman target / &amp;lt;&amp;lt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RUN {&lt;/p&gt;&lt;p&gt;ALLOCATE CHANNEL c1 DEVICE TYPE DISK;&lt;/p&gt;&lt;p&gt;BACKUP INCREMENTAL LEVEL 0 DATABASE TAG 'WEEKLY_SUN_L0';&lt;/p&gt;&lt;p&gt;BACKUP ARCHIVELOG ALL DELETE INPUT;&lt;/p&gt;&lt;p&gt;RELEASE CHANNEL c1;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EXIT;&lt;/p&gt;&lt;p&gt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;# Weekdays – Level 1 Differential Script&lt;/p&gt;&lt;p&gt;#!/bin/bash&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;export ORACLE_SID=PROD&lt;/p&gt;&lt;p&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1&lt;/p&gt;&lt;p&gt;export PATH=$ORACLE_HOME/bin:$PATH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;rman target / &amp;lt;&amp;lt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RUN {&lt;/p&gt;&lt;p&gt;ALLOCATE CHANNEL c1 DEVICE TYPE DISK;&lt;/p&gt;&lt;p&gt;BACKUP INCREMENTAL LEVEL 1 DATABASE TAG 'DAILY_L1';&lt;/p&gt;&lt;p&gt;BACKUP ARCHIVELOG ALL DELETE INPUT;&lt;/p&gt;&lt;p&gt;RELEASE CHANNEL c1;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EXIT;&lt;/p&gt;&lt;p&gt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Sunday Level 0 RMAN Script&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;#!/bin/bash&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;export ORACLE_SID=PRODDB&lt;/p&gt;&lt;p&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1&lt;/p&gt;&lt;p&gt;export PATH=$ORACLE_HOME/bin:$PATH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;rman target / &amp;lt;&amp;lt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RUN {&lt;/p&gt;&lt;p&gt;ALLOCATE CHANNEL c1 DEVICE TYPE DISK;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BACKUP INCREMENTAL LEVEL 0 DATABASE&lt;/p&gt;&lt;p&gt;TAG 'WEEKLY_L0'&lt;/p&gt;&lt;p&gt;FORMAT '/backup/rman/L0_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BACKUP ARCHIVELOG ALL DELETE INPUT;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RELEASE CHANNEL c1;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EXIT;&lt;/p&gt;&lt;p&gt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;#Weekdays Level 1 Cumulative Script&lt;/p&gt;&lt;p&gt;# %d = Database, %T = Date Time and %U= 8 number&amp;nbsp;&lt;/p&gt;&lt;p&gt;#!/bin/bash&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;export ORACLE_SID=PROD&lt;/p&gt;&lt;p&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1&lt;/p&gt;&lt;p&gt;export PATH=$ORACLE_HOME/bin:$PATH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;rman target / &amp;lt;&amp;lt;EOF&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RUN {&lt;/p&gt;&lt;p&gt;ALLOCATE CHANNEL c1 DEVICE TYPE DISK;&lt;/p&gt;&lt;p&gt;BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE&lt;/p&gt;&lt;p&gt;TAG 'DAILY_L1_CUM'&lt;/p&gt;&lt;p&gt;FORMAT '/backup/rman/L1C_%d_%T_%U.bkp';&lt;/p&gt;&lt;p&gt;BACKUP ARCHIVELOG ALL DELETE INPUT;&lt;/p&gt;&lt;p&gt;RELEASE CHANNEL c1;&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;p&gt;EXIT;&lt;/p&gt;&lt;p&gt;EOF&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;### Script&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;export ORACLE_SID=PROD&lt;/p&gt;&lt;p&gt;export ORACLE_HOME=/u01/app/oracle/product/19c/dbhome_1&lt;/p&gt;&lt;p&gt;export PATH=$ORACLE_HOME/bin:$PATH&lt;/p&gt;&lt;p&gt;rman target / &amp;lt;&amp;lt;EOF&lt;/p&gt;&lt;/div&gt;&lt;div&gt;run&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;Allocate channel ch1 device type disk;&lt;/div&gt;&lt;div&gt;allocate channel ch2 device type disk;&lt;/div&gt;&lt;div&gt;crosscheck backup;&lt;/div&gt;&lt;div&gt;delete noprompt expired backup;&lt;/div&gt;&lt;div&gt;crosscheck archivelog all;&lt;/div&gt;&lt;div&gt;delete noprompt archivelog all completed before 'SYSDATE -7';&amp;nbsp;&lt;/div&gt;&lt;div&gt;backup as backupset format='/u01/app/data/PROD/Backup_%T_%d_%U'&lt;/div&gt;&lt;div&gt;plus archivelog format ='/u01/app/data/PROD/Archive_%T_%d_%U';&lt;/div&gt;&lt;div&gt;backup current controlfile format='/u01/app/data/PROD/controlfile_%F';&lt;/div&gt;&lt;div&gt;release channel ch1;&lt;/div&gt;&lt;div&gt;release channel ch2;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;quit;&lt;/div&gt;&lt;div&gt;EOF&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>RMAN Settings/Configuration Parameters</title><link>https://www.msqlserver.in/2026/03/rman-settingsconfiguration-parameters.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Mon, 9 Mar 2026 12:31:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-5689764484903910173</guid><description>&lt;p&gt;[oracle@ORA-TEST301 ~]$ rman target /&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; show all;&lt;/p&gt;&lt;p&gt;using target database control file instead of recovery catalog&lt;/p&gt;&lt;p&gt;RMAN configuration parameters for database with db_unique_name TEST are:&lt;/p&gt;&lt;p&gt;CONFIGURE RETENTION POLICY TO REDUNDANCY 1;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;CONFIGURE RETENTION POLICY TO Redundancy 7; ## Number of backup files&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;CONFIGURE RETENTION POLICY TO Recovery window 7 days; ## Number of days backup files&lt;/p&gt;&lt;p&gt;CONFIGURE BACKUP OPTIMIZATION OFF; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;CONFIGURE BACKUP OPTIMIZATION ON;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Read only tablespace and data files not backup.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;Defines where backups are stored Disk or Tape/SBT &lt;/p&gt;&lt;p&gt;CONFIGURE CONTROLFILE AUTOBACKUP ON;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;Automatically backs up the control file and SPFILE after backup operations.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Full backup,Level0 , Level 1. Archive log backup and data file backup&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/2c/data/oracle12c/rman_bkup/SDADS/%F';&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;%F 12 character alph numaric&amp;nbsp;&lt;/p&gt;&lt;p&gt;CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;How many backup streams run simultaneously.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;RMAN uses 4 channels&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Backup runs faster because multiple files are backed up in parallel.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;CONFIGURE DEVICE TYPE DISK PARALLELISM 4;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup Types&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup of copy ==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;An Image Copy is an exact byte-to-byte copy of a datafile.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup as copy database;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup sets ==&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;RMAN stores backups in &lt;strong data-end="411" data-start="384"&gt;compressed binary files&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup as bakupset database;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;/p&gt;&lt;p&gt;CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default&lt;/p&gt;&lt;p&gt;CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT&amp;nbsp; &amp;nbsp;'/2c/data/oracle12c/rman_bkup/TEST/bkup_%U';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; Backup file naming convention.&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;%d&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;database name&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%U&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;unique backup identifier&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;%T&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;date&lt;/p&gt;&lt;p&gt;CONFIGURE MAXSETSIZE TO UNLIMITED; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Only for backup sets&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; If we keep MAXSETSIZE to 100GB if your database size is 300GB it will take 3 backup files&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE ENCRYPTION FOR DATABASE OFF; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup will be encryption&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;Default AES125 Backup algorithm, we need to enable TDE&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Backup size will be reduced&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; Default is Basic but we have Low , Medium and High&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; How many days RMAN Backup information we have to keep on control file&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; List backup;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; NONE means anyone can delete Archive log files on OS level&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; If we have Standby server, if we keep NONE Primary and DR will go out of sync&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;&lt;/p&gt;&lt;p&gt;CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/2c/data/oracle12c/rman_bkup/TEST/snapcf_TEST.f';&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp; &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;During backup:&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Datafiles are being backed up&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Control file records are constantly updating&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Archivelogs are generated&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server Always ON Readbale Secondary Options </title><link>https://www.msqlserver.in/2026/03/sql-server-always-on-readbale-secondary.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 6 Mar 2026 22:37:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-5115569074561673582</guid><description>&lt;p&gt;&amp;nbsp;Always ON Readbale Secondary Options&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td data-col-size="sm" data-end="403" data-start="394"&gt;&lt;strong data-end="402" data-start="396"&gt;NO&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td data-col-size="lg" data-end="488" data-start="403"&gt;Secondary replica &lt;strong data-end="461" data-start="423"&gt;cannot accept any read connections&lt;/strong&gt;. Only used for failover.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Yes&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Secondary replica &lt;strong data-end="551" data-start="519"&gt;accepts all read connections&lt;/strong&gt; (even if the connection string does not specify read-intent).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;READ_INTENT_ONLY&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Secondary replica &lt;strong data-end="740" data-start="659"&gt;accepts connections only if the client specifies &lt;code data-end="738" data-start="710"&gt;ApplicationIntent=ReadOnly&lt;/code&gt;&lt;/strong&gt; in the connection string.&lt;br /&gt;&lt;br /&gt;Server=AOAGListener;&lt;br /&gt;Database=DB;&lt;br /&gt;ApplicationIntent=ReadOnly;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to validate the Backups in SQL server</title><link>https://www.msqlserver.in/2026/03/how-to-validate-backups-in-sql-server.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 6 Mar 2026 15:03:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-4290078193354435980</guid><description>&lt;p&gt;&amp;nbsp;How to checks whether the SQL backup file is structurally valid and readable.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1) RESTORE VERIFYONLY&lt;/p&gt;&lt;p&gt;2) RESTORE HEADERONLY&lt;/p&gt;&lt;p&gt;3) RESTORE FILELISTONLY&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RESTORE VERIFYONLY&lt;/p&gt;&lt;p&gt;FROM DISK = 'D:\SQLData\Backup\DBA_FULL.bak';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RESTORE HEADERONLY&lt;/p&gt;&lt;p&gt;FROM DISK = 'D:\SQLData\Backup\DBA_FULL.bak';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;RESTORE FILElistonly&lt;/p&gt;&lt;p&gt;FROM DISK = 'D:\SQLData\Backup\DBA_FULL.bak';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>PostgreSQL Architecture </title><link>https://www.msqlserver.in/2026/03/postgresql-architecture.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Wed, 4 Mar 2026 12:59:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-3576312474796149075</guid><description>&lt;p&gt;PostgreSQL Cluster / Instance is combination of Memory and Background process, cluster is nothing but collection / Group of databases managed by single instance of the PostgreSQL cluster&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjcwjD8qa-vdmZ3dk9OF9J0xH4BzTLHyW9n2bHuL2qIoo--Zyn43cuEjm-Q6PRx2ZlsWo9oE_dB0V4X8clbZtZEguTLENI2B7hHbj2s_xt3HWkG2VdWwtIRHIGeTn2w7e_fjTLlQY6L3jtpizF1h3nZODX_pzE05UQk93tY_nMWfWbAM71-aX1yA9XVYs0z" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="556" data-original-width="975" height="365" src="https://blogger.googleusercontent.com/img/a/AVvXsEjcwjD8qa-vdmZ3dk9OF9J0xH4BzTLHyW9n2bHuL2qIoo--Zyn43cuEjm-Q6PRx2ZlsWo9oE_dB0V4X8clbZtZEguTLENI2B7hHbj2s_xt3HWkG2VdWwtIRHIGeTn2w7e_fjTLlQY6L3jtpizF1h3nZODX_pzE05UQk93tY_nMWfWbAM71-aX1yA9XVYs0z" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Memory Components&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Shared Memory&amp;nbsp;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Shared Buffer&lt;/b&gt; ==&amp;gt; This is the primary cache of PostgreSQL, where data blocks writes/reads from the disk.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;WAL Buffer&lt;/b&gt; ==&amp;gt; Buffer for Write ahead logging (WAL) data before it is written to disk.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;CLOG Buffer &lt;/b&gt;==&amp;gt; Store commit log information to manage transaction states&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Temp Buffers &lt;/b&gt;==&amp;gt; Used for storing temporary tables. Default&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;8MB&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Work Memory &lt;/b&gt;==&amp;gt; Used for sorting operations , Bitmap operation, hash join and merge join operations. Default 4&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;MB&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Maintenance Work Memory&lt;/b&gt; ==&amp;gt; Used for vacuum and index operations. Default 64MB&lt;/p&gt;&lt;p&gt;&lt;b&gt;Catalog Cache and Execution Memory&lt;/b&gt; ==&amp;gt; Memory used for caching system catalogs and &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;executing SQL queries&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Backend Process&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Postmaster Process&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; When we start PostgreSQL cluster ,the postmaster process is the first to initialize&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;b&gt;&amp;nbsp; Responsibilities of Postmaster&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;Accepting incoming connection&amp;nbsp;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; Forks new backend process&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; Starts background process&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; Handles server restart and crash recovery&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;BG Writer&lt;/b&gt; ==&amp;gt; Periodically Writes Dirty buffers/pages from shared buffer to the disk&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;WAL Writer &lt;/b&gt;==&amp;gt; Writes contents of the WAL buffers to WAL files&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Checkpoint&lt;/b&gt; ==&amp;gt; Writes dirty buffers to disk when a checkpoint occurs , this reduces the recovery time after a crash.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;Stats Collector&lt;/b&gt; ==&amp;gt; Collect DBMS usage statistics information such as session activity information(pg_stat_activity) and table usage statistics information (pg_stat_all_tables)&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;Gathers and maintains statistical data about the database, which the query planner uses to optimize query execution plans&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Archiver &lt;/b&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;==&amp;gt; When in archive log mode , copies the WAL files to the archive log location&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Sys Logger&amp;nbsp;&lt;/b&gt; ==&amp;gt; Logs error messages and a variety of information to log files&lt;/p&gt;&lt;p&gt;&lt;b&gt;Auto vacuum Launcher&lt;/b&gt; ==&amp;gt; Fork the auto vacuum worker when vacuum is required(Automatically reclaims storage occupied by dead tuples( Rows that have updated or deleted), to prevent table bloat and maintains query performance.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Logical Replication Launcher &lt;/b&gt;==&amp;gt; Manages the logical replication workers that handle replication of changes to other databases.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;WAL Sender&amp;nbsp; ==&amp;gt; &lt;/b&gt;Sending WAL records to standby servers, runs on the primary server&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;b&gt;WAL Receiver ==&amp;gt; &lt;/b&gt;Receive WAL records and apply on standby server , runs on the standby server&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEjcwjD8qa-vdmZ3dk9OF9J0xH4BzTLHyW9n2bHuL2qIoo--Zyn43cuEjm-Q6PRx2ZlsWo9oE_dB0V4X8clbZtZEguTLENI2B7hHbj2s_xt3HWkG2VdWwtIRHIGeTn2w7e_fjTLlQY6L3jtpizF1h3nZODX_pzE05UQk93tY_nMWfWbAM71-aX1yA9XVYs0z=s72-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title> RMAN Expired and Obsolete Backups</title><link>https://www.msqlserver.in/2026/02/rman-expired-and-obsolete-backups.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 27 Feb 2026 21:10:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-5864677482914163558</guid><description>&lt;p&gt;&amp;nbsp;RMAN Expired and Obsolete Backups&lt;/p&gt;&lt;p&gt;&lt;b&gt;Expired Backups:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Backup set or backup pieces are deleted on OS Level, Database control file have backup details on disk but OS level files are not available.&lt;/p&gt;&lt;p&gt;Action:&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; crosscheck backup;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; delete expired backup;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Obsolete Backups:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The general meaning of OBSOLETE is no longer used or required for recovery.&lt;/p&gt;&lt;p&gt;RMAN considers backups as OBSOLETE when they are no longer required for database recovery.This is done by one of the RMAN CONFIGURATION parameters.&lt;/p&gt;&lt;p&gt;Action:&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; report obsolete;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&lt;/p&gt;&lt;p&gt;RMAN&amp;gt; delete obsolete;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>RMAN Backups Methodology Full and Incremental </title><link>https://www.msqlserver.in/2026/02/rman-backups-methodology-full-and.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Thu, 26 Feb 2026 12:18:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-7501460969121583918</guid><description>&lt;p&gt;RMAN provides multiple backup types, but the most commonly used in production environments are Full backups and Incremental backups. Understanding their differences helps DBAs design efficient backup strategies that optimize storage, speed, and recovery time.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;1. Full Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;A Full Backup (or Level 0 backup) is a complete backup of the entire database.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Key Characteristics&lt;/p&gt;&lt;p&gt;Backs up all data blocks, regardless of whether they changed.&lt;/p&gt;&lt;p&gt;Forms the baseline for incremental backup strategies.&lt;/p&gt;&lt;p&gt;Larger in size than incremental backups.&lt;/p&gt;&lt;p&gt;Takes more time and requires more storage.&lt;/p&gt;&lt;p&gt;Recovery is straightforward—restore full backup + apply archived logs.&lt;/p&gt;&lt;p&gt;&lt;b&gt;2. Incremental Backups&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Incremental backups only capture blocks that have changed since a previous L0 backup.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;RMAN supports two types:&lt;/p&gt;&lt;p&gt;Differential Incremental Backup (Level 1 Differential)&lt;/p&gt;&lt;p&gt;Cumulative Incremental Backup (Level 1 Cumulative)&lt;/p&gt;&lt;p&gt;Both rely on a Level L0 full backup as a baseline.&lt;/p&gt;&lt;p&gt;&lt;b&gt;2.1. Differential Incremental Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;A Differential Level 1 backup captures all blocks changed since the last backup (Level 0 or Level 1).&lt;/p&gt;&lt;p&gt;Key Characteristics&lt;/p&gt;&lt;p&gt;Smaller and faster than full backups.&lt;/p&gt;&lt;p&gt;Captures daily changes.&lt;/p&gt;&lt;p&gt;During recovery, RMAN may use multiple Level 1 backups.&lt;/p&gt;&lt;p&gt;When it comes to recovery we need L0 Backup and all L1 backups including Archive logs need to be apply.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;2.2. Cumulative Incremental Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;A Cumulative Level 1 backup captures all blocks changed since the last Level 0.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Key Characteristics&lt;/p&gt;&lt;p&gt;Slightly larger than differential backups.&lt;/p&gt;&lt;p&gt;Faster recovery (fewer incremental files to apply).&lt;/p&gt;&lt;p&gt;Preferred for large, mission-critical systems.&lt;/p&gt;&lt;p&gt;When it comes to recovery we need L0 and recent L1 Cumulative backup including Archive logs need to be apply.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEi9GcLgPvJ4DdT9tpOtWoO6UZ25s2DJcast9WgA5GP39eY3bDrL8OBJqg7fCPxC2xgCDxmbe535FL6X2TgG_v5R3wgTLb2MC_q-izVex_daQx35paucjqVlzQTFpHd298Pf9t_Kakt6D4j8LxeXa4DXEHfL2nL_G1zKF7b4dPR53W7gkdc7c5_GB46aC5Bq" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="298" data-original-width="719" height="266" src="https://blogger.googleusercontent.com/img/a/AVvXsEi9GcLgPvJ4DdT9tpOtWoO6UZ25s2DJcast9WgA5GP39eY3bDrL8OBJqg7fCPxC2xgCDxmbe535FL6X2TgG_v5R3wgTLb2MC_q-izVex_daQx35paucjqVlzQTFpHd298Pf9t_Kakt6D4j8LxeXa4DXEHfL2nL_G1zKF7b4dPR53W7gkdc7c5_GB46aC5Bq=w640-h266" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEi9GcLgPvJ4DdT9tpOtWoO6UZ25s2DJcast9WgA5GP39eY3bDrL8OBJqg7fCPxC2xgCDxmbe535FL6X2TgG_v5R3wgTLb2MC_q-izVex_daQx35paucjqVlzQTFpHd298Pf9t_Kakt6D4j8LxeXa4DXEHfL2nL_G1zKF7b4dPR53W7gkdc7c5_GB46aC5Bq=s72-w640-h266-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Understanding RMAN ( Recovery Manager) and Backups</title><link>https://www.msqlserver.in/2026/02/understanding-rman-recovery-manager-and.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Thu, 26 Feb 2026 11:55:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-1680830503376335063</guid><description>&lt;p&gt;&amp;nbsp;&lt;b&gt;RMAN Key Points:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- RMAN (Recovery Manager)&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Oracle Database backup and recovery automation&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- It Introduced in Oracle 8i version&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- It performs block level backup&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Parallelism&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Detecting corruption in datafiles&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-&lt;span&gt;&amp;nbsp;&lt;/span&gt;Validating the backup&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Incremental Backup&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Recovery Catalog etc&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;-&amp;nbsp;Multi Destination Backups&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;- Archive log mode is must to use RMAN&lt;/p&gt;&lt;div&gt;RMAN is faster because it takes block level backups.&lt;/div&gt;&lt;div&gt;&lt;div&gt;RMAN is faster because we can initiate parallel processes.&lt;/div&gt;&lt;div&gt;RMAN will data block corruptions and repair it for you.&lt;/div&gt;&lt;div&gt;RMAN stores backup metadata information in the database control file, you can also store the information into deferent database on different server which is called as RECOVERY catalog&lt;/div&gt;&lt;div&gt;RMAN Incremental Recovery&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Level 0 - Full database backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Level 1 - Backup of only changed blocks taken by referring data block header for updated SCN&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; -&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp; &lt;/span&gt;- As per recovery, we must only restore the database from level 0 and recovery the Database using level 1. When you try to take level 1 backup, RMAN checks if already you have level 0 backup or not. If not then it will take level 0 backup automatically.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Recovery is of two parts:&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Restore and Recover - We cannot perform recovery without restore. Hence Level 0 is used for restore and level 1 is used for recovery.&lt;/div&gt;&lt;div&gt;RMAN configuration Items&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - show all;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;RMAN Utility:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN utility comes with Oracle Binaries&lt;/div&gt;&lt;div&gt;No special installation or license required for using RMAN&lt;/div&gt;&lt;div&gt;At command prompt just type rman&lt;/div&gt;&lt;div&gt;It defaults connects to database environmental variables defined&lt;/div&gt;&lt;div&gt;RMAN utility can be used only when your DB is in at least MOUNT stage&lt;/div&gt;&lt;div&gt;RMAN is used while the DB is up and running and have very little performance impact if the backup is running&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;RMAN Backup Methodology:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;- Full Backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Entire Database backup plus archive logs&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Cannot apply Incremental backup on full backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;- Incremental Backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Level 0 - FULL Database backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Level 1 - Backup changes only from last incremental backup&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;- Differential Backup&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;- Cumulative Backup&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Components of RMAN:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; - RMAN Prompt&lt;/div&gt;&lt;div&gt;&amp;nbsp; - Target Database&lt;/div&gt;&lt;div&gt;&amp;nbsp; - Recovery Catalog&lt;/div&gt;&lt;div&gt;&amp;nbsp; - Auxiliary Database --- When cloning, Clone DB is called as auxiliary Database&lt;/div&gt;&lt;div&gt;&amp;nbsp; - Media Management Layer --- layer between RMAN 3rd part vendor backup tools netbackup,&amp;nbsp; Veritos and Tape backups&lt;/div&gt;&lt;div&gt;&amp;nbsp; - RMAN Channels&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;RMAN Configuration Parameter:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;- RETENTION POLICY - tells till what date our backup will be stored which we can use for recovery&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Redundancy -- How many backups to be retained&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Recover Window -- How many days backup to be retained&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Channels -- You can define channel to take backup to disk or tape&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Control file auto backup -- includes control file and spfile auto backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Parallelism -- Creates multiple processes to speed up backup&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - Encryption -- to secure the backup&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Backups and RMAN Backups ( Recovery Manager)</title><link>https://www.msqlserver.in/2026/02/rman-backups-recovery-manager.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Wed, 25 Feb 2026 22:26:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-4715912656528879095</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Why we need backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;The primary purpose of taking backups is to protect the database from data loss and ensure the ability to reconstruct the database in case of corruption, errors, or failures.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Categories of Database Failure:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Data loss can occur at any time&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Human errors, accidental deletions, logical corruption, hardware failures, or storage issues can lead to partial or complete data loss.&lt;/p&gt;&lt;p&gt;Backups preserve data integrity&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;When data corruption or inconsistencies arise, backups enable you to restore the database to a consistent and trustworthy state.&lt;/p&gt;&lt;p&gt;Support for disaster recovery&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;In the event of serious failures—like server crashes, media corruption, or site outages—backups are the foundation for bringing the database back online.&lt;/p&gt;&lt;p&gt;Compliance and business continuity&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Many industries require proper backup policies to meet audit standards and ensure uninterrupted business operations.&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Backup Types:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Oracle backups are broadly classified into two categories:&lt;/p&gt;&lt;p&gt;&lt;b&gt;1. Logical Backups&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Logical backups extract database objects in a logical format.&lt;/p&gt;&lt;p&gt;Examples: Table-level, Schema-level and Tablespace-level export&lt;/p&gt;&lt;p&gt;Tools Used: Data Pump (expdp / impdp) and&amp;nbsp; Export/Import (exp / imp)&lt;/p&gt;&lt;p&gt;Logical backups are mainly used for:&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Application-level migrations&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Object-level recoveries&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Copying data between databases&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;2. Physical Backups&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Physical backups involve copying actual database files at the OS level.&lt;/p&gt;&lt;p&gt;Files Included Datafiles, Control files, SPFILE and Archived redo logs&lt;/p&gt;&lt;p&gt;Types of Physical Backups&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;RMAN Backups (most recommended)&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Hot Backup (User‑Managed Online Backup)&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Cold Backup (User‑Managed Offline Backup)&lt;/p&gt;&lt;p&gt;&lt;b&gt;Hot and Cold Backups&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Hot and Cold backups are known as manual backups, as they are performed manually without using RMAN or any backup tool.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Cold Backup (Consistent Backup)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Database is shut down.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;All database files are copied at OS level.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Backup is consistent.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;No recovery required during restore.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Also referred to as a consistent backup.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Hot Backup (Inconsistent Backup)&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Database is open and available to users.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Tablespaces are placed in backup mode.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Datafiles are copied manually at OS level.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Recovery is required because the backup is inconsistent.&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Archived logs are needed for full recovery.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Backup States / Backup Types in Oracle&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Oracle backups fall under two main categories based on the state of the database:&lt;/p&gt;&lt;p&gt;&lt;b&gt;1) Consistent Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;A backup is consistent when: The database is shut down cleanly using SHUTDOWN IMMEDIATE / NORMAL / TRANSACTIONAL.&lt;/p&gt;&lt;p&gt;All files (datafiles, control files, redo logs) are synchronized.&lt;/p&gt;&lt;p&gt;&lt;b&gt;2) Inconsistent Backup&lt;/b&gt;&lt;/p&gt;&lt;p&gt;A backup is inconsistent when the database is in OPEN or MOUNT mode during the backup.&lt;/p&gt;&lt;p&gt;Files are not synchronized; hence recovery is mandatory.&lt;/p&gt;&lt;p&gt;Examples&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;Hot Backup (User‑managed online backup)&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;RMAN Backups (always inconsistent unless database is closed)&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Oracle RMAN (Recovery Manager)&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;div&gt;Oracle Recovery Manager (RMAN) is a powerful, built‑in Oracle database utility used for performing backup, restore, and recovery operations. It is a no‑cost, command‑line tool provided by Oracle to help DBAs protect critical database files—including datafiles, control files, SPFILEs, and archived redo logs.&lt;/div&gt;&lt;div&gt;RMAN integrates tightly with the Oracle database engine, enabling advanced features such as:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Block‑level corruption detection&lt;/div&gt;&lt;div&gt;RMAN scans blocks during backup and restore operations, identifying corrupted blocks early and ensuring data integrity.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Automated backup retention policies&lt;/div&gt;&lt;div&gt;You can define retention periods or redundancy levels, and RMAN will automatically manage obsolete backups.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Backup compression&lt;/div&gt;&lt;div&gt;Built‑in compression reduces storage costs and speeds up backup operations.&lt;/div&gt;&lt;div&gt;Parallelization&lt;/div&gt;&lt;div&gt;&lt;div&gt;File identification&lt;/div&gt;&lt;div&gt;Block recovery&lt;/div&gt;&lt;div&gt;Media recovery&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN can run backup and restore operations across multiple channels, improving performance and meeting high‑availability needs.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;What to Backup&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;Parameter file / SPfile , Control file , archive log files and data files&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;What file needed in different stages of database&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;1) Shutdown &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;- Nothing needed&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;2) No Mount &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;- Pfile or SPfile&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;3) Mount &lt;span style="white-space: pre;"&gt;	&lt;/span&gt;- Control file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;4) Open&lt;span style="white-space: pre;"&gt;		&lt;/span&gt;- Data and redo log files&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Recovery:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1. Complete Recovery&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --- Recovering the database exactly till the point of failure&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2. Incomplete Recovery&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --- It cannot recover the database till the point of failure&lt;/div&gt;&lt;div&gt;&lt;span style="white-space: normal;"&gt;&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;&amp;nbsp; --- You can recover the database till the time you had taken the backup&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server 2022 In place Upgrade - Fails and resumes , succeeded, But SSRS failed to install.</title><link>https://www.msqlserver.in/2025/08/sql-server-2022-in-place-upgrade-fails.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Sun, 24 Aug 2025 16:13:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-8094367307909835218</guid><description>&lt;p&gt;&amp;nbsp;During in place upgrade of SQL Server 2022, Installation may fail with below error or warning, but it will end with successful message. During SSRS or PBIRS installation it may fail with Second error as shown below -&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;First Error/Warning During upgrade&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjOau9xbEST9UM6WfyEEmOFLt-r8hzTz5K9XjrMNwj2X_mGDCRv7BaXRGkLPKlI69l5-orEfJveZelmYoUH9EjWljzB0VS1vpsty5PixrkILSflKMW5Vf4xkXtzpdamOSvjx4W85OqdXvn_NQoYnNJczMo1cNyy0-hGnaLO9waMLmcj3SXFQwnmB394S9w" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="506" data-original-width="711" height="456" src="https://blogger.googleusercontent.com/img/a/AVvXsEjOau9xbEST9UM6WfyEEmOFLt-r8hzTz5K9XjrMNwj2X_mGDCRv7BaXRGkLPKlI69l5-orEfJveZelmYoUH9EjWljzB0VS1vpsty5PixrkILSflKMW5Vf4xkXtzpdamOSvjx4W85OqdXvn_NQoYnNJczMo1cNyy0-hGnaLO9waMLmcj3SXFQwnmB394S9w=w640-h456" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Second Error SSRS/PBI RS:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: whitesmoke; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;"&gt;UnexpectedError: setup failed for packageId: SSReportingServicesSetup, package: Microsoft SQL Server Reporting Services, errorCode: -2147483648, errorMessage: Something went wrong, please find details in setup logs.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: whitesmoke; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: whitesmoke; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjKuBWSPoZpQ24Udw0GiB-WdPgEa6MlIKmqmqqi2i4Xfn7woyObSyfGmNKARkiBi3Cb_-8wIpxw6D2ifnDmWR08IGgsJTOHyxb65Y93Myfn-zQypY9lb8d4E1s7Lr4T6wINrvppV4QBHxEUX4xZygp8vcDaupahbwjNuAmiRWunwEh3VMjSzug5yJhSo50" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="209" data-original-width="242" height="553" src="https://blogger.googleusercontent.com/img/a/AVvXsEjKuBWSPoZpQ24Udw0GiB-WdPgEa6MlIKmqmqqi2i4Xfn7woyObSyfGmNKARkiBi3Cb_-8wIpxw6D2ifnDmWR08IGgsJTOHyxb65Y93Myfn-zQypY9lb8d4E1s7Lr4T6wINrvppV4QBHxEUX4xZygp8vcDaupahbwjNuAmiRWunwEh3VMjSzug5yJhSo50=w640-h553" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Resolution :&lt;/b&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="background-color: whitesmoke; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; white-space-collapse: preserve;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: #fafafa; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 8px 0px 4px; overflow-wrap: break-word;"&gt;Sometimes the SQL Server WMI namespace (&lt;code style="font-family: source-code-pro, Menlo, Monaco, Consolas, &amp;quot;Courier New&amp;quot;, monospace;"&gt;root\Microsoft\SqlServer\ComputerManagement&lt;/code&gt;) is missing or corrupted.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style="background-color: #fafafa; color: #424242; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; margin: 8px 0px 4px; overflow-wrap: break-word;"&gt;Run this in&amp;nbsp;&lt;span style="font-weight: 600;"&gt;Command Prompt&lt;/span&gt;:&lt;/p&gt;&lt;div class="___77lcry0 f10pi13n" style="background-color: #fafafa; font-family: &amp;quot;Segoe Sans&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web (West European)&amp;quot;, -apple-system, BlinkMacSystemFont, Roboto, &amp;quot;Helvetica Neue&amp;quot;, sans-serif; font-size: 16px; position: relative;"&gt;&lt;div class="___1hewfwb f10pi13n f7oukh6 f5p0z4x" role="group" style="opacity: 1; position: relative; transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out;" tabindex="0"&gt;&lt;p&gt;&lt;b&gt;&lt;span style="color: #424242;"&gt;mofcomp&amp;nbsp;"C:\Program&amp;nbsp;Files&amp;nbsp;(x86)\Microsoft&amp;nbsp;SQL&amp;nbsp;Server\&lt;/span&gt;&lt;span style="color: red;"&gt;150&lt;/span&gt;&lt;span style="color: #424242;"&gt;\Shared\sqlmgmproviderxpsp2up.mof"&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style="color: #424242;"&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Note: make sure you are in the &lt;span style="color: red;"&gt;right folder&lt;/span&gt; and right version of the SQL Server.&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEjOau9xbEST9UM6WfyEEmOFLt-r8hzTz5K9XjrMNwj2X_mGDCRv7BaXRGkLPKlI69l5-orEfJveZelmYoUH9EjWljzB0VS1vpsty5PixrkILSflKMW5Vf4xkXtzpdamOSvjx4W85OqdXvn_NQoYnNJczMo1cNyy0-hGnaLO9waMLmcj3SXFQwnmB394S9w=s72-w640-h456-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server Configuration Manager Missing</title><link>https://www.msqlserver.in/2025/08/sql-server-configuration-manager-missing.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Wed, 20 Aug 2025 15:26:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-278418890112511521</guid><description>&lt;p&gt;&amp;nbsp;Go to respective shared folder and register -&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhrdqqVQlBlFlaBL6jBW16XL-QV97kpHSKvLGgRmzKKYzqtuDiF_b0knsYBC7E1a3bruKrjtvFCPc9H_ziZJdhhdGalLCPDBRNU44ecQ-iLYhTca9IJCkSVTZjriWwPH9M2OCHB5A3aUi7cNrAOUfpOa10r_adECnJYZIYkHkUrR9nhUJmgys0O527R960" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="241" data-original-width="862" height="178" src="https://blogger.googleusercontent.com/img/a/AVvXsEhrdqqVQlBlFlaBL6jBW16XL-QV97kpHSKvLGgRmzKKYzqtuDiF_b0knsYBC7E1a3bruKrjtvFCPc9H_ziZJdhhdGalLCPDBRNU44ecQ-iLYhTca9IJCkSVTZjriWwPH9M2OCHB5A3aUi7cNrAOUfpOa10r_adECnJYZIYkHkUrR9nhUJmgys0O527R960=w640-h178" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEhrdqqVQlBlFlaBL6jBW16XL-QV97kpHSKvLGgRmzKKYzqtuDiF_b0knsYBC7E1a3bruKrjtvFCPc9H_ziZJdhhdGalLCPDBRNU44ecQ-iLYhTca9IJCkSVTZjriWwPH9M2OCHB5A3aUi7cNrAOUfpOa10r_adECnJYZIYkHkUrR9nhUJmgys0O527R960=s72-w640-h178-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server Daily Health Check - Script</title><link>https://www.msqlserver.in/2025/07/sql-server-daily-health-check-script.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Sun, 27 Jul 2025 10:44:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-2031594959496582661</guid><description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;/* =======================================================================&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;SQL Server Health Check – HTML Email (Final)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;- DBA's Heart Beat&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;======================================================================= */&lt;/p&gt;&lt;p&gt;SET NOCOUNT ON;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DECLARE @html&amp;nbsp; &amp;nbsp; NVARCHAR(MAX) = N'';&lt;/p&gt;&lt;p&gt;DECLARE @newline NVARCHAR(10)&amp;nbsp; = CHAR(13) + CHAR(10);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- HTML Header + Styles&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;style&amp;gt;&lt;/p&gt;&lt;p&gt;body { font-family: Segoe UI, Arial, sans-serif; font-size: 13px; color: #222; }&lt;/p&gt;&lt;p&gt;h3 { margin: 18px 0 8px; }&lt;/p&gt;&lt;p&gt;table { border-collapse: collapse; width: auto; max-width: 100%; }&lt;/p&gt;&lt;p&gt;th, td { border: 1px solid #ddd; padding: 6px 8px; text-align: left; }&lt;/p&gt;&lt;p&gt;th { background-color: #f2f2f2; }&lt;/p&gt;&lt;p&gt;tr.alert { color: #b00020; font-weight: 600; }&lt;/p&gt;&lt;p&gt;.small { color:#666; font-size:12px; }&lt;/p&gt;&lt;p&gt;&amp;lt;/style&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- SQL Server Version &amp;amp; EOL&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;DECLARE @Servername NVARCHAR(128) = CAST(SERVERPROPERTY('ServerName') AS NVARCHAR(128));&lt;/p&gt;&lt;p&gt;DECLARE @version&amp;nbsp; &amp;nbsp; NVARCHAR(128) = CAST(SERVERPROPERTY('ProductVersion') AS NVARCHAR(128));&lt;/p&gt;&lt;p&gt;DECLARE @edition&amp;nbsp; &amp;nbsp; NVARCHAR(128) = CAST(SERVERPROPERTY('Edition')&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS NVARCHAR(128));&lt;/p&gt;&lt;p&gt;DECLARE @eol&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NVARCHAR(256);&lt;/p&gt;&lt;p&gt;DECLARE @MajorVersion NVARCHAR(256);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @MajorVersion = CASE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '8%'&amp;nbsp; &amp;nbsp; THEN 'SQL2000'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '9%'&amp;nbsp; &amp;nbsp; THEN 'SQL2005'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '10.0%' THEN '&lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=SQL+Server+2008&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;SQL2008&lt;/a&gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '10.5%' THEN 'SQL2008 R2'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '11%'&amp;nbsp; &amp;nbsp;THEN 'SQL2012'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '12%'&amp;nbsp; &amp;nbsp;THEN 'SQL2014'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '13%'&amp;nbsp; &amp;nbsp;THEN 'SQL2016'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '14%'&amp;nbsp; &amp;nbsp;THEN '&lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=SQL+Server+2017&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;SQL2017&lt;/a&gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '15%'&amp;nbsp; &amp;nbsp;THEN 'SQL2019'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;WHEN CONVERT(VARCHAR(128), SERVERPROPERTY('productversion')) LIKE '16%'&amp;nbsp; &amp;nbsp;THEN '&lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=SQL+Server+2022&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;SQL2022&lt;/a&gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ELSE 'Unknown/New Version'&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @eol = CASE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2005%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2011-04-12, Extended: 2016-04-12'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2008 R2%' THEN 'Mainstream: 2014-07-08, Extended: 2019-07-09'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2008%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2014-07-08, Extended: 2019-07-09'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2012%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2017-07-11, Extended: 2022-07-12'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2014%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2019-07-09, Extended: 2024-07-09'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2016%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2021-07-13, Extended: 2026-07-14'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2017%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2022-10-11, Extended: 2027-10-12'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2019%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2025-02-28, Extended: 2030-01-08'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHEN @@VERSION LIKE '%2022%'&amp;nbsp; &amp;nbsp; THEN 'Mainstream: 2028-01-11, Extended: 2033-01-11'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ELSE 'Unknown/New Version'&lt;/p&gt;&lt;p&gt;END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;SQL Server Version and EOL&amp;lt;/h3&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;lt;th&amp;gt;Instance Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Version&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;PatchLevel&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Edition&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;EOL Info&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + @Servername + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + @MajorVersion + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@version + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + @edition + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + @eol + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Uptime (Start + Duration)&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;SQL Server Uptime&amp;lt;/h3&amp;gt;&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Start Time&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Up Since&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DECLARE @start DATETIME = (SELECT sqlserver_start_time FROM sys.dm_os_sys_info);&lt;/p&gt;&lt;p&gt;DECLARE @now&amp;nbsp; &amp;nbsp;DATETIME = GETDATE();&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DECLARE @diffSeconds BIGINT = DATEDIFF(SECOND, @start, @now);&lt;/p&gt;&lt;p&gt;DECLARE @days&amp;nbsp; &amp;nbsp;INT&amp;nbsp; &amp;nbsp; = @diffSeconds / 86400;&lt;/p&gt;&lt;p&gt;DECLARE @hours&amp;nbsp; INT&amp;nbsp; &amp;nbsp; = (@diffSeconds % 86400) / 3600;&lt;/p&gt;&lt;p&gt;DECLARE @mins&amp;nbsp; &amp;nbsp;INT&amp;nbsp; &amp;nbsp; = (@diffSeconds % 3600) / 60;&lt;/p&gt;&lt;p&gt;DECLARE @secs&amp;nbsp; &amp;nbsp;INT&amp;nbsp; &amp;nbsp; = @diffSeconds % 60;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SELECT @html = @html +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + CONVERT(NVARCHAR(19), @start, 120) + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; CAST(@days AS NVARCHAR(10)) + N' days ' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; CAST(@hours AS NVARCHAR(10)) + N' hrs ' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; CAST(@mins AS NVARCHAR(10)) + N' mins ' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; CAST(@secs AS NVARCHAR(10)) + N' secs&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Offline Databases&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Offline Databases&amp;lt;/h3&amp;gt;';&lt;/p&gt;&lt;p&gt;IF EXISTS (SELECT 1 FROM sys.databases WHERE state_desc = 'OFFLINE')&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Database&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + name + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + state_desc + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM sys.databases WHERE state_desc = 'OFFLINE';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;ELSE&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;All databases are online.&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;/* =======================================================================&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;Database Default Locations + All Disks (Fixed Drive Letters only)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;WMI via OLE Automation – decimal math for Free%&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp;======================================================================= */&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-----------------------------&lt;/p&gt;&lt;p&gt;-- Database Default Locations&lt;/p&gt;&lt;p&gt;-----------------------------&lt;/p&gt;&lt;p&gt;DECLARE @DefaultData&amp;nbsp; &amp;nbsp;NVARCHAR(4000) = CAST(SERVERPROPERTY('InstanceDefaultDataPath') AS NVARCHAR(4000));&lt;/p&gt;&lt;p&gt;DECLARE @DefaultLog&amp;nbsp; &amp;nbsp; NVARCHAR(4000) = CAST(SERVERPROPERTY('InstanceDefaultLogPath')&amp;nbsp; AS NVARCHAR(4000));&lt;/p&gt;&lt;p&gt;DECLARE @DefaultBackup NVARCHAR(4000);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BEGIN TRY&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @DefaultBackup = CAST(SERVERPROPERTY('InstanceDefaultBackupPath') AS NVARCHAR(4000));&lt;/p&gt;&lt;p&gt;END TRY&lt;/p&gt;&lt;p&gt;BEGIN CATCH&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @DefaultBackup = NULL;&lt;/p&gt;&lt;p&gt;END CATCH;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IF @DefaultBackup IS NULL OR LTRIM(RTRIM(@DefaultBackup)) = ''&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DECLARE @bk NVARCHAR(4000);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; EXEC master.dbo.&lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=xp_instance_regread+SQL+Server&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;xp_instance_regread&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N'HKEY_LOCAL_MACHINE',&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N'Software\Microsoft\MSSQLServer\MSSQLServer',&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; N'BackupDirectory',&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @bk OUTPUT,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'no_output';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @DefaultBackup = @bk;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Database Default Locations&amp;lt;/h3&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Setting&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Path&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Default Data&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + ISNULL(@DefaultData,'') + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Default Log&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;'&amp;nbsp; + ISNULL(@DefaultLog,'')&amp;nbsp; + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Default Backup&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + ISNULL(@DefaultBackup,'') + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;---------------------------------------------&lt;/p&gt;&lt;p&gt;-- All Disks: Fixed Drive Letters only (no \\?\Volume)&lt;/p&gt;&lt;p&gt;---------------------------------------------&lt;/p&gt;&lt;p&gt;IF OBJECT_ID('tempdb..#AllDisks') IS NOT NULL DROP TABLE #AllDisks;&lt;/p&gt;&lt;p&gt;CREATE TABLE #AllDisks&lt;/p&gt;&lt;p&gt;(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DriveLetter NVARCHAR(10) NOT NULL,&amp;nbsp; -- 'C:'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; TotalBytes&amp;nbsp; BIGINT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOT NULL,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FreeBytes&amp;nbsp; &amp;nbsp;BIGINT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NOT NULL&lt;/p&gt;&lt;p&gt;);&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DECLARE @hr INT = 0, @locator INT = NULL, @svc INT = NULL, @set INT = NULL, @item INT = NULL, @count INT = 0, @i INT = 0;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;BEGIN TRY&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; -- Connect to WMI&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; EXEC @hr = sp_OACreate 'WbemScripting.SWbemLocator', @locator OUT;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; IF @hr &amp;lt;&amp;gt; 0 BEGIN RAISERROR('Failed to create WMI locator (sp_OACreate).', 16, 1); RETURN; END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAMethod @locator, 'ConnectServer', @svc OUT, '.', 'root\cimv2';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; IF @hr &amp;lt;&amp;gt; 0 BEGIN RAISERROR('Failed to connect to WMI root\cimv2.', 16, 1); RETURN; END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; -- Query: Fixed disks with letters (DriveType=3)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAMethod @svc, 'ExecQuery', @set OUT,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'SELECT DeviceID, Size, FreeSpace FROM &lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=Win32_LogicalDisk+WMI&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;Win32_LogicalDisk&lt;/a&gt; WHERE DriveType=3';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; IF @hr &amp;lt;&amp;gt; 0 BEGIN RAISERROR('WMI ExecQuery failed for Win32_LogicalDisk.', 16, 1); RETURN; END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAGetProperty @set, 'Count', @count OUT;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @i = 0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHILE @i &amp;lt; ISNULL(@count, 0)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAMethod @set, 'ItemIndex', @item OUT, @i;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF @hr &amp;lt;&amp;gt; 0 BREAK;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DECLARE @DeviceID NVARCHAR(50), @Size NUMERIC(38,0), @Free NUMERIC(38,0);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAGetProperty @item, 'DeviceID',&amp;nbsp; @DeviceID OUT;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAGetProperty @item, 'Size',&amp;nbsp; &amp;nbsp; &amp;nbsp; @Size&amp;nbsp; &amp;nbsp; &amp;nbsp;OUT;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EXEC @hr = sp_OAGetProperty @item, 'FreeSpace', @Free&amp;nbsp; &amp;nbsp; &amp;nbsp;OUT;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Insert only if Size is present (&amp;gt;0)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF @Size IS NOT NULL AND @Size &amp;gt; 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO #AllDisks(DriveLetter, TotalBytes, FreeBytes)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES (UPPER(@DeviceID), CONVERT(BIGINT, @Size), CONVERT(BIGINT, @Free));&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @i = @i + 1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;END TRY&lt;/p&gt;&lt;p&gt;BEGIN CATCH&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; DECLARE @err NVARCHAR(4000) = ERROR_MESSAGE();&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; RAISERROR('WMI/OLE disk collection failed: %s', 16, 1, @err);&lt;/p&gt;&lt;p&gt;END CATCH&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- Cleanup WMI objects&lt;/p&gt;&lt;p&gt;IF @set&amp;nbsp; &amp;nbsp; &amp;nbsp;IS NOT NULL BEGIN EXEC sp_OADestroy @set;&amp;nbsp; &amp;nbsp; &amp;nbsp;END;&lt;/p&gt;&lt;p&gt;IF @svc&amp;nbsp; &amp;nbsp; &amp;nbsp;IS NOT NULL BEGIN EXEC sp_OADestroy @svc;&amp;nbsp; &amp;nbsp; &amp;nbsp;END;&lt;/p&gt;&lt;p&gt;IF @locator IS NOT NULL BEGIN EXEC sp_OADestroy @locator; END;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- Render All Disks (decimal math for Free%)&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;All Disks&amp;lt;/h3&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;th&amp;gt;Drive&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Total (GB)&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Free (GB)&amp;lt;/th&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;th&amp;gt;Used (GB)&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Free (%)&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;;WITH calc AS&lt;/p&gt;&lt;p&gt;(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Drive&amp;nbsp; &amp;nbsp; &amp;nbsp; = DriveLetter,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; totalGB&amp;nbsp; &amp;nbsp; = CONVERT(DECIMAL(18,2), TotalBytes / 1024.0 / 1024 / 1024),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; freeGB&amp;nbsp; &amp;nbsp; &amp;nbsp;= CONVERT(DECIMAL(18,2), FreeBytes&amp;nbsp; / 1024.0 / 1024 / 1024),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; usedGB&amp;nbsp; &amp;nbsp; &amp;nbsp;= CONVERT(DECIMAL(18,2), (TotalBytes - FreeBytes) / 1024.0 / 1024 / 1024)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM #AllDisks&lt;/p&gt;&lt;p&gt;),&lt;/p&gt;&lt;p&gt;calc2 AS&lt;/p&gt;&lt;p&gt;(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Drive, totalGB, freeGB, usedGB,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; freePct = CONVERT(DECIMAL(5,2), CASE WHEN totalGB &amp;gt; 0 THEN (freeGB * 100.00) / totalGB ELSE 0 END)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM calc&lt;/p&gt;&lt;p&gt;)&lt;/p&gt;&lt;p&gt;SELECT @html = @html +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CASE WHEN freePct &amp;lt; 10 THEN N'&amp;lt;tr class="alert"&amp;gt;' ELSE N'&amp;lt;tr&amp;gt;' END +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;N'&amp;lt;td&amp;gt;' + Drive + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CONVERT(NVARCHAR(50), totalGB) + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CONVERT(NVARCHAR(50), freeGB)&amp;nbsp; + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CONVERT(NVARCHAR(50), usedGB)&amp;nbsp; + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CONVERT(NVARCHAR(50), freePct) + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;FROM calc2&lt;/p&gt;&lt;p&gt;ORDER BY Drive;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;DROP TABLE #AllDisks;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Backup Status (exclude tempdb &amp;amp; mirrored DBs)&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Backup Status (Failed or No Backup in Past 2 Days)&amp;lt;/h3&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IF EXISTS (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT 1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM sys.databases d&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN msdb.dbo.backupset bs ON bs.database_name = d.name&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN sys.database_mirroring dm ON d.database_id = dm.database_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHERE d.name &amp;lt;&amp;gt; 'tempdb'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AND d.is_read_only = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AND dm.mirroring_guid IS NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; GROUP BY d.name&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; HAVING MAX(bs.backup_finish_date) IS NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OR MAX(bs.backup_finish_date) &amp;lt; DATEADD(DAY, -2, GETDATE())&lt;/p&gt;&lt;p&gt;)&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Database&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Last Backup&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + d.name + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;COALESCE(CONVERT(NVARCHAR(19), MAX(bs.backup_finish_date), 120), N'No Backup') + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM sys.databases d&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN msdb.dbo.backupset bs ON bs.database_name = d.name&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; LEFT JOIN sys.database_mirroring dm ON d.database_id = dm.database_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHERE d.name &amp;lt;&amp;gt; 'tempdb'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AND d.is_read_only = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; AND dm.mirroring_guid IS NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; GROUP BY d.name&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; HAVING MAX(bs.backup_finish_date) IS NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OR MAX(bs.backup_finish_date) &amp;lt; DATEADD(DAY, -2, GETDATE());&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;ELSE&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;All backups successful (within last 2 days).&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Mirroring Status&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Mirroring Status&amp;lt;/h3&amp;gt;';&lt;/p&gt;&lt;p&gt;IF EXISTS (SELECT 1 FROM sys.database_mirroring WHERE mirroring_guid IS NOT NULL)&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Database&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Mirroring State&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Safety Level&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + d.name + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ISNULL(dm.mirroring_state_desc, N'Unknown') + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ISNULL(dm.mirroring_safety_level_desc, N'Unknown') + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM sys.databases d&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; JOIN sys.database_mirroring dm ON d.database_id = dm.database_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; WHERE dm.mirroring_guid IS NOT NULL;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;ELSE&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;No mirroring configured.&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Replication Status (GUID-safe + resilient + idempotent)&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Replication Status&amp;lt;/h3&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;IF DB_ID('distribution') IS NOT NULL&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; IF OBJECT_ID('distribution.dbo.MSreplication_monitordata') IS NOT NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -- Clean up any leftovers from previous runs in this session&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#DA')&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IS NOT NULL DROP TABLE #DA;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#MM')&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;IS NOT NULL DROP TABLE #MM;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#JobLast')&amp;nbsp; &amp;nbsp; &amp;nbsp; IS NOT NULL DROP TABLE #JobLast;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#MonitorRepl')&amp;nbsp; IS NOT NULL DROP TABLE #MonitorRepl;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 1) Distribution Agents with publication + subscriber */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; p.publisher_db,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a.publication,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a.subscriber_db,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a.job_id,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; job_id_str = UPPER(CONVERT(NVARCHAR(36), a.job_id))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO #DA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM distribution.dbo.MSdistribution_agents AS a&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN distribution.dbo.MSpublications&amp;nbsp; &amp;nbsp;AS p&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ON p.publisher_id = a.publisher_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AND p.publication&amp;nbsp; = a.publication;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 2) Monitor data: normalize job_id string (trim, uppercase, remove braces) */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; publisher_db&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= m.publisher_db,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; publication&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = m.publication,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; job_id_str&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= NULLIF(UPPER(REPLACE(REPLACE(LTRIM(RTRIM(m.job_id)), '{', ''), '}', '')), ''),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Status]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= m.[Status],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [Warning]&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = m.[Warning],&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cur_latency&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = m.cur_latency&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO #MM&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM distribution.dbo.MSreplication_monitordata AS m&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE m.agent_type = 3&amp;nbsp; -- distribution agents&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND NULLIF(LTRIM(RTRIM(m.job_id)), '') IS NOT NULL;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 3) Last job outcome for each agent (fallback when MM has no rows) */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; j.job_id,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; job_id_str = UPPER(CONVERT(NVARCHAR(36), j.job_id)),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; last_status = ISNULL(h_last.run_status, -1)&amp;nbsp; -- -1 = unknown&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO #JobLast&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM msdb.dbo.sysjobs AS j&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INNER JOIN #DA&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS da ON da.job_id = j.job_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OUTER APPLY (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT TOP (1) run_status&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM msdb.dbo.sysjobhistory&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHERE job_id = j.job_id AND step_id = 0&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ORDER BY run_date DESC, run_time DESC&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ) AS h_last;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 4) Final projection: prefer MM status; else fallback to job history; else Unknown */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT DISTINCT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; da.publisher_db,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; da.publication,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; da.subscriber_db,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Status =&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COALESCE(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* MM status mapping */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CASE mm.[Status]&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 1 THEN 'Started'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 2 THEN 'Succeeded'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 3 THEN 'In Progress'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 4 THEN 'Idle'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 5 THEN 'Retrying'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 6 THEN 'Failed'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE NULL&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Job history mapping (fallback) */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CASE jl.last_status&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 0 THEN 'Failed'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 1 THEN 'Succeeded'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 2 THEN 'Retrying'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 3 THEN 'Canceled'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN 4 THEN 'In Progress'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE 'Unknown'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 'Unknown'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INTO #MonitorRepl&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM #DA AS da&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LEFT JOIN #MM AS mm&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON (mm.job_id_str&amp;nbsp; &amp;nbsp;= da.job_id_str)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; OR (mm.publisher_db&amp;nbsp; = da.publisher_db AND mm.publication = da.publication)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LEFT JOIN #JobLast AS jl&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON jl.job_id&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = da.job_id;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 5) Render HTML */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + N'&amp;lt;th&amp;gt;Publisher DB&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Publication&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Subscriber DB&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Status&amp;lt;/th&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; + N'&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF EXISTS (SELECT 1 FROM #MonitorRepl)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + publisher_db + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + publication&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + subscriber_db + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + Status + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM #MonitorRepl&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ORDER BY publisher_db, publication, subscriber_db;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ELSE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td colspan="4"&amp;gt;No replication agent rows found.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* 6) Cleanup */&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#MonitorRepl') IS NOT NULL DROP TABLE #MonitorRepl;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#JobLast')&amp;nbsp; &amp;nbsp; &amp;nbsp;IS NOT NULL DROP TABLE #JobLast;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#MM')&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IS NOT NULL DROP TABLE #MM;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF OBJECT_ID('tempdb..#DA')&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IS NOT NULL DROP TABLE #DA;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ELSE&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;No replication activity object (MSreplication_monitordata) found in distribution database.&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; END&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;ELSE&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;No replication configured.&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- &lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=Always+On+Availability+Groups+SQL+Server&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;Always On Availability Groups&lt;/a&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;h3&amp;gt;Always On Availability Groups&amp;lt;/h3&amp;gt;';&lt;/p&gt;&lt;p&gt;IF EXISTS (SELECT 1 FROM sys.availability_groups)&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Availability Group&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Replica Server&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Role&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Database&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Sync State&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;th&amp;gt;Health&amp;lt;/th&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/tr&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ;WITH ags AS (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SELECT DISTINCT&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ag.name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AS AGName,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ar.replica_server_name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AS ReplicaServer,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ars.role_desc&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AS RoleDesc,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;adc.database_name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AS DBName,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dhs.synchronization_state_desc&amp;nbsp; &amp;nbsp; AS SyncState,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dhs.synchronization_health_desc&amp;nbsp; &amp;nbsp;AS Health&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FROM sys.availability_groups ag&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN sys.availability_replicas ar&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON ag.group_id = ar.group_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN sys.dm_hadr_availability_replica_states ars&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON ar.replica_id = ars.replica_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN sys.availability_databases_cluster adc&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON ag.group_id = adc.group_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JOIN sys.dm_hadr_database_replica_states dhs&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON ars.replica_id = dhs.replica_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AND dhs.group_database_id = adc.group_database_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SELECT @html = @html + N'&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;' + AGName + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + ReplicaServer + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' +&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;RoleDesc + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + DBName + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + SyncState + N'&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;' + Health + N'&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;'&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; FROM ags&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; ORDER BY AGName, ReplicaServer, DBName;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;/table&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;ELSE&lt;/p&gt;&lt;p&gt;BEGIN&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; SET @html = @html + N'&amp;lt;p&amp;gt;No Always On Availability Groups configured.&amp;lt;/p&amp;gt;' + @newline;&lt;/p&gt;&lt;p&gt;END&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- HTML Footer&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;SET @html = @html + N'&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;';&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;-- Send Email&lt;/p&gt;&lt;p&gt;-- =========================&lt;/p&gt;&lt;p&gt;DECLARE @sub VARCHAR(MAX);&lt;/p&gt;&lt;p&gt;SET @sub = 'Alert: SQL Server Health Check Report - ' + CAST(SERVERPROPERTY('MachineName') AS VARCHAR(128));&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;EXEC msdb.dbo.&lt;a data-preview="" href="https://www.google.com/search?ved=1t:260882&amp;amp;q=sp_send_dbmail+SQL+Server&amp;amp;bbid=1143967542545591578&amp;amp;bpid=2031594959496582661" target="_blank"&gt;sp_send_dbmail&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; @profile_name = 'Default',&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; @recipients&amp;nbsp; &amp;nbsp;= 'DBA@sqlserver.com',&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; @subject&amp;nbsp; &amp;nbsp; &amp;nbsp; = @sub,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; @body&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= @html,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; @body_format&amp;nbsp; = 'HTML';&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>The server principal owns one or more server role(s) and cannot be dropped. (Microsoft SQL Server, Error: 15141)</title><link>https://www.msqlserver.in/2025/05/the-server-principal-owns-one-or-more.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Mon, 5 May 2025 11:51:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-4089251168164113122</guid><description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Some time we are trying to delete or drop a login from SQL server instance , we encountered with below error.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The server principal owns one or more server role(s) and cannot be dropped. (Microsoft SQL Server, Error: 15141)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Step 1) Find the server roles owned by login using below script&amp;nbsp;&lt;/p&gt;&lt;p&gt;SELECT sp1.name AS ServerRoleName,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sp2.name AS RoleOwnerName&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FROM sys.server_principals AS sp1&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;JOIN sys.server_principals As sp2&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ON sp1.owning_principal_id=sp2.principal_id&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WHERE sp2.name='Test' --Change the login name&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Step 2 ) Change server role to another login&amp;nbsp;&lt;/p&gt;&lt;p&gt;USE [master]&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;ALTER AUTHORIZATION ON SERVER ROLE :: Admin to SQLAdmin&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;Step 3) Drop login&amp;nbsp;&lt;/p&gt;&lt;p&gt;USE [master]&lt;/p&gt;&lt;p&gt;GO&lt;/p&gt;&lt;p&gt;Drop Login Test&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Difference between NOLOCK and READPAST</title><link>https://www.msqlserver.in/2025/04/difference-between-nolock-and-readpast.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Wed, 23 Apr 2025 15:46:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-1486818655991727076</guid><description>&lt;p&gt;&amp;nbsp;NOLOCK&lt;/p&gt;&lt;p&gt;========&lt;/p&gt;&lt;p&gt;When we use&amp;nbsp;NOLOCK in select command it will allow to read rows are available on dirty pages/uncommitted from buffer cache&lt;/p&gt;&lt;p&gt;Ex: i have table called replication with 4 records&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEidaayzjCwaLErDQQKa90awWUuiHXrihy5y2Bo7b_giaXC7rqITL__f9TmOKYkfc1pBdf6slMGF7TU3cldDDAtl4h2gUAOh6qSRLH0xF7JEhMVXtmWJcopLYorlKU81ciXy158cOLH8pIPZIh2DbnEf8WKHUMtm7YjUnRHV_7zM8XsCeTD4gW0cAfSlcIjI" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="274" data-original-width="380" height="289" src="https://blogger.googleusercontent.com/img/a/AVvXsEidaayzjCwaLErDQQKa90awWUuiHXrihy5y2Bo7b_giaXC7rqITL__f9TmOKYkfc1pBdf6slMGF7TU3cldDDAtl4h2gUAOh6qSRLH0xF7JEhMVXtmWJcopLYorlKU81ciXy158cOLH8pIPZIh2DbnEf8WKHUMtm7YjUnRHV_7zM8XsCeTD4gW0cAfSlcIjI=w400-h289" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;update one record with out commit&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhaVri0uwIBHs_Gdunoq7ELDq2BkSl7tHAQaocepupWP2qTgCYLxUbBLgHy9T9LQOHlWZhFbEdbYoy_A9tjZc71RwnS9RymL4lUrPuHkY2TwJWLE3v-Z31EJkw8Lniw5UON6lvfopB5sbgGLUaEGN0zzDIEmaiNUgudjjctN7S8W1dRb32uZlFHxaa6x1gq" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="77" data-original-width="509" height="48" src="https://blogger.googleusercontent.com/img/a/AVvXsEhaVri0uwIBHs_Gdunoq7ELDq2BkSl7tHAQaocepupWP2qTgCYLxUbBLgHy9T9LQOHlWZhFbEdbYoy_A9tjZc71RwnS9RymL4lUrPuHkY2TwJWLE3v-Z31EJkw8Lniw5UON6lvfopB5sbgGLUaEGN0zzDIEmaiNUgudjjctN7S8W1dRb32uZlFHxaa6x1gq" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;in another session i try to select table, it not showing any result&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEixr7bedsmGab8umOqTUSNcrVyu8wSnz9VOfCHh9dy5EEsdvEAfwu1gPx85PcUR8RJjHwgWZFfclCEPMVmQTWY4cBKlQNTg9tGqxtV9IuhzhaN9joTkhJldLtiDYP1tHXnTGRY-SUkf_acJ2fxokWBviwQdFGUBBmLpjdsldm09x-eAYKkC_bczWnFOjfZ4" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="176" data-original-width="387" height="183" src="https://blogger.googleusercontent.com/img/a/AVvXsEixr7bedsmGab8umOqTUSNcrVyu8wSnz9VOfCHh9dy5EEsdvEAfwu1gPx85PcUR8RJjHwgWZFfclCEPMVmQTWY4cBKlQNTg9tGqxtV9IuhzhaN9joTkhJldLtiDYP1tHXnTGRY-SUkf_acJ2fxokWBviwQdFGUBBmLpjdsldm09x-eAYKkC_bczWnFOjfZ4=w400-h183" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;Tried with NOLOCK , it resulting with dirty pages&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhtSLo811KrgkEYp8VEI5hQaIhTt8Vn4_EDr7LAlJncJaKvmh8Rf_d4vrbrsjZQC_kSmXcgwzj-K5Vr4Z44aW8vpKpRmlLk08j-6m-BBq9LuqI4DFIdd06VWr_-Lpfe8l1k6AY_6XcQ5qwmpsEUNWfXoGaQWd8yjyJJETLaSC7RVU1sj0edlcSYIWxuLaJp" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="297" data-original-width="461" height="258" src="https://blogger.googleusercontent.com/img/a/AVvXsEhtSLo811KrgkEYp8VEI5hQaIhTt8Vn4_EDr7LAlJncJaKvmh8Rf_d4vrbrsjZQC_kSmXcgwzj-K5Vr4Z44aW8vpKpRmlLk08j-6m-BBq9LuqI4DFIdd06VWr_-Lpfe8l1k6AY_6XcQ5qwmpsEUNWfXoGaQWd8yjyJJETLaSC7RVU1sj0edlcSYIWxuLaJp=w400-h258" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;READPAST&lt;div&gt;=========&lt;/div&gt;&lt;div&gt;it will not read rows that are locked by other transactions. When READPAST is specified, row-level locks are skipped.&lt;p&gt;&lt;/p&gt;&lt;p&gt;SELECT *&amp;nbsp; FROM [replication] with(readpast)&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjLDrvsK4OJdMNb1dV9v_0pgrAM9rLSQ9JhVk02ox6q5EjxntsmBaY2NeagIWxfQI0DOIqWo7TQ24TTWy5fG67D7ipNldkYQZvZEwCPKVIwcaRxoMfi9HArbEgAoN1yA9GieJQukzmm1sl9cMbNu_BeQhV8TwmncyLfI07p43A7fPNh-LhmBLCB5THanZJx" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="212" data-original-width="455" height="186" src="https://blogger.googleusercontent.com/img/a/AVvXsEjLDrvsK4OJdMNb1dV9v_0pgrAM9rLSQ9JhVk02ox6q5EjxntsmBaY2NeagIWxfQI0DOIqWo7TQ24TTWy5fG67D7ipNldkYQZvZEwCPKVIwcaRxoMfi9HArbEgAoN1yA9GieJQukzmm1sl9cMbNu_BeQhV8TwmncyLfI07p43A7fPNh-LhmBLCB5THanZJx=w400-h186" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;it will skip modified records until transaction will commit&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEidaayzjCwaLErDQQKa90awWUuiHXrihy5y2Bo7b_giaXC7rqITL__f9TmOKYkfc1pBdf6slMGF7TU3cldDDAtl4h2gUAOh6qSRLH0xF7JEhMVXtmWJcopLYorlKU81ciXy158cOLH8pIPZIh2DbnEf8WKHUMtm7YjUnRHV_7zM8XsCeTD4gW0cAfSlcIjI=s72-w400-h289-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Error: Database cannot be opened. It is in the middle of a restore</title><link>https://www.msqlserver.in/2025/04/error-database-cannot-be-opened-it-is.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Tue, 22 Apr 2025 17:57:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-4134412519891264439</guid><description>&lt;p&gt;&lt;span style="background-color: white; color: #0c0d0e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: 15px;"&gt;This may be a bug in SSMS, after restoring FULL and LOG backups when we start mirroring we get this error - To solve execute bellow commands so that mirroring will start -&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style="--_pr-img-mb: 0; --theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #0c0d0e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-size: 15px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-emoji: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px 0px 1.1em; padding: 0px; vertical-align: baseline;"&gt;&lt;b&gt;First &lt;/b&gt;In Mirror instance:&lt;/p&gt;&lt;pre style="--theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: #f6f6f6; border-radius: 6px; border: 0px; box-sizing: inherit; color: #0c0d0e; font-family: ui-monospace, &amp;quot;Cascadia Mono&amp;quot;, &amp;quot;Segoe UI Mono&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, Menlo, Monaco, Consolas, monospace; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-size: 13px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-emoji: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: 1.30769; margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0); vertical-align: baseline; width: auto;"&gt;&lt;code style="--theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; font-family: ui-monospace, &amp;quot;Cascadia Mono&amp;quot;, &amp;quot;Segoe UI Mono&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, Menlo, Monaco, Consolas, monospace; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;ALTER DATABASE DBNAME
    SET PARTNER =   
    'TCP://PRINCIPAL SERVER.DOMAIN:MIRRORING PORT NUMBER'  
 &lt;/code&gt;&lt;/pre&gt;&lt;p style="--_pr-img-mb: 0; --theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: white; border: 0px; box-sizing: inherit; clear: both; color: #0c0d0e; font-family: -apple-system, BlinkMacSystemFont, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-size: 15px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-emoji: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: inherit; margin: 0px 0px 1.1em; padding: 0px; vertical-align: baseline;"&gt;In Principal instance:&lt;/p&gt;&lt;pre style="--theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: #f6f6f6; border-radius: 6px; border: 0px; box-sizing: inherit; color: #0c0d0e; font-family: ui-monospace, &amp;quot;Cascadia Mono&amp;quot;, &amp;quot;Segoe UI Mono&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, Menlo, Monaco, Consolas, monospace; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-size: 13px; font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-emoji: inherit; font-variant-numeric: inherit; font-variant-position: inherit; font-variation-settings: inherit; line-height: 1.30769; margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0); vertical-align: baseline; width: auto;"&gt;&lt;code style="--theme-background-attachment: auto; --theme-background-color: hsl(0,0%,100%); --theme-background-position: top left; --theme-background-repeat: repeat; --theme-background-size: auto; --theme-base-primary-color-h: 27; --theme-base-primary-color-l: 48%; --theme-base-primary-color-s: 89%; --theme-body-font-color: hsl(210,8%,5%); --theme-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-button-active-background-color: initial; --theme-button-color: initial; --theme-button-hover-background-color: initial; --theme-button-hover-color: initial; --theme-button-outlined-border-color: initial; --theme-button-outlined-selected-border-color: initial; --theme-button-primary-active-background-color: initial; --theme-button-primary-active-color: initial; --theme-button-primary-background-color: initial; --theme-button-primary-color: initial; --theme-button-primary-hover-background-color: initial; --theme-button-primary-hover-color: initial; --theme-button-primary-selected-background-color: initial; --theme-button-primary-selected-color: initial; --theme-button-selected-background-color: initial; --theme-button-selected-color: initial; --theme-content-background-color: hsl(0,0%,100%); --theme-content-border-color: hsl(210,8%,85%); --theme-footer-background-border-top: 0; --theme-footer-background-color: hsl(210,8%,5%); --theme-footer-background-position: top left; --theme-footer-background-repeat: no-repeat; --theme-footer-background-size: auto; --theme-footer-divider-color: hsl(210,8%,25%); --theme-footer-link-color-hover: hsl(210,8%,90%); --theme-footer-link-color: hsl(210,9%,75%); --theme-footer-padding-bottom: 0; --theme-footer-padding-top: 0; --theme-footer-text-color: hsl(210,9%,75%); --theme-footer-title-color: hsl(210,8%,80%); --theme-header-background-border-bottom: 0; --theme-header-background-color: hsl(27, 89%, 48%); --theme-header-background-position: center left; --theme-header-background-repeat: repeat; --theme-header-background-size: auto; --theme-header-foreground-color: transparent; --theme-header-foreground-position: bottom right; --theme-header-foreground-repeat: no-repeat; --theme-header-foreground-size: auto; --theme-header-link-color: hsl(27, 89%, 48%); --theme-header-sponsored-color: hsla(0,0%,100%,0.4); --theme-link-color-hover: initial; --theme-link-color-visited: initial; --theme-link-color: initial; --theme-post-body-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-post-owner-background-color: hsl(210,80%,96%); --theme-post-owner-new-background-color: hsl(210,80%,91%); --theme-post-title-color-hover: var(--theme-link-color-hover); --theme-post-title-color-visited: var(--theme-link-color-visited); --theme-post-title-color: var(--theme-link-color); --theme-post-title-font-family: -apple-system,BlinkMacSystemFont,&amp;quot;Segoe UI Adjusted&amp;quot;,&amp;quot;Segoe UI&amp;quot;,&amp;quot;Liberation Sans&amp;quot;,sans-serif; --theme-primary-custom-100: hsl(27, 89%, calc(48% + ((100% - 48%) * .9))); --theme-primary-custom-200: hsl(27, 89%, calc(48% + ((100% - 48%) * .75))); --theme-primary-custom-300: hsl(27, 89%, calc(48% + ((100% - 48%) * .5))); --theme-primary-custom-400: hsl(27, 89%, 48%); --theme-primary-custom-500: hsl(27, 89%, calc(48% + (48% * -.3))); --theme-primary-custom-600: hsl(27, 89%, calc(48% + (48% * -.6))); --theme-primary-custom: hsl(27, 89%, 48%); --theme-topbar-bottom-border: 1px solid hsl(210,8%,85%); background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; font-family: ui-monospace, &amp;quot;Cascadia Mono&amp;quot;, &amp;quot;Segoe UI Mono&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, Menlo, Monaco, Consolas, monospace; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;"&gt;ALTER DATABASE DBNAME
    SET PARTNER =   
    'TCP://MIRRIR &lt;/code&gt;SERVER.DOMAIN:MIRRORING PORT NUMBER' &lt;/pre&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Restore oracle database on development server from production server using RMAN backup (Restore and Recovery Method)</title><link>https://www.msqlserver.in/2025/04/restore-oracle-database-on-development.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Mon, 7 Apr 2025 13:13:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-4439096158084111139</guid><description>&lt;p&gt;&amp;nbsp;Step 1) Copy Backup copies from Production to Development server using cp command&amp;nbsp;&lt;/p&gt;&lt;p&gt;[Source server Backup]$ scp -p bkup_j93m9af4_95849_1_1 bkup_ja3m9ahh_95850_1_1 bkup_jb3m9aju_95851_1_1 bkup_jc3m9amb_95852_1_1 bkup_jd3m9aqj_95853_1_1 bkup_je3m9aql_95854_1_1 bkup_jf3m9aqn_95855_1_1 c-87645678-20250407-00 oracle@Target server:&amp;lt;Backup Location&amp;gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Step 2) Once copy done connect to target server verify spfile and create pfile from spfile&lt;/p&gt;&lt;p&gt;[oracle@sreenu ~]$ !sq&lt;/p&gt;&lt;div&gt;sqlplus / as sysdba&lt;/div&gt;&lt;p&gt;SQL*Plus: Release 19.0.0.0.0 - Production on Mon Apr 7 08:56:30 2025&lt;/p&gt;&lt;p&gt;Version 19.21.0.0.0&lt;/p&gt;&lt;p&gt;Copyright (c) 1982, 2022, Oracle.&amp;nbsp; All rights reserved.&lt;/p&gt;&lt;p&gt;Connected to:&lt;/p&gt;&lt;p&gt;Oracle Database 19c Enterprise Edition 2 Release 19.0.0.0.0 - Production&lt;/p&gt;&lt;p&gt;Version 19.21.0.0.0&lt;/p&gt;&lt;p&gt;SQL&amp;gt;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; sho parameter spfile&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE&lt;/p&gt;&lt;p&gt;------------------------------------ ----------- ------------------------------&lt;/p&gt;&lt;p&gt;spfile&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string&amp;nbsp; &amp;nbsp; &amp;nbsp; /u01/opt/oracle/dbhome/dbs/spfilePROD.ora&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;SQL&amp;gt; create pfile from spfile;&lt;/p&gt;&lt;p&gt;File created.&lt;/p&gt;&lt;div&gt;Step 3) Check Listener status and stop Listener on Target server ( It will not allow incoming connections to connect database)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;[oracle@sreenu ~]$ lsnrctl status&lt;/div&gt;&lt;/div&gt;&lt;div&gt;[oracle@sreenu ~]$ lsnrctl stop&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4) Drop Database on target server (Before drooping the database take full backup of the development server )&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note1:Only we can drop/delete database on mount mode only&lt;/div&gt;&lt;div&gt;Note2:Before drooping the database we need to shutdown database and startup restrict mode&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SQL&amp;gt; shut immediate&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Database closed.&lt;/div&gt;&lt;div&gt;Database dismounted.&lt;/div&gt;&lt;div&gt;ORACLE instance shut down.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SQL&amp;gt; startup restrict mount;&lt;/div&gt;&lt;div&gt;ORACLE instance started.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total System Global Area 5905576504 bytes&lt;/div&gt;&lt;div&gt;Fixed Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8938040 bytes&lt;/div&gt;&lt;div&gt;Variable Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3909091328 bytes&lt;/div&gt;&lt;div&gt;Database Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1979711488 bytes&lt;/div&gt;&lt;div&gt;Redo Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7835648 bytes&lt;/div&gt;&lt;div&gt;Database mounted.&lt;/div&gt;&lt;div&gt;SQL&amp;gt; select name,open_mode from v$database;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; OPEN_MODE&lt;/div&gt;&lt;div&gt;--------- --------------------&lt;/div&gt;&lt;div&gt;PROD&amp;nbsp; &amp;nbsp; &amp;nbsp; MOUNTED&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; drop database;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Database dropped.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 5) Startup database using pfile in nomount mode.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SQL&amp;gt; startup nomount;&lt;/div&gt;&lt;div&gt;ORACLE instance started.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total System Global Area 5905576504 bytes&lt;/div&gt;&lt;div&gt;Fixed Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8938040 bytes&lt;/div&gt;&lt;div&gt;Variable Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3909091328 bytes&lt;/div&gt;&lt;div&gt;Database Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1979711488 bytes&lt;/div&gt;&lt;div&gt;Redo Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7835648 bytes&lt;/div&gt;&lt;div&gt;SQL&amp;gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; sho parameter pfile;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE&lt;/div&gt;&lt;div&gt;------------------------------------ ----------- ------------------------------&lt;/div&gt;&lt;div&gt;spfile&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string&lt;/div&gt;&lt;div&gt;SQL&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: Database started using by pfile.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 6) Restore controlfile from backup using RMAN tool / Prompt&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[oracle@czprg-tcora303 PROD]$ rman target /&lt;/div&gt;&lt;div&gt;&lt;div&gt;connected to target database: PROD (not mounted)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RMAN&amp;gt; restore controlfile from '/u01/opt/oracle/rman_bkup/PROD/c-87645678-20250407-00';&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Starting restore at 07-APR-25&lt;/div&gt;&lt;div&gt;using target database control file instead of recovery catalog&lt;/div&gt;&lt;div&gt;allocated channel: ORA_DISK_1&lt;/div&gt;&lt;div&gt;channel ORA_DISK_1: SID=21 device type=DISK&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;channel ORA_DISK_1: restoring control file&lt;/div&gt;&lt;div&gt;channel ORA_DISK_1: restore complete, elapsed time: 00:00:03&lt;/div&gt;&lt;div&gt;output file name=/u01/opt/oracle/control_files/control01.ctl&lt;/div&gt;&lt;div&gt;output file name=/u01/opt/oracle/control_files/control02.ctl&lt;/div&gt;&lt;div&gt;output file name=/u01/opt/oracle/mpx_PROD/control_files/control03.ctl&lt;/div&gt;&lt;div&gt;Finished restore at 07-APR-25&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 7) Once controlfile restored we need to bring database to mount mode.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt; alter database mount;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;released channel: ORA_DISK_1&lt;/div&gt;&lt;div&gt;Statement processed&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 8) restore database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RMAN&amp;gt; restore database;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 9) Once restore done , we need to recovery the database.&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt; recover database;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 10) Once recovery done , we need to open database using resetlogs.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;RMAN&amp;gt; alter database open resetlogs;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Statement processed&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;RMAN&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 11) Once restore and recovery done , we need to start database with spfile&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note: Always run database using spfile only.&lt;/div&gt;&lt;div&gt;Note: To change database from pfile to spfile, need to create spfile from pfile and bounce the database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SQL&amp;gt; create spfile from pfile;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;File created.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; shut immediate&lt;/div&gt;&lt;div&gt;Database closed.&lt;/div&gt;&lt;div&gt;Database dismounted.&lt;/div&gt;&lt;div&gt;ORACLE instance shut down.&lt;/div&gt;&lt;div&gt;SQL&amp;gt; startup&lt;/div&gt;&lt;div&gt;ORACLE instance started.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total System Global Area 5905576504 bytes&lt;/div&gt;&lt;div&gt;Fixed Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 8938040 bytes&lt;/div&gt;&lt;div&gt;Variable Size&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 3909091328 bytes&lt;/div&gt;&lt;div&gt;Database Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1979711488 bytes&lt;/div&gt;&lt;div&gt;Redo Buffers&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 7835648 bytes&lt;/div&gt;&lt;div&gt;Database mounted.&lt;/div&gt;&lt;div&gt;Database opened.&lt;/div&gt;&lt;div&gt;SQL&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 12) Verify Database mode and its running with spfile or not.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;SQL&amp;gt; sho parameter spfile&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TYPE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE&lt;/div&gt;&lt;div&gt;------------------------------------ ----------- ------------------------------&lt;/div&gt;&lt;div&gt;spfile&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string&amp;nbsp; &amp;nbsp; &amp;nbsp; /u01/opt/oracle/dbhome/dbs/spfilePROD.ora&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div&gt;SQL&amp;gt; select name,open_mode,log_mode from v$database;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NAME&amp;nbsp; &amp;nbsp; &amp;nbsp; OPEN_MODE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LOG_MODE&lt;/div&gt;&lt;div&gt;--------- -------------------- ------------&lt;/div&gt;&lt;div&gt;PROD&amp;nbsp; &amp;nbsp; &amp;nbsp; READ WRITE&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ARCHIVELOG&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SQL&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 13) Start Listener and check status&amp;nbsp;&lt;/div&gt;&lt;div&gt;[oracle@sreenu ~]$ lsnrctl start&lt;/div&gt;&lt;div&gt;[oracle@sreenu ~]$ lsnrctl status&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 14) Ask Application team to verify from application end.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Grant select access to specific object or tables</title><link>https://www.msqlserver.in/2025/04/grant-select-access-to-specific-object.html</link><author>noreply@blogger.com (Sai Sreenu)</author><pubDate>Fri, 4 Apr 2025 23:43:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-6783703928609145301</guid><description>&lt;p&gt;&amp;nbsp;We can grant select access to specific Tables / Objects in three ways&amp;nbsp;&lt;/p&gt;&lt;p&gt;Create Login on SQL server instance&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEiQxoyL4bbva3NIAwAhFIKvLU1fRDRg9htJiy5SqKwiH6SAOVDgCSCjuzCVkbJyuaQQXz5XYOaRSM252KoKs4X1N5vZtx5SjkW_HLouvCBV70EskVsSJIWHojGzqJChaQ5ekRiyH-OJGqDEeS0vghRyFowlTm4gIsL67rtOZ2h9stE3CUB9TY9wMtKdbAq5" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="271" data-original-width="456" height="190" src="https://blogger.googleusercontent.com/img/a/AVvXsEiQxoyL4bbva3NIAwAhFIKvLU1fRDRg9htJiy5SqKwiH6SAOVDgCSCjuzCVkbJyuaQQXz5XYOaRSM252KoKs4X1N5vZtx5SjkW_HLouvCBV70EskVsSJIWHojGzqJChaQ5ekRiyH-OJGqDEeS0vghRyFowlTm4gIsL67rtOZ2h9stE3CUB9TY9wMtKdbAq5" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In my case Login name Appteam&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEiFCQmlahljBbJ-Botej-JtejCe10ORNKOErLL9cjPAOHJnQCOQJGpUGiHoPbqNb-NsZ8mbwXCiexdMNnAKEKG1ffR-zbPzQpIJp9be0eNb89U8MMr3jf8cDYP9bDtZL7L9ju4ZCq1LATd-WyV6TEsDJbUwHANVUVfAglmS5rOQbfJg3eWtl0UfgUu0_Eo0" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="277" data-original-width="662" height="134" src="https://blogger.googleusercontent.com/img/a/AVvXsEiFCQmlahljBbJ-Botej-JtejCe10ORNKOErLL9cjPAOHJnQCOQJGpUGiHoPbqNb-NsZ8mbwXCiexdMNnAKEKG1ffR-zbPzQpIJp9be0eNb89U8MMr3jf8cDYP9bDtZL7L9ju4ZCq1LATd-WyV6TEsDJbUwHANVUVfAglmS5rOQbfJg3eWtl0UfgUu0_Eo0" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Don't Grant any server role to Login&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEie7I5ofL6GSTxZi411hu6t34zY092ev6VwnmqCXvGl2JGkIEvHZcIo5-TLckv1q22VaOLgQ4c99h6tMP7OzbVI41EtxqmM72B1fIER2IPInsc7obS-wxRuKbRbHPkMY4EVRpHnr6xxXmixIqRU9026NfCDoG_wVjVmKrFfgApEHpep5Is1HbGMcF25h9ra" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="274" data-original-width="258" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEie7I5ofL6GSTxZi411hu6t34zY092ev6VwnmqCXvGl2JGkIEvHZcIo5-TLckv1q22VaOLgQ4c99h6tMP7OzbVI41EtxqmM72B1fIER2IPInsc7obS-wxRuKbRbHPkMY4EVRpHnr6xxXmixIqRU9026NfCDoG_wVjVmKrFfgApEHpep5Is1HbGMcF25h9ra" width="226" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I need fetch data from TEST_Mirr database&amp;nbsp;&lt;/p&gt;&lt;p&gt;Don't grant any database role&lt;/p&gt;&lt;p&gt;Default public will be there&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEj2FVPNRH-G4U_fqPTS1f7IB-SlunJP1SbqY2biLwrje9AG156V94aqvbBVBatZ-t2UipQdRDMzN0uzhaLrClBhUkptbIcips-ptqgQk1fbplgQyofhS-qsOrgnzKuOKZqjm1Y98QbCLkZHWrRAFdJoA_WrFOGhFsKQm0l3yYgR78AB3k5PzWR_7W580XYD" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="390" data-original-width="629" height="198" src="https://blogger.googleusercontent.com/img/a/AVvXsEj2FVPNRH-G4U_fqPTS1f7IB-SlunJP1SbqY2biLwrje9AG156V94aqvbBVBatZ-t2UipQdRDMzN0uzhaLrClBhUkptbIcips-ptqgQk1fbplgQyofhS-qsOrgnzKuOKZqjm1Y98QbCLkZHWrRAFdJoA_WrFOGhFsKQm0l3yYgR78AB3k5PzWR_7W580XYD" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;On Database user will be created automatically&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjnx2SXodX-pyuBkQgVYkptZoh_wIToyPaVjoTgHAz7rd5FKpvQ2yc7SktATRFCPcNzeQ4-2s-Jeo_2FoddGz7x_LXp6_wCZpF7oi46N3eCX446SnfNDEjPh22UDEotaHAmP7fgbIBqGdkXEJP8aW58rFEaha9EM7cyrK3UivVKOXbe8C6vaopVO8JnxdF-" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="320" data-original-width="326" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEjnx2SXodX-pyuBkQgVYkptZoh_wIToyPaVjoTgHAz7rd5FKpvQ2yc7SktATRFCPcNzeQ4-2s-Jeo_2FoddGz7x_LXp6_wCZpF7oi46N3eCX446SnfNDEjPh22UDEotaHAmP7fgbIBqGdkXEJP8aW58rFEaha9EM7cyrK3UivVKOXbe8C6vaopVO8JnxdF-" width="245" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Here for Appteam not showing any tables on the TEST_Mirr database&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEiG1SK9VYvUZHT49XbrpsqlAOUXn6PQIC5kPAfc6lwz6h1Fqcuy1JVW4qFKTGfO85dcM_O2URAwXMp11Y_ql1sL6zhVyoxIV7p7tO-bdpvNdIelMgiRQPlLvUZtG9Dp-tjPOFuhivNTurVPTlJ5uyJ97IFpI9K_cRo0nDd4IF3GnrvYz4Gpan60-SEpWS9C" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="58" data-original-width="529" height="35" src="https://blogger.googleusercontent.com/img/a/AVvXsEiG1SK9VYvUZHT49XbrpsqlAOUXn6PQIC5kPAfc6lwz6h1Fqcuy1JVW4qFKTGfO85dcM_O2URAwXMp11Y_ql1sL6zhVyoxIV7p7tO-bdpvNdIelMgiRQPlLvUZtG9Dp-tjPOFuhivNTurVPTlJ5uyJ97IFpI9K_cRo0nDd4IF3GnrvYz4Gpan60-SEpWS9C" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhbdNNJJebDuVSv0EyMgmLPkF2EiBc_pAkIwIz-DrvXfTE05zse8YpCUg6n3ukTDzF8KpFHCeebWMdL9XtTQwwJR0Ki8OxRUlz0_KtvgSxkYYzeAuiHTcK0H8HIG267xoVIS-WR0YsGiZHYJrcV7JjHZ0Aj-ADUoG1RciaoFHujDfXdOqVwhBNPJYrVdMep" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="351" data-original-width="375" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEhbdNNJJebDuVSv0EyMgmLPkF2EiBc_pAkIwIz-DrvXfTE05zse8YpCUg6n3ukTDzF8KpFHCeebWMdL9XtTQwwJR0Ki8OxRUlz0_KtvgSxkYYzeAuiHTcK0H8HIG267xoVIS-WR0YsGiZHYJrcV7JjHZ0Aj-ADUoG1RciaoFHujDfXdOqVwhBNPJYrVdMep" width="256" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1) using T SQL&amp;nbsp;&lt;/p&gt;&lt;p&gt;Granted select on below two tables for Appteam user&lt;/p&gt;&lt;p&gt;use TEST_Mirr&amp;nbsp;&lt;/p&gt;&lt;p&gt;Grant select on conn1 to Appteam&lt;/p&gt;&lt;p&gt;Grant select on conn2 to Appteam&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEjfwf_f52JzCzIWf85Uks1dtcOw4vX-cMmOIXXaYPFnx9GqCdvk2ApFyGp2n7Hoyov_eDek5SN6WKryVhtd4skQ507EyZy07lYohhsGiumzfjFvGXDXrj86DAzpsehQ9lZFY1w3d-hIzCyUBoDxn1wv4AtSGtAm602QbDp0YfgXETrvUgVuQNYJSGv2QCUY" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="238" data-original-width="328" height="232" src="https://blogger.googleusercontent.com/img/a/AVvXsEjfwf_f52JzCzIWf85Uks1dtcOw4vX-cMmOIXXaYPFnx9GqCdvk2ApFyGp2n7Hoyov_eDek5SN6WKryVhtd4skQ507EyZy07lYohhsGiumzfjFvGXDXrj86DAzpsehQ9lZFY1w3d-hIzCyUBoDxn1wv4AtSGtAm602QbDp0YfgXETrvUgVuQNYJSGv2QCUY" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2) Using GUI&amp;nbsp;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Using Admin session go to user properties&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEime382v-p3OEhBwy1VOZRjjd9bt_ThvLFmdxDL7yB7XQg6HDj9l62PGs7Y1cKK7VmftQTnqTgXLixuXa8IsqLoeP8N_aVFwL1t30gbl0dx6BRwitBXnSrdxG3g7sVkSlctAUbJc1xCk48fp-AdGgQG78hCq6ZnORpZA2mC0umN35NtLUt22WCeZBm_D0da" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="826" data-original-width="877" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEime382v-p3OEhBwy1VOZRjjd9bt_ThvLFmdxDL7yB7XQg6HDj9l62PGs7Y1cKK7VmftQTnqTgXLixuXa8IsqLoeP8N_aVFwL1t30gbl0dx6BRwitBXnSrdxG3g7sVkSlctAUbJc1xCk48fp-AdGgQG78hCq6ZnORpZA2mC0umN35NtLUt22WCeZBm_D0da" width="255" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Click on search and select all objects of the types and click ok , it will pop up new dialog box&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEgpjz85UPRhdg3BsilhbRskeCLuOKrRuuTgBcBnCa7m1GumrJ6RJ2mfFt9lZQnvEy6fpyxgrDvmwWc_6lElMLiAbPG7qFQefMrA5LDrnNNNzFbFVLZTGFHrisAUjQXfk4Utdzl2FoEZEO3_cLQTsyRhAB8ZzDRX9cEyzLXMIqrpby-4FxOEOxqhkG9Q5koz" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="694" data-original-width="647" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEgpjz85UPRhdg3BsilhbRskeCLuOKrRuuTgBcBnCa7m1GumrJ6RJ2mfFt9lZQnvEy6fpyxgrDvmwWc_6lElMLiAbPG7qFQefMrA5LDrnNNNzFbFVLZTGFHrisAUjQXfk4Utdzl2FoEZEO3_cLQTsyRhAB8ZzDRX9cEyzLXMIqrpby-4FxOEOxqhkG9Q5koz" width="224" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Select Tables and click OK&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhbBMNnrne9ssDAn74Hrr0NXAHfdPItWEZFJtxGFkMxKUJc7PP0pZk8X7tqwP5SGKS99BDCt9JsG-mK5IVEA_uXpI4QdIYANN4fn4iytDhfsZWQvi2dgjHAljnbVCnpWLaRrg45yBzNAW5eFct7xVSJVEN-1ZSte10S7SZNQrh17X-_aZ5h5Gkid7TyPDbV" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="382" data-original-width="614" height="199" src="https://blogger.googleusercontent.com/img/a/AVvXsEhbBMNnrne9ssDAn74Hrr0NXAHfdPItWEZFJtxGFkMxKUJc7PP0pZk8X7tqwP5SGKS99BDCt9JsG-mK5IVEA_uXpI4QdIYANN4fn4iytDhfsZWQvi2dgjHAljnbVCnpWLaRrg45yBzNAW5eFct7xVSJVEN-1ZSte10S7SZNQrh17X-_aZ5h5Gkid7TyPDbV" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This time i am going grant select access on Output_Field table&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhVS8TQPz2Vkgj3J3l2lf4KOsygpG424iB2HE8GaY_LQW6RFk0XHnD1BMYglbBXWAuK4LsGi3a7XaSE63ET6_B0avGY6Fbyljh1tsxQ7FRGdsyLbUviitBd5WVMrYPRhXpi3gOCwCCkVFttOyrBYqx8E9KFDO6jmU_T--w31ZKRo5UYkREsu0bn59JD-msY" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="782" data-original-width="657" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEhVS8TQPz2Vkgj3J3l2lf4KOsygpG424iB2HE8GaY_LQW6RFk0XHnD1BMYglbBXWAuK4LsGi3a7XaSE63ET6_B0avGY6Fbyljh1tsxQ7FRGdsyLbUviitBd5WVMrYPRhXpi3gOCwCCkVFttOyrBYqx8E9KFDO6jmU_T--w31ZKRo5UYkREsu0bn59JD-msY" width="202" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;After granting select permissions on Output_Field table&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEgb6z7hFYPatMwpeLV8oquEKpsnDd_DmZjuzimPMMRhKvlABQPhIUNTe2pVP-jarjm-P4BjtTned1CHBlDnx4G5uaWLeKe_pOyNYGbXtGOFdI9l-wRI34kXrbkH1-BDTc0OWOFEkNPCTVcnNB284uoiz4HIYb2i5fyUDp4BqXkq0P44M4pYdb0yz2CYjbf7" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="259" data-original-width="297" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEgb6z7hFYPatMwpeLV8oquEKpsnDd_DmZjuzimPMMRhKvlABQPhIUNTe2pVP-jarjm-P4BjtTned1CHBlDnx4G5uaWLeKe_pOyNYGbXtGOFdI9l-wRI34kXrbkH1-BDTc0OWOFEkNPCTVcnNB284uoiz4HIYb2i5fyUDp4BqXkq0P44M4pYdb0yz2CYjbf7" width="275" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3) Using Table Properties&amp;nbsp;&lt;/p&gt;&lt;p&gt;For which we need to grand select on the table go to that table properties&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhtq8yQY-InP-7OzJGWZXbg1L8a3D48ht7hnlN0PGfCLzYINy7KBH5iJdy4N6Ql-hJgvD3IoVs363No7HrWipHRDRtwoq1nIhz21JE_ZjtuCz0i2IOqvtBN_bvEqLDYeEtOO7SBe20wsgS6d366m7xS1t8WsDvbCES3XDCnovhRp36EshYGaQ4_5AouFsP1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="615" data-original-width="512" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEhtq8yQY-InP-7OzJGWZXbg1L8a3D48ht7hnlN0PGfCLzYINy7KBH5iJdy4N6Ql-hJgvD3IoVs363No7HrWipHRDRtwoq1nIhz21JE_ZjtuCz0i2IOqvtBN_bvEqLDYeEtOO7SBe20wsgS6d366m7xS1t8WsDvbCES3XDCnovhRp36EshYGaQ4_5AouFsP1" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Go to permissions tab &amp;gt;&amp;gt;&amp;gt; search for a user &amp;gt;&amp;gt;&amp;gt; grant select as shown in below screenshots&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEik5eEq7uaMCe7gOb0qdV8IZyIkaitvQgHh2dSgOWuahoTeVQ8TFgdY5Kvi4KyF2bBWLcYJvXuD6YkPv-DvEJ2XKa4ncuA33zeF7e6EvpTpeGUoGX3P7f0lCowvTRbEhtRbTxWz-cy4Aw1ERVgiTRLBsrsjrDHOVwltp9URCdM2n5iDFBNhNL1TtBjAod49" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="367" data-original-width="879" height="134" src="https://blogger.googleusercontent.com/img/a/AVvXsEik5eEq7uaMCe7gOb0qdV8IZyIkaitvQgHh2dSgOWuahoTeVQ8TFgdY5Kvi4KyF2bBWLcYJvXuD6YkPv-DvEJ2XKa4ncuA33zeF7e6EvpTpeGUoGX3P7f0lCowvTRbEhtRbTxWz-cy4Aw1ERVgiTRLBsrsjrDHOVwltp9URCdM2n5iDFBNhNL1TtBjAod49" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhzvVwEh9rvGytWM2ocZ7XjLewiZpXstM7SBy-mlfNUPV6F2TOo1BConzhA9k0L5x_JJ2cN-9pbZceGdGK7K14bbzJ6IJX4dv0D3cYtkngiteP1D2Try2oPIOPSq6dgqGRDBYeWga0LJ3CXtYMdJAKAMcwNdR7bQ9p-OjtdAM2MaMASz5IV0GroJko1uc5C" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="808" data-original-width="663" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEhzvVwEh9rvGytWM2ocZ7XjLewiZpXstM7SBy-mlfNUPV6F2TOo1BConzhA9k0L5x_JJ2cN-9pbZceGdGK7K14bbzJ6IJX4dv0D3cYtkngiteP1D2Try2oPIOPSq6dgqGRDBYeWga0LJ3CXtYMdJAKAMcwNdR7bQ9p-OjtdAM2MaMASz5IV0GroJko1uc5C" width="197" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Now we can see all the tables which we granted select access&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhYyOrcP0WeV2KPVOmfO0EsI0g_nGYFSocMThmiXcjY7hz7GzKLrvI1EwecDYX4OBjsEjA-J0TJh7-txwIA38gdv-RaW0B_91OG1m-8qtvZvzJ3HqMkuO3E-9-4U3vmTkltXwHSCz_iHVFLvW_syCyLhF2OqvbA7YCqeWdM77nxnQqZg5e3Amrd7EfF7Bd3" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img alt="" data-original-height="318" data-original-width="291" height="240" src="https://blogger.googleusercontent.com/img/a/AVvXsEhYyOrcP0WeV2KPVOmfO0EsI0g_nGYFSocMThmiXcjY7hz7GzKLrvI1EwecDYX4OBjsEjA-J0TJh7-txwIA38gdv-RaW0B_91OG1m-8qtvZvzJ3HqMkuO3E-9-4U3vmTkltXwHSCz_iHVFLvW_syCyLhF2OqvbA7YCqeWdM77nxnQqZg5e3Amrd7EfF7Bd3" width="220" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEiQxoyL4bbva3NIAwAhFIKvLU1fRDRg9htJiy5SqKwiH6SAOVDgCSCjuzCVkbJyuaQQXz5XYOaRSM252KoKs4X1N5vZtx5SjkW_HLouvCBV70EskVsSJIWHojGzqJChaQ5ekRiyH-OJGqDEeS0vghRyFowlTm4gIsL67rtOZ2h9stE3CUB9TY9wMtKdbAq5=s72-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>The feature “Scale-out deployment” is not supported in this edition of Reporting Services </title><link>https://www.msqlserver.in/2024/12/the-feature-scale-out-deployment-is-not.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Mon, 9 Dec 2024 15:05:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-5532911722465176401</guid><description>&lt;p&gt;&lt;br /&gt;Step1 :Connect to SSMS&lt;/p&gt;&lt;p&gt;Step2: Open New query window&amp;nbsp;&lt;/p&gt;&lt;p&gt;Step3: run below query&lt;/p&gt;&lt;p&gt;Use Report server&lt;/p&gt;&lt;p&gt;&lt;span&gt;go&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Select * from Keys&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Step4: List all the keys that needs to be deleted, except the NULL one.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Note: Don't delete NULL this is current one.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Step5:&amp;nbsp; Execute below command&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Delete from Keys where instalationID=&amp;lt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Step 6: Restart SSRS&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img data-original-height="223" data-original-width="812" height="176" src="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4=w640-h176" width="640" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;span class="SCXW216341236 BCX8" face="&amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web&amp;quot;, Arial, Verdana, sans-serif" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; background-color: white; display: inline-block; margin: 0px; padding: 0px; user-select: text; white-space-collapse: preserve;"&gt;&lt;span class="WACImageContainer NoPadding DragDrop BlobObject SCXW216341236 BCX8" role="presentation" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; cursor: move; display: inline-block; height: 414px; left: 0px; margin: 0px; padding: 0px; position: relative; top: 2px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span class="WACImageBorder SCXW216341236 BCX8" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; display: block; font-size: 12px; height: 414px; left: 0px; margin: 0px; padding: 0px; position: absolute; text-wrap-mode: nowrap; top: 0px; transform: rotate(0deg); user-select: text; width: 600px;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="TextRun EmptyTextRun SCXW216341236 BCX8" data-contrast="auto" face="Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, sans-serif" lang="EN-GB" style="-webkit-tap-highlight-color: transparent; -webkit-user-drag: none; background-color: white; font-size: 12pt; font-variant-ligatures: none; line-height: 22.0875px; margin: 0px; padding: 0px; user-select: text; white-space-collapse: preserve;" xml:lang="EN-GB"&gt;&lt;/span&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/a/AVvXsEhSauwXY1g6kpgSwHJhb5qZIAjTFnJdv-h9uFjR38RSfweKqvCF0p1Vd3JaUQO6HgKsQBv7K1VQHf7eMYmdUjJTIZ8Da0aOtHOvZdigkMa43Wtlyn8Pr6u-oyEYFwrlFHwlh1Iu5dzuUU82grYfAf58keeFvwEhl0ce4Kv919PslVvMCvPhlXrsS8aWnG4=s72-w640-h176-c" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server Performance issue - With DB Compatibility upgrade from 120 to 150</title><link>https://www.msqlserver.in/2024/10/sql-server-performance-issue-with-db.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Sun, 27 Oct 2024 17:07:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-6784794949194356797</guid><description>&lt;p&gt;&lt;b&gt;Worked Solution:&lt;/b&gt;&lt;/p&gt;&lt;p&gt;We turned on the Legacy Cardinality Estimation on the database properties.&amp;nbsp;&lt;/p&gt;&lt;p&gt;If anyone has other solutions please comment.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SQL Server 2022 Services Failed To Come Online.</title><link>https://www.msqlserver.in/2024/01/sql-server-2022-services-failed-to-come.html</link><author>noreply@blogger.com (PRADYOTHANA)</author><pubDate>Wed, 24 Jan 2024 16:30:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-1143967542545591578.post-7200171396041940886</guid><description>&lt;p&gt;Error:&amp;nbsp;Script level upgrade for database ‘master’ failed because upgrade step msdb110_upgrade.sql encountered error 926, state 1, severity 25&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The above error will be present in the Error log and the solution will be to start the SQL Server either from /T902 or add this in strtup parameter to permently resolve this issue.&amp;nbsp;&lt;/p&gt;&lt;p&gt;This will bypass the upgrade script and starts the SQL Server.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Reference:&lt;/p&gt;&lt;p&gt;&lt;a href="https://blog.sqlauthority.com/2019/04/04/sql-server-script-level-upgrade-for-database-master-failed-because-upgrade-step-msdb110_upgrade-sql-encountered-error-8649-state-1-severity-17/"&gt;https://blog.sqlauthority.com/2019/04/04/sql-server-script-level-upgrade-for-database-master-failed-because-upgrade-step-msdb110_upgrade-sql-encountered-error-8649-state-1-severity-17/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>