Database Backup Restore

  • Good one...+1

  • Interesting question, learned something new.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Divine Flame (6/26/2013)


    Too easy πŸ™‚ I am amazed how 32% people doesn't know this. . . .

    I am a dev, not an admin, and someone must rub my nose in admin tasks. This QotD sent me scrambling for BOL.

  • Divine Flame (6/26/2013)


    Too easy πŸ™‚ I am amazed how 32% people doesn't know this

    I'm not at all surprised people don't know. Most DBAs probably have only one data file and one log file for each database files named according to the database name and using ldf and mdf file extensions, and keep all data files on one array and all log files on one (perhaps the same, heaven help us) array, so they know what the file name and location are and have no requirement for this command.

    Perhaps also some people were confused by the terminology: "file name" instead of "logical file name" and "location" instead of "physical file name" could confuse people -although it seems unlikely that that would lead to a wrong answer from someone who would have got it right if the question had used the usual terminology.

    Tom

  • L' Eomot InversΓ© (6/27/2013)


    Divine Flame (6/26/2013)


    Too easy πŸ™‚ I am amazed how 32% people doesn't know this

    I'm not at all surprised people don't know. Most DBAs probably have only one data file and one log file for each database files named according to the database name and using ldf and mdf file extensions, and keep all data files on one array and all log files on one (perhaps the same, heaven help us) array, so they know what the file name and location are and have no requirement for this command.

    Perhaps also some people were confused by the terminology: "file name" instead of "logical file name" and "location" instead of "physical file name" could confuse people -although it seems unlikely that that would lead to a wrong answer from someone who would have got it right if the question had used the usual terminology.

    What amazed me was that that almost every DBA gets a task once in a while when he is supposed to migrate\restore a database from one server to another server. In case, they always have the same directory\path structure on all servers then they wouldn't need to specify the "MOVE" clause of the restore statement (the clause where one needs to specify the logical file names inside the backup & new physical file path). But having same directory structure on each server (always) seems unlikely to me.


    Sujeet Singh

  • Hugo Kornelis (6/26/2013)


    PRR.DB (6/25/2013)


    I have taken "TestPartition" Database backup (In that db , 5 table are partitioned with 10 file-groups(.ndf files)) then I executed below command

    RESTORE FILELISTONLY FROM disk='D:\DB\Backup\TestPartition.bak'

    It is showing only mdf and ldf files, It is not showing partitioned secondary file-groups(.ndf files)

    Is there any option to see .ndf files?

    I was unable to replicate this.

    I created a new database with three files (primary, log, and one secondary), backed it up, then checked the output from FILELISTONLY - all three files were there.

    I'll try a few more things, but maybe you can help by posting the CREATE DDL used to create your "TestPartition" database?

    I, too, am unable to reproduce this issue. I can see all of the files.

    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

  • KWymore (6/25/2013)


    Nice question. I have never used this option. Good to know!

    Me neither πŸ˜‰ +1

    MCTS | MCITP | Microsoft SQL Server 2008 Administration & Development
    MCSA | MCSE | Business Intelligence SQL Server 2012

  • Good question about backup that. πŸ™‚

  • Like Revenant, I too am a dev and not a DBA. I don't currently have access to a server that I can create dbs on, and faff around with backups and restores. So I too had to reach for BOL. On the basis of the [RESTORE FILELISTONLY (Transact-SQL)] section I *almost* selected "none of the above", purely because BOL says nothing about the path, but the question explicitly does. The full BOL description is

    Returns a result set containing a list of the database and log files contained in the backup set.

    But... then I thought the OP wouldn't be that sneaky, and my faith was rewarded.

    ...One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important.... Bertrand Russell

  • easy one, just a bit of memory effort to do !

Viewing 10 posts - 16 through 24 (of 24 total)

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