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 |
|
rajkumarrai_bis
Yak Posting Veteran
78 Posts |
Posted - 2007-10-09 : 13:56:03
|
| I have a partitioned table I need to migrate this table to some other DBTherefore first I need to create the corresponding partition function and scheme on the destination DBbut I am not able to generate script of these does anyone knows how we can generate script for already created partition function and scheme thanks in advance |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-10-09 : 13:58:55
|
| Can't you just "Generate SQL" for the Table and the Partition Views?"I need to create the corresponding partition function "Do you mean that there is a Function involved? or a View perhaps?Kristen |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-10-09 : 22:22:58
|
| Tried sys.partition_functions? |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-10-10 : 15:51:10
|
| Take a look at BOL for $PARTITION. |
 |
|
|
rajkumarrai_bis
Yak Posting Veteran
78 Posts |
Posted - 2007-10-15 : 01:24:38
|
| sorry for the late replythis is still not solved,following is the result obtained from given suggestionstable script gives followingCREATE TABLE [dbo].[part_table]([id] [int] NULL) ON [partscheme]([id])sys.partition_functions gives only details of partition function and not its code$PARTITION also does not gives code for the corresponding partition function and scheme |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-10-15 : 14:53:33
|
| Using management studio in the object explorer, look under <database name>/Storage - There you will find Partion Schemas and Partition Functions. From there you can script the objects. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-10-15 : 21:52:05
|
| Check syntax of 'create partition function' and 'create partition schema' in books online, you can build those statements with detailed info from sys.partition_functions. |
 |
|
|
rajkumarrai_bis
Yak Posting Veteran
78 Posts |
Posted - 2007-10-21 : 00:38:27
|
| Lamprey,Thanks for the helpI was looking for that only thank you once againthis has been solved |
 |
|
|
|
|
|