Archive for the 'SQL Server 2005' Category
Monday, May 12th, 2008
ExecutionInstanceGUID is a system variable of type string. If you are exporting this variable to a package management, custom logging or auditing table ensure that you have the correct mapping in your execute SQL task. It is a string variable and not a GUID (the same applies to other variables whose type may not be the same as the value they represent).

(more…)
Posted in Nuggets, SSIS, SQL Server 2005, Datawarehouse, Methodology | No Comments »
Friday, April 4th, 2008
As the SSIS send mail component doesn’t have an option to send html formatted messages, I thought it would help to post some code that implements the system.web.mail namespace.
Considering that sending messages is quite a regular task for any organisation, it might even be worth creating this as a standalone package and calling it each time you need to send a mail. Or even better still, writing a custom component instead.

(more…)
Posted in Nuggets, SSIS, SQL Server 2005, Scripting | 1 Comment »
Tuesday, April 1st, 2008
If you are trying to execute some Jet SQL DDL like CREATE TABLE or DROP TABLE against an Excel workbook and you get this message:
Executing the query “DROP TABLE [Sheet1];” failed with the following error: “Cannot modify the design of table ‘Sheet1′. It is in a read-only database.”.

(more…)
Posted in Nuggets, SSIS, Fixes, SQL Server 2005, Jet 4.0 | 3 Comments »
Friday, March 28th, 2008
The order of the configurations used in the development studio is not the same as the order used by DTEXEC, specifically in relation to parent package variables.
Parent Package variables always have the lowest priority no matter what order you set in the configuration manager.
Microsoft have recently added a note to BOL on this subject here
Amazon Link: Microsoft SQL Server 2005 Integration Services
(more…)
Posted in Nuggets, SSIS, SQL Server DBA, SQL Server 2005, Methodology | No Comments »
Wednesday, March 26th, 2008
I recently saw some forum posts on SSC.com asking if there was a way to bulk import DTS 2000 packages into a SQL 2005 database.
The answer is that you can use the DTSBackup utility available for download at www.sqldts.com. Its a lightweight and extremely useful tool that can save hours of mouseclicking, and it works on both SQL 2000 and 2005.
Amazon Link: SQL Server 2000 Developer Edition
Posted in Nuggets, SQL Server DBA, SQL Server 2005, SQL Server 2000 | No Comments »
Tuesday, March 18th, 2008
Normally in SSIS when we want to issue a SQL command against each row in a dataflow, we use the OLE DB Command component. When executed against SQL Server the command normally takes the form:-
UPDATE dbo.TableName SET ColumnName1 = ? WHERE ColumnName2 = ?
Where “?” can be mapped to the incoming columns in the order they are written.
However you will find that when you are using this component against an Access database, that this syntax will not work. You will get an error saying:
There is more than one data source column with the name “?”. The data source column names must be unique.
Amazon Link: Microsoft® Office Access™ 2007 Inside Out (Inside Out (Microsoft))
(more…)
Posted in Nuggets, SSIS, SQL Server 2005, Jet 4.0 | 1 Comment »
Wednesday, March 5th, 2008
Given the problems inherent in loading excel files with SSIS, I thought it might be useful to share with you some code to get you started on interrogating it’s schema prior to running your Execute SQL control tasks or your dataflows.
This is especially useful for me as it allows me to test column names, worksheet names and datatypes etc prior to attempting to load the data (I have found that users have a tendency to format and rename sheets without realising the impact it has on the import). There are other uses too…

(more…)
Posted in Nuggets, SSIS, SQL Server 2005, Methodology, Scripting, Jet 4.0 | No Comments »
Wednesday, February 20th, 2008
The quick answer to this is that you can’t… at least not in a dataflow. Whilst you can dynamically change environments and databases, the column metadata has to remain the same. It’s therefore fairly limited as to what you can load “on the fly”.
There is a work around however for those of you who wish to be able to create a looping mechanism in a single package with a single task to load the data.
Amazon Link: SQL Server 2000 Fast Answers for DBAs and Developers, Signature Edition
(more…)
Posted in Nuggets, SSIS, SQL Server 2005, Datawarehouse, Methodology | 4 Comments »
Wednesday, February 13th, 2008
If you are having problems setting the password to the FTP task in SSIS, then the likelyhood is you are trying to use an expression to set it (can’t be done); being caught out by clicking [OK] (finger trouble) in the FTP connection manager editor, or you’re struggling with the encryption settings (a long subject) for your package.
I don’t want to enter into discussion here on the encryption level you use (I will discuss that in another post some other time), merely this post just contains some simple code that you can use to set the password with a script component placed before the FTP task.
Amazon Link: Hands-On Microsoft SQL Server 2005 Integration Services
(more…)
Posted in SSIS, SQL Server 2005, Scripting | 8 Comments »
Tuesday, February 12th, 2008
This script might be the best SQL insert generator I’ve seen yet. It’s flexible and deals quite comfortably with the majority of problems a dev can come across when attempting to write one of these. Why re-invent the wheel.
Take a look at the website, there are plenty of neat tips and tricks.
Cheers
Frank
Amazon Link: Microsoft SQL Server 2008 T-SQL Fundamentals (PRO-Developer)
Posted in Nuggets, SQL Server DBA, SQL Server 2005, T-SQL | No Comments »