Excel

Thursday, September 13, 2012

SSIS - Creating SQL server Agent Proxy Account for SSIS Package Execution

       When you are trying to perform some file system task in SSIS or while attempting to read/write some files from the remote locations, the job which uses SSIS package will require the permission to access the network location.
       If your windows NT account has all the rights to access the particular loaction then the package will work fine while runnig the package from BIDS. But the same will not work if you run the package from SQL Server Agent Job. Since the SQL Server Agent will be running on the 'sa' account by default. And this SQL admin will not have permission to access the file sytems.
      So, to make it run from the SQL Server Agent, we have to create new credential (of Windows NT account) which will have all the access to the specific file server or network location.
       And we have to create Proxy for the SQL Server Agent which uses the newly created credential. And the Proxy should be associated with the Subsystem SSIS.

 Please find the detailed steps written in the following blogs :
http://www.vincepergolizzi.com/2012/03/setting-up-sql-server-agent-proxies-for-ssis-packagese/
http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
Thanks for the authors of those blogs. :-)

Sunday, September 9, 2012

Search the Column on the DB (SQL Server)

          To find a particular column from all the tables available on the particular  DB, We can use the following sql query :

SELECT tab.name AS table_name,
col.name AS column_name
FROM sys.tables AS tab
INNER JOIN sys.columns col ON tab.object_id  = col.object_id
WHERE col.name LIKE '%SalesDoc%'  -- Column Name