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 |
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2010-04-07 : 07:54:09
|
I am using a sql server 2008I have a database which have 6 filegoups1 Primary2 MYDBNAME_clusterindex3 MYDBNAME_nonclusterindex4 MYDBNAME_BigTable15 MYDBNAME_BigTable26 MYDBNAME_BigTable3Then for Files I have 7 file# Local Name FileGroup FileName1 MYDBNAME Primary MYDBNAME.mdf2 MYDBNAME_clusterindex MYDBNAME_clusterindex MYDBNAME_1.ndf3 MYDBNAME_nonclusterindex MYDBNAME_nonclusterindex MYDBNAME_2.ndf4 MYDBNAME_BigTable1 MYDBNAME_BigTable1 MYDBNAME_3.ndf5 MYDBNAME_BigTable2 MYDBNAME_BigTable2 MYDBNAME_4.ndf6 MYDBNAME_BigTable3 MYDBNAME_BigTable3 MYDBNAME_5.ndf7 MYDBNAME_log Not applicable MYDBNAME_6.ldfMy tables have certain cluster and non cluster indexMy large Tables[Table1, Table2, Table3] cluster index [primary key] are saved MYDBNAME_BigTable1, MYDBNAME_BigTable2, MYDBNAME_BigTable3Now I wanted a single script which i can provide to client which should create whole database thereHow Can I do that?Kamran ShahidSr. Software Engineer(MCSD.Net,MCPD.net) |
|
DBA in the making
Aged Yak Warrior
638 Posts |
Posted - 2010-04-07 : 08:26:48
|
Right click on the database in SSMS, select "Tasks", and then "Generate Scripts...". In the dialog, make sure you read and understand all the available options.There are 10 types of people in the world, those that understand binary, and those that don't. |
 |
|
kamii47
Constraint Violating Yak Guru
353 Posts |
Posted - 2010-04-07 : 08:56:59
|
I know about the scripts of table,functions, SP's ,views e.t.c.My question were mainly related to creating filegroups and indexes.check my question on [url]http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/497d8bdb-f700-4162-80eb-0c9fcdf08c08[/url]Kamran ShahidSr. Software Engineer(MCSD.Net,MCPD.net) |
 |
|
DBA in the making
Aged Yak Warrior
638 Posts |
Posted - 2010-04-07 : 09:24:30
|
The options in the Generate Scripts dialog will allow you to script those.There are 10 types of people in the world, those that understand binary, and those that don't. |
 |
|
|
|
|
|
|