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

Wednesday, 3 February 2010

Dropping an oracle database

If you are running on UNIX launch $dbca and use delete a database option.
If you are using terminal console
1. Launch startxwin (cygwin xterm)
2. Add the server name to the access list
for instance: xhost (server hostname)
3. export DISPLAY
$export DISPLAY=(ip address of client):0.0
4. $dbca&

Wednesday, 23 December 2009

AJAX CalendarExtender

Simple fix for ASP.NET AJAX Calendar Extender not hiding on click is to use Calendar with an associated button
Use the PopupButtonID attribute to associate the button with textcontrol.




Tuesday, 15 December 2009

Submit url

Public key token for a .NET DLL or assembly

Could not load file or assembly one of its dependencies. The given assembly name or codebase was invalid.

Simple steps to find the .NET DLL or an assembly Public Key Token

1. Open Visual Studio command prompt and issue Sn -t
eg: C:\Program Files\Microsoft Visual Studio 9.0\VC>sn - somedll.dll

2. If the assembly is not already installed, Install the assembly using GAC utility
(gacutil.exe /i ) and then view the Public key token in c:\windows\assembly.

Note: The GAC utility can be found in C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin directory.