Transaction log is full error – Steps to truncate the transaction log.

Some times while trying to contribute to your site you will get 'Unexpected error' or HResult error with some error code. If you investigate further by looking into the event viewer log, you will find that a SQL Server error has occured which states that the transaction log is full. Follow the below steps to... Continue Reading →


SQL Query to get results along with the parameter -Useful in SSRS as Dropdown Seperator

I was working on a SSRS report having two dropdown controls State & District which behaves as a parent -child dropdown. My table looks like State1 District1 State1 District2 State1 District3 State1 District4 State2 District5 State2 District6 State2 District7 And when I select State from the first Drop Down, I need the District drop down... Continue Reading →

Stored procedure to execute a dtsx (SSIS) package

CREATE PROCEDURE [dbo].[T_Town Snapshot_Call] AS BEGIN DECLARE @FilePath   varchar(1000) DECLARE @Filename   varchar(128) DECLARE @path varchar(2000) DECLARE @cmd varchar(7000) SET @FilePath='C:\Inetpub\wwwroot\CRITown\CRITownDatabase\' SET @Filename='TownSnapshotPackage.dtsx' SET @path='"C:/Program Files (x86)/Microsoft SQL Server/90/DTS/Binn/"' SELECT @cmd = 'C:\PROGRA~2\MICROS~2\90\DTS\BINN\DTExec.exe /F "' + @FilePath + @Filename + '" /CHECKPOINTING OFF' EXEC master..xp_cmdshell  @cmd END

Getting column names from a table – SQL Query

Below is the query to get all the column names from your table. SELECT column_name 'Column Name' FROM information_schema.columns WHERE table_name ='table_name' The query uses  "information_schema.columns"  to get the column details of the table. There are also other information of your table like data type of column same as column_name which you can retrieve using... Continue Reading →

Create a website or blog at

Up ↑

%d bloggers like this: