Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
viperbyte
Posting Yak Master
132 Posts |
Posted - 2010-03-13 : 10:12:52
|
Hello everybody. Does anyone know how to do a script like CREATE DATABASE myDatabase; that will create a version 9 compatible database(2005)? I'm using Microsoft SQL Server 2008 Developer. I will be using scripts as much as I can for documentation purposes so will avoid using the UI whenever possible. |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-13 : 10:32:09
|
ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 90 No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
viperbyte
Posting Yak Master
132 Posts |
Posted - 2010-03-13 : 11:13:15
|
Thanks WebFred. Do I do the CREATE DATABASE my_db my first then do ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 90 after the db is created. Or do i just code ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 90 without ever mentioning the CREATE keyword? |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-13 : 11:37:38
|
quote: Do I do the CREATE DATABASE my_db my first then do ALTER DATABASE my_db SET COMPATIBILITY_LEVEL = 90 after the db is created.
Yes, that's the way I know it... No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
viperbyte
Posting Yak Master
132 Posts |
Posted - 2010-03-13 : 11:39:51
|
Thank you very much! |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-03-14 : 08:45:16
|
welcome No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|