FOLLOW US

Showing posts with label TSQL. Show all posts
Showing posts with label TSQL. Show all posts

Friday, January 18, 2013

List All SSIS Packages Deployed On Your Integration Server


One way of checking wich SSIS packages you've deployed on your integration server and wich version build numbers they have is by running a TSQL query against the MSDB database on the server where your integration services  is running.

I found the following blogpost with a very usefull TSQL script:

http://blog.hoegaerden.be/2010/01/10/list-all-ssis-packages-deployed-on-your-integration-server/

NOTE: the query was written for SQL Server 2008. For SQL Server 2005: sysssispackagefolders => sysdtspackagefolders90 and sysssispackages => sysdtspackages90.

Saturday, November 3, 2012

Delete duplicates from SQL without having a primary key

Recently I had a problem with finding duplicate records in a SQL table without having a primary key. Because I didn't want to create a primary key in the table, I had to use a different method in my SQL statement.

In the SQL example below you will see how to find the duplicate records. I used the SQL
ROW_NUMBER() function for it to differentiate between duplicate records.

DELETE SubQuery FROM
(SELECT ROW_NUMBER() OVER (PARTITION BY ID ORDER BY ID) NumOccurrences
FROM [dbo].[ClarizenDeletions]) SubQuery
WHERE SubQuery.NumOccurrences > 1