Create DB

  • Currently we have a C# reader doing this off a tsql script. Question can I do this within SSIS?

    EXECUTE (N'CREATE DATABASE [%DATABASE%]

    ON (NAME = ''%DATABASE%'', FILENAME = N''' + @SQL_path + N'%DATABASE_DATA%.mdf'', SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB)

    LOG ON (NAME = ''%DATABASE%_Log'', FILENAME = N''' + @SQL_path + N'%DATABASE%_Log.ldf'' , SIZE = 26816KB , MAXSIZE = 2048GB , FILEGROWTH = 10%) ')

    GO

    I thought that maybe I could use the sql task but I need a db to associate to. Would I use a script task? If so any examples would be great.

  • Have you tried using a SQL task?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply