_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › FileStreamAccess
|
|
誤碁 れ 覯 覓 覯企. 企 譟磯 覈詩 覓 覯 れ 螻 曙. 蠏碁殊 讌讀 危危蠍 覦.
[edit]
2 蠍磯蓋 れ #れ螻 螳 蠍磯蓋 れ .
れ朱 SSMS れ螻 螳 れ.
use master go exec sp_configure 'filestream access level', 2 go reconfigure go 襷讌襷 襷り覲 れ螻 螳 譬襯 覩碁 れ螻 螳.
襾語 蠍壱 襷 谿瑚蠍 覦. [edit]
3 一危磯伎 燕蠍 #れ 襴襯 一危磯伎 Script襯 ろ.
use master go if exists (select name from sys.databases where name = 'filestreamdb') drop database filestreamdb go use master go create database filestreamdb on primary ( name = data01 , filename = 'c:\filestream\data01.mdf' ), filegroup filestream_fg contains filestream ( name = filestream_data01 , filename = 'c:\filestream' --蠍磯ゼ 譯殊伎 危エ覺. c:\filestream\file . ) log on ( name = log01 , filename = 'c:\filestream\log01.ldf' ) /* 覃讌 5591, 譴 16, 1, 譴 1 FILESTREAM feature is disabled. 襷 企 覃讌襯 蟆 覃 伎蟾讌 螻殊 譴 觜襴 覿覿 る 詞 . */ [edit]
4 企 燕蠍 #use filestreamdb go create table dbo.filestreamtable ( fs_id uniqueidentifier rowguidcol not null unique, fsdata varbinary(max) filestream ); insert into filestreamtable values(newid(), cast ('inserting data into filestreamtable........' as varbinary(max))) go select fs_id , CONVERT(varchar(50), fsdata) fsdata from filestreamtable /* fs_id fsdata ------------------------------------ -------------------------------------------------- E1C9F831-7305-4C18-954A-5DFEFC5DD550 inserting data into filestreamtable........ */ declare @txcontext varbinary(max) begin transaction select @txcontext = get_filestream_transaction_context() print @txcontext commit --蟆郁骸: 0x247E3F6CCDE6524FB5F20CA80003177B [edit]
5 FILESTREAM directory structure - where do the GUIDs come from? #SELECT o.name AS [Table], cp.name AS [Column], p.partition_number AS [Partition], r.rsguid AS [Rowset GUID], rs.colguid AS [Column GUID] FROM sys.sysrowsets r CROSS APPLY sys.sysrscols rs JOIN sys.partitions p ON rs.rsid = p.partition_id JOIN sys.objects o ON o.object_id = p.object_id JOIN sys.syscolpars cp ON cp.colid = rs.rscolid WHERE rs.colguid IS NOT NULL AND o.object_id = cp.id AND r.rsguid IS NOT NULL AND r.rowsetid = rs.rsid; GO [edit]
6 谿瑚襭 #
鏤
|
覦襯 螳 企Π 豕螻 覓殊企. |