Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
  • 1.  V2P through Delphix Toolkits "dx_v2p" got unexpected error

    Posted 10-12-2022 04:04:00 PM
    Hi, All

    I am new in the community and looking forward to know Delphix fans here. 

    I recently go issue when I try to provision a Physical DB by Delphix V2P ( Virtual to Physical ) through dx Toolkit command "dx_v2p"

    I followed the document issue the following command for my v2p provisioning, 

    ./dx_v2p -engine "gbv00677.systems.uk.hsbc" -type "oracle" -sourcename "TUKSOPEU" -timestamp "2022-09-20 04:50:26" -dbname "SOPHIS" -environment "SOPHIS_15721.01.TGT.gbl25051780"
    -envinst "/u01/sq/oracle/db/11.2.0.4" -envUser "delphix_os" -uniqname "DEVUKSOP67" -instname "SOP67" -template "SOPHIS_60GB_SGA"
    -targetDirectory "/data/DEVSOP67/Base" -archiveDirectory "archive" -dataDirectory "data" -dspconnections=3 -dspconnections=16

    at the end I got the following error returned:


    "Problem with export file system layout. Is targetDiretory and dataDirectory set ? "
    I am very sure the targetDirectory has been properly created. 

    If I turned on the debug, I got a bit more information like below but it doesn't help in understanding the issue.

    Environment users $VAR1 = {
    'HOST_USER-41' => {
    'credential' => {
    'privateKey' => '',
    'type' => 'KeyPairCredential',
    'publicKey' => ''
    },
    'userId' => 0,
    'name' => 'delphix_os',
    'namespace' => undef,
    'reference' => 'HOST_USER-41',
    'type' => 'EnvironmentUser',
    'environment' => 'UNIX_HOST_ENVIRONMENT-39',
    'groupId' => 0
    }
    };
    $VAR2 = 2;

    Looking for user $VAR1 = 'delphix_os';
    $VAR2 = 2;

    matching users $VAR1 = [
    'HOST_USER-41'
    ];
    $VAR2 = 2;

    V2P for the same environment through Delphix Console GUI runs well, only got trouble when running through dxToolkit but we do need to run through dxToolkit for automation purpose.

    Any input or mentoring will be greatly appreciated!

    Johnley












    ------------------------------
    Johnley Li
    Intern
    HSBC Canada
    ------------------------------


  • 2.  RE: V2P through Delphix Toolkits "dx_v2p" got unexpected error
    Best Answer

    Posted 10-13-2022 02:19:00 AM
    Edited by Michael Torok 10-21-2022 04:16:49 PM
    Welcome Johnley.

     This appears to be a bug introduced recently, which is triggered when any of the sub directories ( data/archive/temp/external ) are supplied.

    You can issue the command without these parameters, eg, 

    ./dx_v2p -engine "gbv00677.systems.uk.hsbc" -type "oracle" -sourcename "TUKSOPEU" -timestamp "2022-09-20 04:50:26" -dbname "SOPHIS" -environment "SOPHIS_15721.01.TGT.gbl25051780"-envinst "/u01/sq/oracle/db/11.2.0.4" -envUser "delphix_os" -uniqname "DEVUKSOP67" -instname "SOP67" -template "SOPHIS_60GB_SGA"-targetDirectory "/data/DEVSOP67/Base" -dspconnections=3 -dspconnections=16

    However a little testing showed that, that will place everything in the in the "/data/DEVSOP67/Base" directory, so may not be suitable for your needs.

    I have opened a bug for this issue - https://github.com/delphix/dxtoolkit/issues/218



    ------------------------------
    Matt Watson
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 3.  RE: V2P through Delphix Toolkits "dx_v2p" got unexpected error

    Posted 10-14-2022 02:30:00 PM
    Thank you very much Matt, the workaround you provided resolve the issue I originally posted, however I got the following error returned, I have no idea how Delphix define and use ORACLE_DB_CONFIG; I tried to remove the parameter -uniquename "DEVUKSOP67" from the command line, but it doesn't help. Can you kindly please investigate more? Thank you!

    Environment ref $VAR1 = 'UNIX_HOST_ENVIRONMENT-40';
    $VAR2 = 2;

    Environment users $VAR1 = {
    'HOST_USER-42' => {
    'reference' => 'HOST_USER-42',
    'groupId' => 0,
    'userId' => 0,
    'name' => 'delphix_os',
    'credential' => {
    'privateKey' => '********',
    'publicKey' => '********',
    'type' => 'KeyPairCredential'
    },
    'type' => 'EnvironmentUser',
    'environment' => 'UNIX_HOST_ENVIRONMENT-40',
    'namespace' => undef
    }
    };
    $VAR2 = 2;

    Looking for user $VAR1 = 'delphix_os';
    $VAR2 = 2;

    matching users $VAR1 = [
    'HOST_USER-42'
    ];
    $VAR2 = 2;

    GET: https://128.161.80.39:443/resources/json/delphix/database/template
    ** GET https://128.161.80.39:443/resources/json/delphix/database/template ==> 200 OK (1s)
    GET: https://128.161.80.39:443/resources/json/delphix/repository
    ** GET https://128.161.80.39:443/resources/json/delphix/repository ==> 200 OK
    ** POST https://128.161.80.39:443/resources/json/delphix/database/export ==> 200 OK (2s)
    Problem with starting job
    Error: The operation could not be completed because a ORACLE_DB_CONFIG with the following fields already exists: is temporary (f), unique name (sophis).
    error $VAR1 = 'The operation could not be completed because a ORACLE_DB_CONFIG with the following fields already exists: is temporary (f), unique name (sophis).';
    $VAR2 = 1;

    Job wasn't defined. If there is no error on the screen, try with -debug flag to find a root cause.


    ------------------------------
    Johnley Li
    Intern
    HSBC Canada
    ------------------------------



  • 4.  RE: V2P through Delphix Toolkits "dx_v2p" got unexpected error

    Posted 10-17-2022 03:53:00 PM
    Hi Johnley,
    The error is letting you know that the Delphix Engine will not allow you to Export or Provision a VDB to an environment where it has discovered a DB with the same unique name.

    In this case, you must have 2 databases with the name sophis in the environment you are attempting to create the physical db within.
    Please change the db_unique_name from Oracle for one of the databases containing sophis in the unique name and then Refresh the Environment and try provisioning it again. The issue should not occur.

    I hope that helps.
    Michael


    ------------------------------
    Michael Torok
    Community Mgmt & Experience, Sr. Director
    Delphix
    ------------------------------



  • 5.  RE: V2P through Delphix Toolkits "dx_v2p" got unexpected error

    Posted 10-21-2022 04:14:00 PM
    Thank you Michael. Yes you are right, that because I already have another physical DB on the same host with name "SOPHIS" on the target server, the issue got resolved after I chose a different name; However I still believe it's a Delphix bug as the same approach ( multiple DBs with same name on target server ) works fine for v2p through Delphix Console. 

    I have completed a full v2p cycle, successfully provisioned a physical through dx_v2p. Just to share the unexpected stuff I encountered during my practice:

    I chose different value for 
    -dbname
    -uniqname
    -instname 
    But when the v2p completed, DB's instance name and db_unique_name are all same as the -dbname, looks like the value of -uniqname and -instname didn't take effect, delphix just simply set them same as -dname, this could be resolved though by restart DB with proper env variable value of ORACLE_SID and with specific init.ora with proper db_unique_name.

    NAME DB_UNIQUE_NAME OPEN_MODE INSTANCE_NAME
    --------- ------------------------------ -------------------- ----------------
    SOPDEV67 SOPDEV67 READ WRITE SOPDEV67


    My issue is resolved anyway, thank you very much for your great help.

    Regards
    Johnley




    ------------------------------
    Johnley Li
    Intern
    HSBC Canada
    ------------------------------