Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


FileStream


FileStream

Author
Message
msimone
msimone
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 449
Hello.
I have a database with 2 filestreams and i create tables with a column varbinary(max) to a filestream and others tables with that column to the other filestream.
How do i can to know which parent filestream a table?
Thanks.



Erland Sommarskog
Erland Sommarskog
SSC Eights!
SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)

Group: General Forum Members
Points: 931 Visits: 866
I don't really understand your question. Can you elaborate?

Erland Sommarskog, SQL Server MVP, www.sommarskog.se
msimone
msimone
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 449
Excuse me, my english is very bad.
A BD with 2 filegroups filestream.
One table in each filestream.

CREATE TABLE dbo.Table1 (
PkTable1 int NOT NULL,
FileFS1 varbinary](max FILESTREAM NULL,
Guia UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL unique default (newid())
) on [PRIMARY] filestream_on [FSTR1]

CREATE TABLE dbo.Table2 (
PkTable2 int NOT NULL,
FileFS2 varbinary(max) FILESTREAM NULL,
Guia UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL unique default (newid())
) on [PRIMARY] filestream_on [FSTR2]


I need to know with a DMV for example, the filestream of each table.
Thanks.



Erland Sommarskog
Erland Sommarskog
SSC Eights!
SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)SSC Eights! (931 reputation)

Group: General Forum Members
Points: 931 Visits: 866
To be technical, it is not a DMV you are looking for but a catalog view. (The difference is that a catalog shows information persisted in the system catalog, while the a exposes internal data inside the SQL Server executable, but which is not stored on disk directly.)

Here is a query:

SELECT t.name, ds.name
FROM sys.tables t
JOIN sys.data_spaces ds ON t.filestream_data_space_id = ds.data_space_id
ORDER BY t.name



Erland Sommarskog, SQL Server MVP, www.sommarskog.se
msimone
msimone
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
Points: 46 Visits: 449
Erland, thank you very much.
I wanted that exactly.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search