Home > Query, SQL > BISQL # 50 : SQL Server Denali Feature # 1- FileTables # 2 – Demo and Scripting Through !!

BISQL # 50 : SQL Server Denali Feature # 1- FileTables # 2 – Demo and Scripting Through !!

Hi friends !!

Cant stop myself for posting next and 50th post on SQL Server , I never imagine I can achive this Big number Smile with tongue out (Off course for me !! )

Total thanks to my Shree BramhaChaitany Gondawalekar Maharaj without his power there is no success for me !!

And all other friends bloggers Ganesh, Sunil, Abhijit , Vasudha and special thanks to Jacob to have faith on me !!!

So continuing from my last post on same topic : BISQL # 49 : SQL Server Denali Feature # 1 – FileTables–Introduction & Theory « SQL Server Mentalist

Lets gets hands-on to file table in practically way !!

I am assuming that CTP 3 is installed on your machine and based on that I will just explain all the procedures and scripts regarding FileTable

Step 1 : Enable and Configure FILESTREAM

Before we start to use FILESTREAM, we must enable FILESTREAM on the instance of the SQL Server Database Engine. This topic describes how to enable FILESTREAM by using SQL Server Configuration Manager.

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server Code-Named "Denali", point to Configuration Tools, and then click SQL Server Configuration Manager.
  2. In the list of services, right-click SQL Server Services, and then click Open.
  3. In the SQL Server Configuration Manager snap-in, locate the instance of SQL Server on which you want to enable FILESTREAM.
  4. Right-click the instance, and then click Properties.
  5. In the SQL Server Properties dialog box, click the FILESTREAM tab.
  6. Select the Enable FILESTREAM for Transact-SQL access check box.
  7. If you want to read and write FILESTREAM data from Windows, click Enable FILESTREAM for file I/O streaming access. Enter the name of the Windows share in the Windows Share Name box.
  8. If remote clients must access the FILESTREAM data that is stored on this share, select Allow remote clients to have streaming access to FILESTREAM data.
  9. Click Apply.
  10. .In SQL Server Management Studio, click New Query to display the Query Editor.
  11. .In Query Editor, enter the following Transact-SQL code:
  12. EXEC sp_configure filestream_access_level, 2
    RECONFIGURE

    12. Click Execute.

  13. Following message will be prompt in  output plane

image

Which indicate us we have successfully enabled file stream.

Fast n furious Configuration

Find the way for SQL Server Configuration Manager in

image

Following way to enable @ app level

 image

And then

    EXEC sp_configure filestream_access_level, 2
    RECONFIGURE

    Click Execute.

    Following message will be prompt in output plane

image

 

You also may want to look into few topics from MSDN

I want to …

Step 2 : Create a File Table

    The simple syntax for creating a FileTable lets you specify:1.A directory name. In the FileTable folder hierarchy, this table-level directory becomes the child of the database directory specified at the database level, and the parent of the files or directories stored in the table.

2.The name of the collation to be used for file names in the Name column of the FileTable.

CREATE TABLE DocumentStore AS FileTable
    WITH ( 
          FileTable_Directory = DocumentTable,
          FileTable_Collate_Filename = database_default
         );
GO

 

We will have review on some more topics on Denali !!

Hope this helps !!

Thanks for reading my blog !!

For more interesting links and daily update please subscribe our link resource website

Todays link are follows:

Link Resource # 20 : Aug 26 – Aug 28 « Dactylonomy of Web Resource

Advertisement
Categories: Query, SQL
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: