Skip to main content

Posts

Showing posts from June, 2019

All Outbound Request in Siebel SQL Query

--All Outbound Requests-- SELECT SCR.REQ_NUM AS 'Request #' ,SCR.STATUS_CD AS 'Status' --,SCR.CM_SRVR_COMP_NAME AS 'Component Name' --,SCR.NAME AS 'Description' ,SCR.STATUS_MSG AS 'Status Message' --,SCR.DFLT_MEDIUM_CD AS 'Default Preference' --, AS 'Recipient Group' ,SCR.PROC_START_DT AS 'Start Time' ,SCR.PROC_END_DT AS 'End Time' ,SCR.CREATED AS 'Created' ,SCRU.LOGIN AS 'Created By' --,SCR.COMMENTS AS 'Comments' --Comm Request Source-- ,SCRS.SRC_ROW_ID AS 'Id' --Comm Package-- ,SDCP.NAME AS 'Name' ,SDCP.MEDIA_TYPE_CD AS 'Channel Type' --Request Recipient Source --,RCS.ROW_ID ,RCS.SR_NUM AS 'SR No' --Customer Record ,(ISNULL(CUS.FST_NAME, '') + ' ' + ISNULL(CUS.MID_NAME, '') + ' ' + ' ' + ISNULL(CUS.LAST_NAME, '')) AS 'Name ENU' FROM S_COMM_REQ SCR --Comm Parent Request LEFT JO...

Find SQL Table Fragmentation

For checking table fragmentation use below: DBCC SHOWCONTIG ('S_CONTACT') DBCC SHOWCONTIG (tablename) DBCC SHOWCONTIG (tablename, indexname) Response: DBCC SHOWCONTIG scanning 'S_CONTACT' table... Table: 'S_CONTACT' (1353212021); index ID: 1, database ID: 6 TABLE level scan performed. - Pages Scanned................................: 13919 - Extents Scanned..............................: 1742 - Extent Switches..............................: 1742 - Avg. Pages per Extent........................: 8.0 - Scan Density [Best Count:Actual Count].......: 99.83% [1740:1743] - Logical Scan Fragmentation ..................: 0.02% - Extent Scan Fragmentation ...................: 6.89% - Avg. Bytes Free per Page.....................: 956.4 - Avg. Page Density (full).....................: 88.18% DBCC execution completed. If DBCC printed error messages, contact your system administrator. ----- For fragmentation use below: DBCC DBREINDEX ('S_CONTAC...