September 15, 2010 at 1:41 pm
Checking if anyone has experience doing this...
I have a datawarehouse (star schema)... one of the dimensions is company... based on the company, I have to create database with relevant data dynamically... basically need a Proc that will be parmaterized which creates database with data related to only that particular company....
Any suggestion is appreciated. Thanks!
September 15, 2010 at 2:24 pm
Is there a way through sql proc to script the table and db from original database and use that dynamically to create a database for the company using the new name? Once created, I can insert relevant records in the tables...
September 15, 2010 at 2:26 pm
I suppose you could just create a dynamic sql statement to create the database with the company name as a variable, and execute that.
September 15, 2010 at 2:30 pm
yes that we can do and I guess we can create the tables with relevant data also using the dynamic sql.... I have planned to do this, but was checking if we can get the script to create db and table and use that.. or at least I can script the constraints and keys. Thanks for the response.
September 15, 2010 at 6:39 pm
Ghanta (9/15/2010)
Is there a way through sql proc to script the table and db from original database and use that dynamically to create a database for the company using the new name? Once created, I can insert relevant records in the tables...
Could you just script a backup and restore dynamically?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 15, 2010 at 7:41 pm
Thanks Jeff I will check that option.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply