In: SQL Server|SSIS
Written by: Taylor Gerring
Undoubtedly, you’re reading this because you’ve discovered that SQL Server Integration Services (as of SSIS 2008) will not allow you to set the password of an FTP connection through expressions. Fortunately, there is an easy workaround, that requires a simple Script Task. While not as simple as native expression support, it’s darn close. I’ve included C# code, but you may need to adapt to VB.Net if that’s your preferred flavor.
Read the rest of this entry »
In: SQL Server|SSIS
Written by: Taylor Gerring
It seems that SSIS can’t handle embedded text qualifiers when importing from a flat file. What is an embedded text qualifier? Let’s say you have a CSV file with a few fields. To thwart problems with commas inside your text fields causing confusion with your column delimiters, you implement a text qualifiers – typically double quotes. It makes a row look something like this:
"12036","Company Name, Inc.","555-555-1234","3.14159"
That’s fine, but what happens when the field also contains quotes, such as this:
"52665","Best "Kept" Secret Storage Facility","555-555-9876","2.71828"
In: SQL Server
Written by: Taylor Gerring
Unlike my last post on the issue, instead of simply pointing to another blog for instructions on how to query Active Directory from SQL Server, I’ll provide some useful tips on getting things all working.
Read the rest of this entry »
In: Windows
Written by: Taylor Gerring
I have a project where each object creation script is stored in a separate file. Between the tables, views, linked servers, stored procedures, functions, jobs and schemas, this results in roughly 400 objects and therefore 400 files. Trying to run these separately for a new installation simply is not feasible; I needed a quick, automated solution to combine all files into a single build script, while at the same time easily control the order of creation so dependent objects can be created in the correct order.
The solution I settled on was to simply store the list of files in the correct order inside a plain text file. I can then use a batch or shell script to compile a single, larger file. Instead of relying on an archaic DOS batch file, I decided to teach myself a bit of Powershell.
Read the rest of this entry »
In: SQL Server
Written by: Taylor Gerring
As either a DBA or DBD, undoubtedly, you’ve needed to create a user account with very specific permissions. Especially when that account is based on Windows authentication, it can be particularly difficult to test and verify the correct permissions were assigned. However, if you have the access – say, sysadmin – you can simply impersonate the account yourself and verify everything is set correctly. Here’s how:
Read the rest of this entry »
