dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Help with create database script

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Posts
    596

    Help with create database script

    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.

  2. #2
    Join Date
    Feb 2008
    Location
    Bangalore
    Posts
    149

    Re: Help with create database script

    I doubt about from Higher version to lower version compatibility!
    Encourage the efforts of fellow members by rating

    Lets not Spoon Feed and create pool of lazy programmers

    - ComIT Solutions

  3. #3
    Join Date
    Dec 2009
    Posts
    596

    Re: Help with create database script

    Hey everybody. After an SQL Server database is created you can change the compatibility from 2008 to 2005 in script with the following code:

    ALTER DATABASE myDatabase
    SET SINGLE_USER
    GO
    EXEC sp_dbcmptlevel myDatabase, 90;
    GO
    ALTER DATABASE myDatabase
    SET MULTI_USER
    GO

    In case anyone needs the information

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)