June 2008 Entries

SQL SSIS, insert only new rows.

SSIS workflow is really amazing when you have to add some automatism in your data flow processes. But sometimes is better to make same checks before start with a really dangerous BULK operation. One of the most noise stuff I have to do is to launch insert of new records when I receive updates from web (web services, XML data). But when I do this I'm always afraid about duplicated rows. Ho to check if a row exist, in SSIS? SSIS Package contains a component called lookup. Very intuitive name. So if you need to insert only...

Bermuda Driving license.

Premise: if you come from Europe you will find this post very strange. The reason is that in Europe you can take an International driving license and use it where you want. But not in Bermuda!! If you want to take a Bike (Motorbike) or a Car you have to get the local Driving license. In addition you have to take 4 steps to drive everything. The first one is for the 50cc bike, then 100cc, then Automatic car and finally manual car. How to do it? First you have to go to the TCD (Transport Control...

Write intelligent query with if exist ... drop.

Usually when we build a query we start the .sql file, or command in the query editor with a simple command ... CREATE PROCEDURE ... bla bla bla. Ok but if I'm building a database from scratch is very probably that my procedure will be modified a lot of time. So every time we have to launch the command DROP PROCEDURE, or ALTER PROCEDURE. This sounds good if you are building your object. But in case of you want to store as a BACKUP PROCEDURE some scripts in the network, is better to produce this scripts as ATOMIC...

SQL 2005 and Linked server (Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO")

If you have a SQL 2005 machine with a (x64) installation, some of the system queries have a different name, like [some_command]sys_64. So when you try to connect your powerfull SQL2005 to an old remote SQL2000, probably in x32 version, you can receive a strange error like Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO". In many forums you can find a link to a microsoft KB that explains to you that you have to install the SP4 in the old SQL and maybe everything will done. Usually I like to know why something doesn't run ... So, when you execute from SQL2005 a...

Microsoft SQL Server 2005 Certifications Roadmap.

This year is a new year for me for everything, why? New location (Bermuda), new job (IT Manager) and new technologies (no more NET dev but SQL Dev). So why don't put in my life another new interest in different certifications? I have decided to became a MCITP (Microsoft Certified IT Professional). Here you can find a detailed description of all the seminaries. For MS SQL 2005 there are 3 ways. All the ways have the same startup. Exam 70-431  TS: Microsoft SQL Server 2005 – Implementation and Maintenance. With this exam you gain the MCTS SQL 2005....

My Birthday (30)

Happy Birthday to me ... Yep today I'm 30 so please connect to my blog, make a comment and say me HAPPY BIRTHDAY!!