Home All Groups Group Topic Archive Search About
Author
6 Apr 2006 10:45 AM
Enric
Dear all,
I was just wondering myself how could I do for to obtain to which filegroup
belong a specific table.
Imagine that you have primary, primary_history, secondary_history,
index_history, bla,bla
Any idea or though would be very appreciated.

--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''''s hard to provide information
without seeing the code. location: Alicante (ES)

Author
6 Apr 2006 10:54 AM
Tibor Karaszi
What version of SQL Server? For SQL Server 2000, use the groupid column in sysindexes.

Show quote
"Enric" <vta***@terra.es.(donotspam)> wrote in message
news:43476F7C-8EC3-4C59-B80B-DBF0E9E36B74@microsoft.com...
> Dear all,
> I was just wondering myself how could I do for to obtain to which filegroup
> belong a specific table.
> Imagine that you have primary, primary_history, secondary_history,
> index_history, bla,bla
> Any idea or though would be very appreciated.
>
> --
> Please post DDL, DCL and DML statements as well as any error message in
> order to understand better your request. It''''s hard to provide information
> without seeing the code. location: Alicante (ES)
Author
6 Apr 2006 11:12 AM
Enric
Hi Tibor,
It's ok. That's fine but I'm looking for user tables no indexes.
Where does sql stores that?
I'm seeing sysobjects table with xtype = 'u'
--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''''s hard to provide information
without seeing the code. location: Alicante (ES)


Show quote
"Tibor Karaszi" wrote:

> What version of SQL Server? For SQL Server 2000, use the groupid column in sysindexes.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
>
> "Enric" <vta***@terra.es.(donotspam)> wrote in message
> news:43476F7C-8EC3-4C59-B80B-DBF0E9E36B74@microsoft.com...
> > Dear all,
> > I was just wondering myself how could I do for to obtain to which filegroup
> > belong a specific table.
> > Imagine that you have primary, primary_history, secondary_history,
> > index_history, bla,bla
> > Any idea or though would be very appreciated.
> >
> > --
> > Please post DDL, DCL and DML statements as well as any error message in
> > order to understand better your request. It''''s hard to provide information
> > without seeing the code. location: Alicante (ES)
>
>
Author
6 Apr 2006 11:18 AM
Tibor Karaszi
The physical aspects if a table is represented in sysindexes. Use WHERE indid IN (0,1). See Books
Online, sysindexes for more details about sysindexes.

Show quote
"Enric" <vta***@terra.es.(donotspam)> wrote in message
news:9EA44F73-094E-4458-8A0C-FF1BBD34123E@microsoft.com...
> Hi Tibor,
> It's ok. That's fine but I'm looking for user tables no indexes.
> Where does sql stores that?
> I'm seeing sysobjects table with xtype = 'u'
> --
> Please post DDL, DCL and DML statements as well as any error message in
> order to understand better your request. It''''s hard to provide information
> without seeing the code. location: Alicante (ES)
>
>
> "Tibor Karaszi" wrote:
>
>> What version of SQL Server? For SQL Server 2000, use the groupid column in sysindexes.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "Enric" <vta***@terra.es.(donotspam)> wrote in message
>> news:43476F7C-8EC3-4C59-B80B-DBF0E9E36B74@microsoft.com...
>> > Dear all,
>> > I was just wondering myself how could I do for to obtain to which filegroup
>> > belong a specific table.
>> > Imagine that you have primary, primary_history, secondary_history,
>> > index_history, bla,bla
>> > Any idea or though would be very appreciated.
>> >
>> > --
>> > Please post DDL, DCL and DML statements as well as any error message in
>> > order to understand better your request. It''''s hard to provide information
>> > without seeing the code. location: Alicante (ES)
>>
>>
Author
6 Apr 2006 11:23 AM
Enric
I've seen how, using DMO....
Another possibility?
--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''''s hard to provide information
without seeing the code. location: Alicante (ES)


Show quote
"Tibor Karaszi" wrote:

> What version of SQL Server? For SQL Server 2000, use the groupid column in sysindexes.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
>
> "Enric" <vta***@terra.es.(donotspam)> wrote in message
> news:43476F7C-8EC3-4C59-B80B-DBF0E9E36B74@microsoft.com...
> > Dear all,
> > I was just wondering myself how could I do for to obtain to which filegroup
> > belong a specific table.
> > Imagine that you have primary, primary_history, secondary_history,
> > index_history, bla,bla
> > Any idea or though would be very appreciated.
> >
> > --
> > Please post DDL, DCL and DML statements as well as any error message in
> > order to understand better your request. It''''s hard to provide information
> > without seeing the code. location: Alicante (ES)
>
>
Author
6 Apr 2006 11:52 AM
Tibor Karaszi
USE pubs

SELECT sfg.groupname

FROM sysfilegroups AS sfg

INNER JOIN sysindexes AS si

ON si.groupid = sfg.groupid

WHERE si.id = OBJECT_ID('dbo.authors')

AND indid IN(0,1)


Show quote
"Enric" <vta***@terra.es.(donotspam)> wrote in message
news:9A0F784A-A179-4593-9C8A-1226B0941772@microsoft.com...
> I've seen how, using DMO....
> Another possibility?
> --
> Please post DDL, DCL and DML statements as well as any error message in
> order to understand better your request. It''''s hard to provide information
> without seeing the code. location: Alicante (ES)
>
>
> "Tibor Karaszi" wrote:
>
>> What version of SQL Server? For SQL Server 2000, use the groupid column in sysindexes.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>>
>> "Enric" <vta***@terra.es.(donotspam)> wrote in message
>> news:43476F7C-8EC3-4C59-B80B-DBF0E9E36B74@microsoft.com...
>> > Dear all,
>> > I was just wondering myself how could I do for to obtain to which filegroup
>> > belong a specific table.
>> > Imagine that you have primary, primary_history, secondary_history,
>> > index_history, bla,bla
>> > Any idea or though would be very appreciated.
>> >
>> > --
>> > Please post DDL, DCL and DML statements as well as any error message in
>> > order to understand better your request. It''''s hard to provide information
>> > without seeing the code. location: Alicante (ES)
>>
>>

AddThis Social Bookmark Button