Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Educating and Consulting in IT
Browse by Tags · View All
beyondrelational.com 16
SQL Server 2012 11
FILESTREAM 7
FileTable 7
SSIS 3
speaking 1
PASS 1
service pack 1 1
giveaway 1
Troubleshooting 1

Archive · View All
January 2012 4
April 2012 3
May 2012 2
March 2013 1
January 2013 1
December 2012 1
November 2012 1
August 2012 1
July 2012 1
June 2012 1

Sven Aelterman's Blog

Customizing the Create FileTable template in SQL Server 2012

Jan 6 2012 12:00AM by Sven Aelterman   

In SQL Server 2012, the new FileTable feature provides some very interesting new capabilities (which I will blog about later). However, the SSMS GUI only provides a T-SQL script template to create a new FileTable. And while this template is very complete, it isn’t easy to use. There are more than 20 placeholders that need to be replaced, and you even have to enter the name of the database where the FileTable needs to be created (even though SSMS will select that database as the active database in the GUI).

You can modify the Create FileTable template though and already complete some of the placeholders if you know the values will not change often.

The template is a T-SQL script file located in the following folder (on an x64 system):

C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql\Table\Create FileTable.sql

(That by the way is also the location of many other table-related script templates.)

By editing that file to your liking (I’ve included my edits below as an example), you can speed up the process of creating FileTables using script. You may want to create a backup copy of the original file for future reference first.

-- =========================================
-- Create FileTable template
-- (customized 2012-01-06, Sven Aelterman)
-- =========================================

IF OBJECT_ID('dbo.<table_name>', 'U') IS NOT NULL
  DROP TABLE dbo.<table_name>
GO

CREATE TABLE dbo.<table_name> AS FILETABLE
--  WITH
--  (
--    FILETABLE_DIRECTORY = '<file_table_directory_name, sysname, sample_filetable>',
--    FILETABLE_COLLATE_FILENAME = <file_table_filename_collation, sysname, database_default>
--  )
*/
GO
Specifically, I removed the USE statement, commented out the options FILETABLE_DIRECTORY and FILETABLE_COLLATE_NAME and changed occurrences of the “schema_name” placeholder to “dbo”. Now, I only have 3 placeholders (“<table_name") that I need to replace. If I want to change the options, I can just uncomment that section and replace some additional placeholders with valid values.



Republished from svenaelterman [17 clicks].  Read the original version here [4 clicks].

Sven Aelterman
668 · 0% · 49
3
 
0
Lifesaver
 
0
Refreshed
 
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

"Customizing the Create FileTable template in SQL Server 2012" rated 5 out of 5 by 3 readers
Customizing the Create FileTable template in SQL Server 2012 , 5.0 out of 5 based on 3 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]