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 |
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2010-09-15 : 15:36:10
|
| Checking if anyone has experience doing this...I have a datawarehouse (star schema)... one of the dimension is companies... based on the company I have to create database 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! |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2010-09-15 : 16:07:50
|
| would company be a fact table?In any case...wouldn't you have a predefined idea of what you are going to build?Why would it be dynamic?and aren't dimensions the derived data?EDIT: I hate the buzz words for sheet I've been doing for decadesBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2010-09-15 : 16:27:40
|
| Thanks for responding!Company will be a dimension and we will create fct table for only records relevant to that company... other dimensions mostly will be copied as they are lookups mostly.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... or what you suggest? |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2010-09-15 : 16:35:40
|
| Yes it is a sql server... I think you are saying get the script task using mangement studio and use that in dynamic sql correct? that is a good idea... |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2010-09-15 : 16:57:35
|
| No it will not create for all companies... I will create based on the parameter passed in the Proc... It will be created whenver someone requires it. let me know if I dont make sense and thank you. |
 |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2010-09-16 : 16:59:28
|
| anyone with other suggestion please :) |
 |
|
|
|
|
|