Database file location change on standby site after restore standby databaseSQL Server Log shipping standby...

Is 'bad luck' with former employees a red flag?

Why is Shelob considered evil?

Does human life have innate value over that of other animals?

Does limiting the number of sources help simplify the game for a new DM with new and experienced players?

Does a star need to be inside a galaxy?

How do I add numbers from two txt files with Bash?

Is layered encryption more secure than long passwords?

Why are recumbent bicycles and velomobiles illegal in UCI bicycle racing?

Coworker is trying to get me to sign his petition to run for office. How to decline politely?

Is it possible to re-order a List of continous entries?

Finding Gaps in Date Ranges

Travel agent didn't append MR to my name and my name ends in MS. This caused my first name to be put as Ms on ticket

Does an increasing sequence of reals converge if the difference of consecutive terms approaches zero?

How to explain one side of Super Earth is smoother than the other side?

Why don't hotels offer ≥ 1 kitchen that must be booked?

Is the "hot network questions" element on Stack Overflow a dark pattern?

Why did Tywin never remarry?

Are all aperiodic systems chaotic?

How can I learn to care less because it makes me sick?

For US ESTA, should I mention a visa denial from before I got UK citizenship?

How does a single engine tail wheel landing gear airplane turn when it is on the ground?

What prevents people from lying about where they live in order to reduce state income taxes?

Why don't the fuse connections in programmable ROM cause the whole matrix to be shorted together?

How to run a binary file from crontab?



Database file location change on standby site after restore standby database


SQL Server Log shipping standby db stuck restoringCan the same database be log-shipping secondary and primary at the same time?Directory lookup failed during log shippingLog shipping large DBs - what about the log?Problem Configuring Log Shipping for DR ServerLog shipping restore job failingSecondary standby server log shipping backup job errorHow to fix an odd LSBackup job error in Log Shipping?Problem joining log-shipped secondaries in STANDBY to AlwaysOn grouprestore job fails in log shipping













0















I am configuring Log shipping from 2008R2 to 2016 using NORECOVERY option with Log Shopping jobs, I have successfully configure Backup, Copy and Restore jobs.
When I have perform restore standby database standby then Database file location change on standby site.
like I was create standby database on D: but after open the database on 2016 using Restore -> Database. THEN change location it to
C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLDATA









share







New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Customize databases

    – safi qadri
    4 hours ago











  • Did you recovered the master database on your standby, that would overwrite all settings.

    – eckes
    4 hours ago











  • No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

    – safi qadri
    4 hours ago











  • It is picking the default settings on the instance properties--> database

    – Ramakant Dadhichi
    4 hours ago













  • Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

    – Shashank Tiwari
    4 hours ago
















0















I am configuring Log shipping from 2008R2 to 2016 using NORECOVERY option with Log Shopping jobs, I have successfully configure Backup, Copy and Restore jobs.
When I have perform restore standby database standby then Database file location change on standby site.
like I was create standby database on D: but after open the database on 2016 using Restore -> Database. THEN change location it to
C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLDATA









share







New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Customize databases

    – safi qadri
    4 hours ago











  • Did you recovered the master database on your standby, that would overwrite all settings.

    – eckes
    4 hours ago











  • No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

    – safi qadri
    4 hours ago











  • It is picking the default settings on the instance properties--> database

    – Ramakant Dadhichi
    4 hours ago













  • Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

    – Shashank Tiwari
    4 hours ago














0












0








0








I am configuring Log shipping from 2008R2 to 2016 using NORECOVERY option with Log Shopping jobs, I have successfully configure Backup, Copy and Restore jobs.
When I have perform restore standby database standby then Database file location change on standby site.
like I was create standby database on D: but after open the database on 2016 using Restore -> Database. THEN change location it to
C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLDATA









share







New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I am configuring Log shipping from 2008R2 to 2016 using NORECOVERY option with Log Shopping jobs, I have successfully configure Backup, Copy and Restore jobs.
When I have perform restore standby database standby then Database file location change on standby site.
like I was create standby database on D: but after open the database on 2016 using Restore -> Database. THEN change location it to
C:Program FilesMicrosoft SQL ServerMSSQL13.MSSQLSERVERMSSQLDATA







log-shipping





share







New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share







New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share



share






New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 5 hours ago









safi qadrisafi qadri

163




163




New contributor




safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






safi qadri is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • Customize databases

    – safi qadri
    4 hours ago











  • Did you recovered the master database on your standby, that would overwrite all settings.

    – eckes
    4 hours ago











  • No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

    – safi qadri
    4 hours ago











  • It is picking the default settings on the instance properties--> database

    – Ramakant Dadhichi
    4 hours ago













  • Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

    – Shashank Tiwari
    4 hours ago



















  • Customize databases

    – safi qadri
    4 hours ago











  • Did you recovered the master database on your standby, that would overwrite all settings.

    – eckes
    4 hours ago











  • No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

    – safi qadri
    4 hours ago











  • It is picking the default settings on the instance properties--> database

    – Ramakant Dadhichi
    4 hours ago













  • Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

    – Shashank Tiwari
    4 hours ago

















Customize databases

– safi qadri
4 hours ago





Customize databases

– safi qadri
4 hours ago













Did you recovered the master database on your standby, that would overwrite all settings.

– eckes
4 hours ago





Did you recovered the master database on your standby, that would overwrite all settings.

– eckes
4 hours ago













No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

– safi qadri
4 hours ago





No. This is user database. When I am going to open database on STANDBY site... Right click on USER database -> Task -> Restore Database

– safi qadri
4 hours ago













It is picking the default settings on the instance properties--> database

– Ramakant Dadhichi
4 hours ago







It is picking the default settings on the instance properties--> database

– Ramakant Dadhichi
4 hours ago















Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

– Shashank Tiwari
4 hours ago





Can you please check SQL server settings. You need to change the directory from SQL Server > Properties > Database Settings > Change DATA and LOG file directories. This might resolve the issue.

– Shashank Tiwari
4 hours ago










1 Answer
1






active

oldest

votes


















0














There are 2 ways you can fix this.




  1. As @ramakant mentioned, SQL Server is using the default paths setup on the server. To change this, right click on the server in Object Explorer>Properties>Database Settings>Database Default Locations. Changing these values will automatically restore all databases to those directories unless different paths are specified.



  2. You need to restore the database via a script, and that way you can specify where the files will be.
    That will restore a database from a local location to the D: drive. Alter the script as required with regards to the locations.



    RESTORE DATABASE [MyDatabase] FROM

    DISK = N'C:WorkMyDatabase.bak' WITH FILE = 1,

    MOVE N'MyDatabase' TO N'C:MSSQLDataMyDatabase.mdf',

    MOVE N'MyDatabase_log' TO N'C:MSSQLLogMyDatabase_log.ldf',

    NOUNLOAD, STATS = 5
    GO




More Info : RESTORE Statements (Transact-SQL)



Either one of these methods will work for you.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "182"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    safi qadri is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230124%2fdatabase-file-location-change-on-standby-site-after-restore-standby-database%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    There are 2 ways you can fix this.




    1. As @ramakant mentioned, SQL Server is using the default paths setup on the server. To change this, right click on the server in Object Explorer>Properties>Database Settings>Database Default Locations. Changing these values will automatically restore all databases to those directories unless different paths are specified.



    2. You need to restore the database via a script, and that way you can specify where the files will be.
      That will restore a database from a local location to the D: drive. Alter the script as required with regards to the locations.



      RESTORE DATABASE [MyDatabase] FROM

      DISK = N'C:WorkMyDatabase.bak' WITH FILE = 1,

      MOVE N'MyDatabase' TO N'C:MSSQLDataMyDatabase.mdf',

      MOVE N'MyDatabase_log' TO N'C:MSSQLLogMyDatabase_log.ldf',

      NOUNLOAD, STATS = 5
      GO




    More Info : RESTORE Statements (Transact-SQL)



    Either one of these methods will work for you.






    share|improve this answer




























      0














      There are 2 ways you can fix this.




      1. As @ramakant mentioned, SQL Server is using the default paths setup on the server. To change this, right click on the server in Object Explorer>Properties>Database Settings>Database Default Locations. Changing these values will automatically restore all databases to those directories unless different paths are specified.



      2. You need to restore the database via a script, and that way you can specify where the files will be.
        That will restore a database from a local location to the D: drive. Alter the script as required with regards to the locations.



        RESTORE DATABASE [MyDatabase] FROM

        DISK = N'C:WorkMyDatabase.bak' WITH FILE = 1,

        MOVE N'MyDatabase' TO N'C:MSSQLDataMyDatabase.mdf',

        MOVE N'MyDatabase_log' TO N'C:MSSQLLogMyDatabase_log.ldf',

        NOUNLOAD, STATS = 5
        GO




      More Info : RESTORE Statements (Transact-SQL)



      Either one of these methods will work for you.






      share|improve this answer


























        0












        0








        0







        There are 2 ways you can fix this.




        1. As @ramakant mentioned, SQL Server is using the default paths setup on the server. To change this, right click on the server in Object Explorer>Properties>Database Settings>Database Default Locations. Changing these values will automatically restore all databases to those directories unless different paths are specified.



        2. You need to restore the database via a script, and that way you can specify where the files will be.
          That will restore a database from a local location to the D: drive. Alter the script as required with regards to the locations.



          RESTORE DATABASE [MyDatabase] FROM

          DISK = N'C:WorkMyDatabase.bak' WITH FILE = 1,

          MOVE N'MyDatabase' TO N'C:MSSQLDataMyDatabase.mdf',

          MOVE N'MyDatabase_log' TO N'C:MSSQLLogMyDatabase_log.ldf',

          NOUNLOAD, STATS = 5
          GO




        More Info : RESTORE Statements (Transact-SQL)



        Either one of these methods will work for you.






        share|improve this answer













        There are 2 ways you can fix this.




        1. As @ramakant mentioned, SQL Server is using the default paths setup on the server. To change this, right click on the server in Object Explorer>Properties>Database Settings>Database Default Locations. Changing these values will automatically restore all databases to those directories unless different paths are specified.



        2. You need to restore the database via a script, and that way you can specify where the files will be.
          That will restore a database from a local location to the D: drive. Alter the script as required with regards to the locations.



          RESTORE DATABASE [MyDatabase] FROM

          DISK = N'C:WorkMyDatabase.bak' WITH FILE = 1,

          MOVE N'MyDatabase' TO N'C:MSSQLDataMyDatabase.mdf',

          MOVE N'MyDatabase_log' TO N'C:MSSQLLogMyDatabase_log.ldf',

          NOUNLOAD, STATS = 5
          GO




        More Info : RESTORE Statements (Transact-SQL)



        Either one of these methods will work for you.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 hours ago









        WadeHWadeH

        14019




        14019






















            safi qadri is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            safi qadri is a new contributor. Be nice, and check out our Code of Conduct.













            safi qadri is a new contributor. Be nice, and check out our Code of Conduct.












            safi qadri is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Database Administrators Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230124%2fdatabase-file-location-change-on-standby-site-after-restore-standby-database%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

            Always On Availability groups resolving state after failover - Remote harden of transaction...

            update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...