Objects in a datafile

  • Can i Check list of tables within a datafile ? (In case i have more than 1 data files in the Primary group) If yes, then how can ? I can see data files from DMV sys.database_files but no options to match the file_id within it with the object_id.

  • See if this article [/url] will get you pointed in the right direction.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • No, because if you have multiple tables in a filegroup the data in the tables will be striped across all of them.

    Objects are per-filegroup, not per-file.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • So in case if tables are striped across files, will there be any downsides of moving any one of the file to some different drive ?

  • sqlnaive (9/10/2011)


    So in case if tables are striped across files, will there be any downsides of moving any one of the file to some different drive ?

    if a table is stripped across different files, they are proportionately filled.

    impact may be seen if the new drive's throughput is lesser than previous one..

    if you hv log shipping/mirroring on this db, "probably" log shipped server or mirrored server should have the new drive letter with the same path (as on primary/principal server) since the alter command to move the file will be replayed on log shipped/mirrored db.. [haven't tested it though]



    Pradeep Singh

  • Apart from the issue arising from mirroring/log shipping, can there be any other issues ? I considered the drive difference already. My concern is with any performance by having data in a table scattered in different drives or indexes.

  • It won't degrade performance. It probably won't help performance.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 7 posts - 1 through 6 (of 6 total)

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