Delphix Products

Expand all | Collapse all

Relink a dSource after restoring the physical DB

Jump to Best Answer
  • 1.  Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:06:00 PM
    Hi
    We are trying to do the following:

    1. Restore a SQL DB onto a server from a production backup.
    2. Performing some cleardown of data via scripts
    3. Creating a dSource from this DB and allowing Devs to create VDBs
    4. Once a week, restore the DB again from production backup and perform the cleardown again.
    We are having trouble with 4.
    I can unlink the dSource fine and restore the DB on the SQL server (and take a backup for delphix)....but I cannot link that dSource back to the restored DB....is this something that should be possible? 

    I'm using the CLI to relink but it's saying the dSource already exists.  This is now unlinked so I can't even delete it (and probably wouldn't be able to anyway due to VDBs hanging off it).

    Basically we are trying to provide a cut down version of our large production DB for the dev teams but provide an up to date copy each week.



  • 2.  RE: Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:26:00 PM
    HI Mark-

    My concern here would be the requirements as documented on our site at https://docs.delphix.com/display/DOCS50/CLI+Cookbook:+Detaching+and+Attaching+a+SQL+Server+dSource (assuming you are attaching source and not trying to link again):

    When attaching a SQL Server dSource to a new data source, the new data source must be the same database satisfying the following containts:
    • Same database name
    • Same recovery fork UUID
    • pptRepository needs to be set to the name of the SQL instance on the staging server. The unlink operation removes the database from the SQL instance on the staging server and unmounts the iscsi luns, reattaching the dSource via the CLI will remount the iscsi luns and puts the database back.
    The process you discuss may affect the recovery fork UUID, so as long as you can meet these requirements you should be able to use the discussed attach source process to reattach to the database.

    Please let us know if this is helpful.


  • 3.  RE: Relink a dSource after restoring the physical DB
    Best Answer

    Posted 02-17-2016 02:30:00 PM
    Hi Mark,

    Do you ever see a message like the following?
    The recovery fork GUID "771A33E3-454E-4117-9F7D-A725CE3xxxxx" of the provided backupset does not match recovery fork GUID "7B7BA57C-74D6-47BC-8641-2CEB24Fxxxxx" of dSource "aceFT".
    Delphix uses the database GUID as a way of identifying the database. If there is a change in the recovery fork GUID Delphix no longer feels it is the same database as it has been recovered from a backup.

    If the development environment is refreshed from the production environment frequently (via LOAD DATABASE ...), you can:
     can:
    • Unlink the dSource
    • Rename the dSource
    • Link a new dSource
    • Any VDBs provisioned from the remaining dSource will remain
    Doing this frequently will start to consume extra space in Delphix.

    There is an outstanding feature request called "MSSQL Source Continuity" that would avoid the unlink/link. If I have correctly described the issue you are facing, you may want to mention to your account representative that you are interested in this feature. The more customers we have interested in a feature, more weight is added to the request.




  • 4.  RE: Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:32:00 PM
    Currently getting this error

    Provide a backupset from the same recovery fork, or if the database was restored detach and link the source database again.

    When I try and snapshot after restoring the physical DB.

    If I detach then I can't link again due to the dSource name already existing

       Error: The operation could not be completed because the dlpx_container "CutdownTest"
              already exists.
      Action: Provide a different name and try again.




  • 5.  RE: Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:36:00 PM
    Hi Mark,

    Yes, this the same issue. The only way around it is as I describe above. Please let your account rep know you are interested in the "MSSQL Source Continuity" feature to help add priority to it.

    After you detach it, you have to rename it and it becomes kind of a standalone dSource. Then you have to link a new dSource to using the new dump file that you created so you end up with two dSources.

    Thanks,
      Neal


  • 6.  RE: Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:39:00 PM
    Thanks Neal

    Where do I find the new features requests?  are they posted anywhere?


  • 7.  RE: Relink a dSource after restoring the physical DB

    Posted 02-17-2016 02:44:00 PM
    Hi Mark,

    No, they are only visible internally to Delphix employees. If your account rep is unable to find the particular feature request, you can ask them to contact me.

    Thanks,
      Neal


  • 8.  RE: Relink a dSource after restoring the physical DB

    Posted 03-16-2016 08:48:00 PM
    When you say rename the dSource, you mean the dSource in Delphix?


  • 9.  RE: Relink a dSource after restoring the physical DB

    Posted 03-16-2016 08:49:00 PM

    And by "Link a new dSource" you mean attach a new dSource, link seems to only be for Oracle




  • 10.  RE: Relink a dSource after restoring the physical DB

    Posted 03-16-2016 09:19:00 PM
    Hi Jim,

    You can unlink/detach a dSource from a source database (SQL or Oracle or any other database):
    https://docs.delphix.com/display/DOCS50/Detaching+and+Re-Attaching+Oracle+dSources
    https://docs.delphix.com/display/DOCS50/Detaching+and+Re-Attaching+SQL+Server+dSources

    Once it is detached from the source database, you can rename the detached dSource by clicking the Edit icon in the upper left-hand corner of the dSource card, next to its name.

    This is necessary only if you intend give the new dSource the same name as the original one. Otherwise, you will see an error message.