Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Finding the file that a partition is stored in
I've looked through the various sys views regarding partitions but I can't
seem to find a way of determining what physical file or filegroup an
existing partition is stored on. Even the original create script for a
partition can't be relied on as partition ranges can be merged or split.

Thanks,

Joe Lax



Report this thread to moderator Post Follow-up to this message
Old Post
Joe
11-01-06 12:12 AM


RE: Finding the file that a partition is stored in
The catalog view to query is sys. destination_data_spa
ces. A query similar to
the following should do:

select ds.name
from sys. destination_data_spa
ces dds join sys.data_spaces ds
on dds.data_space_id = ds.data_space_id
join sys.indexes i
on dds.partition_scheme_id = i.data_space_id
where dds.destination_id = $partition. PartitionFunction('y
our value')
and i.object_id = object_id('table name')
and i.index_id in (0,1)

Linchi

"Joe" wrote:

> I've looked through the various sys views regarding partitions but I can't
> seem to find a way of determining what physical file or filegroup an
> existing partition is stored on. Even the original create script for a
> partition can't be relied on as partition ranges can be merged or split.
>
> Thanks,
>
> Joe Lax
>
>
>

Report this thread to moderator Post Follow-up to this message
Old Post
Linchi Shea
11-01-06 12:12 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 08:39 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006