Sunday, April 22, 2007

Integration Heartache

Not really been learning to much new over the last couple of weeks. We have been moving the Isle of Mans system 'mainland' and integrating them into ours.
Found a useful feature of the SQL 2005 Enterprise manager though. We were doing a lot of dumping and loading databases, and wanted to write a SQL script that would do it, but couldn't find the correct syntax.
My boss then noticed that you can get Enterprise manager to 'script' certain tasks. Restoring a database was on of them. When you do the restore there is an option at the top left, it will save to a script what is currently set, or output it to a new window. Very Useful.

On another project I found out how to send optional parameters to a SQL stored procedure. When you declare the variables, make them = Null and you don't have to pass anything!