Solved: “Could not load file or assembly ‘Microsoft.SqlServer.Management.Sdk. The system cannot find the file specified”

You may run into the error below while doing development in Visual Studio:

Could not load file or assembly ‘Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91′ or one of its dependencies. The system cannot find the file specified.

Solution

You are missing SQL Server libraries that connects Visual Studio to SQL Server database. In order to fix this issue, download and install these two packages from the following URL.

  • SharedManagementObjects.msi
  • DB2OLEDBV5_x64.msi

Download: www.microsoft.com/en-us/download/details.aspx?id=35580

Note: The URL above is for SQL Server 2012. Download libraries for the version you use if it is not 2012 version.

SQL Server database size estimator

A pretty cool tool by Matthew Randle to get an estimation for your SQL Server database size. It’s very useful especially if you’re designing server/storage infrastructure in a new project.

Note: Since most data types and indexes have similar sizes in SQL Server and Oracle, you may want to use this tool for Oracle as well.

How it works

  1. Create a dummy database with main tables and indexes
  2. Put some sample data
  3. Run the tool. Connect to database
  4. It will create a spreadsheet with the current size

Play with row counts so you can estimate the size it’ll have in the future

Download

More

Resolved: Truncation error on SQL Server Import and Export Wizard

You may run into this annoying error while exporting Excel data to SQL Server database:

Executing (Error)
Messages

  • Error 0xc020901c: Data Flow Task 1: There was an error with Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments] on Source – sites$.Outputs[Excel Source Output]. The column status returned was: “Text was truncated or one or more characters had no match in the target code page.”. (SQL Server Import and Export Wizard)
  • Error 0xc020902a: Data Flow Task 1: The “Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments]” failed because truncation occurred, and the truncation row disposition on “Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments]” specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)
  • Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source – sites$ returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)
Truncation error on SQL Server Import and Export Wizard
Truncation error on SQL Server Import and Export Wizard

Although you try different Excel versions, cell formats, export settings, this error won’t go away! It seems that it is a bug. There are some long and complicated workarounds on the net. However, no need to spend too much time for this simple process.

  • Error 0xc020901c: Data Flow Task 1: There was an error with Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments] on Source – sites$.Outputs[Excel Source Output]. The column status returned was: “Text was truncated or one or more characters had no match in the target code page.”. (SQL Server Import and Export Wizard)
  • Error 0xc020902a: Data Flow Task 1: The “Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments]” failed because truncation occurred, and the truncation row disposition on “Source – sites$.Outputs[Excel Source Output].Columns[Notice Comments]” specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)
  • Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source – sites$ returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)
Truncation error on SQL Server Import and Export Wizard
Truncation error on SQL Server Import and Export Wizard

Although you try different Excel versions, cell formats, export settings, this error won’t go away! It seems that it is a bug. There are some long and complicated workarounds on the net. However, no need to spend too much time for this simple process.

Solution

Instead of exporting Excel data to SQL Server database, firstly export your data to Access database. Then export Access database to SQL Server database. You will surprise how easy it!

Exporting Access data to SQL Server
Exporting Access data to SQL Server
Opeartion is successful!
Opeartion is successful!