Monday, 10 May 2010

SSIS Package Suffixing Date


SQL Server 2005 SSIS package Export to CSV with date Suffix. The default evaluation of SSIS expression puts DD-M-yyyy eg: 01/5/2010 instead of 01/05/2010. This causes issue when you are trying to import CSV into SQL Server especially when you are not controlling the file date format.

Simple way to change is using Expressions with format Specified below

"F:\\test" + (DT_WSTR, 20) DAY( getdate() ) + RIGHT("0" + (DT_WSTR, 20) datepart("mm", getdate() ),2) + (DT_WSTR, 4) YEAR( getdate() ) +".csv"

Wednesday, 5 May 2010

Extarct DLL from Assembly Cache

Step1: Start-->Run-->cmd
Step2: cd C:\WINDOWS\assembly\GAC_MSIL\
Step3: List the contents using dir command and change directory
for eg:cd CrystalDecisions.CrystalReports.Design

Step4: list the content using DIR and copy the file to the required destination

SSIS Error Code DTS_E_OLEDBERROR "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".

Recently migrated from SQL Server 2000 to SQL Server 2005 64bit on Windows 2003 64 bit.
After this started hitting error while importing Access DB into SQl server.

SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040154. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered".

Steps to Solve this issue:
1. Change the Run64bitRuntime property to False in Visual Studio Project Properties















2. Change the SQL Server Agent job to use 32 bit DTEXEC



"C:\Program Files (x86)\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\Telephone Records Import" /SERVER "." /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E