SQL Server 2008 T-SQL Enhancements Part - IV

  • Arshad Ali-556241

    Say Hey Kid

    Points: 706

    Comments posted to this topic are about the item SQL Server 2008 T-SQL Enhancements Part - IV

    With Thanks and Regards
    Arshad Ali
    Microsoft India

    My Blog - http://arshadali.blogspot.com/[/url]

  • sknox

    SSChampion

    Points: 12284

    Good article. I have a 3rd party app which will begin using the FILESTREAM attribute in the next major release, and this article gives me a good overview of how it works. I just have one question:

    Even though you can access these files if you have required permissions, these files cannot be directly deleted or renamed using the file system. Otherwise the link-level consistency will be lost between the database and the file system as a result of this the database might get corrupted.

    For clarification, is it that the files cannot(a) or should not(b) be deleted or renamed? In other words, does SQL Server or Windows actually prevent you from renaming or deleting the files (a), or can you do it, but there will be dire consequences (b)?

  • RJ-476420

    SSCarpal Tunnel

    Points: 4805

    It looks to me that the files reside in a windows folder like any other file which you can indeed rename or delete but when you try to run a query against the database table, the SQL Server will not able to find it & throws an error. In other words, this error is database corruption.

    Thanks.

    RJ

  • deanroush

    SSC-Addicted

    Points: 474

    I understand the consequences of deleting or renaming a filestream-managed file in the file system, but is there any consequence to updating (replacing) a file directly in the file system? If not, would there be a chance for a performance improvement if many files were being updated directly on a regular basis?

  • RJ-476420

    SSCarpal Tunnel

    Points: 4805

    Updating the contents of a file is a research question. Moreover, it depends on your requirements to update it through sql server or do it directly.

    The part I have questions are when you update a row at the table level the article says the old file would still be preserved. Whether later it is garbage collected or its a manual process to clean it up?

    --RJ

  • diopbirama

    SSC Enthusiast

    Points: 129

    great article,

    i'm waiting the part V, hope that will be partition table and index .

    I'm a database admin in a a large telco industry in senegal and I want to organize my CDR( call data record) by monthly table within it il wish to create file group by month and also i want to partition the table by day and affect the partition of a day of week to their corresponding filegroup

  • jacob sebastian

    SSChampion

    Points: 11812

    The part I have questions are when you update a row at the table level the article says the old file would still be preserved. Whether later it is garbage collected or its a manual process to clean it up?

    --RJ

    The file will be removed by a background garbage collector thread

    .

  • rohit_raste

    SSC Rookie

    Points: 27

    Hi,

    Its very nice article..author has covered points from start to end in a very neat manner. I am eager to see how it works myself.

    Thanks,

    Rohit

  • SQLRNNR

    SSC Guru

    Points: 281243

    Thanks for another article in this series.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Toby White

    SSCertifiable

    Points: 6127

    Good article. I am curious about how restoring a backup that includes the filestream on to a dev server might work. Suppose filestream was enabled on the dev server, and the root folder where the filesteam file points also existed. Would the restore just dump the files in the folder with the header? It seems like yes it would, but it also seems like there might be some speed bumps doing this.

  • jacob sebastian

    SSChampion

    Points: 11812

    When you restore a FILESTREAM enabled database, you can specify the location where the filestream data container(s) should be placed. Just like you specify the MDF and LDF file locations, you can also specify the location where the FILESTREAM file group(s) should be placed.

    If you are restoring using SSMS wizard, by default SQL Server will show the same locations as in the original database and give you an option to change the locations.

    .

  • TomThomson

    SSC Guru

    Points: 104773

    Thanks for another good useful article.

    Tom

  • Michelle-138172

    Hall of Fame

    Points: 3232

    My question is, is there any easy way to transfer existing files into a table that contains a filestream column?

    We are currently using indexing services to do article searches - as the function is going away with Windows 2008 R2, we are looking to move the articles into a database to take advantage of the full text indexing of sql server.

  • pagolu.satheeshp

    Grasshopper

    Points: 17

    Hi,

    Thanks for gr8 article.I have a question regarding the storage of data in filestream scenario.

    If the file is gonna be saved on file system,why should the column type be varbinary.

    how exactly this will stored.Please clarify..

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic. Login to reply