Free Information Technology Magazines and eBooks

Friday, May 01, 2009

How to translate SQL 2005 database script to sql 2000

SQL 2005 Generate ScriptsMy brother who is a newly computer science graduate was developing his first application for his first customer as a freelancer. It was a billing system from scratch using VB.NET and SQL 2005. He already generated the SQL 2005 database scripts to be use in deployment on his client's server. Unfortunately his customer has only SQL 2000 license and not SQL 2005. So the dilemma was, how can he deploy his application on SQL 2000? Will his SQL 2005 scripts work on SQL 2000?


He tried running the SQL 2005 scripts on the SQL 2000 query analyzer and the result was a series of errors that look like this:

Msg+170,+Level+15,+State+1,+Line+7Line+7:
+Incorrect+syntax+near+'('.


Lucky for him, his big brother knows the answer. You can translate SQL 2005 database scripts to a form that is executable or readable on SQL 2000. To generate such kind of SQL script, here is a step-by-step procedure:

1. Open your SSMS (SQL Server Management Studio).
2. Right click your database then choose "Generate Scripts" from the context menu.



3. In Choose Scripts Option, Find the "Script for Server version" then select SQL Server 2000.

Script for Server version Option

4. Click next to finish.

Then it will generate the scripts compatible to SQL Server 2000.

For more SQL fix, subscribe now.




0 comments: