Delphix Toolkits (dxToolkit and dxmToolkit)

 View Only
Expand all | Collapse all

MSSQL dSource linking issue using dxtoolkit command

  • 1.  MSSQL dSource linking issue using dxtoolkit command

    Posted 03-08-2023 06:53:00 PM

    Hi,

    I am trying to link MSSQL dSource in dephix engine using dxtoolkit command. I am getting error

    Error Message : Use of uninitialized value $name in string eq at /tmp/par-646261646d31/cache-190e38411c53983878cfce3ae31df63e2e156b0d/inc/lib/Environment_obj.pm line 624.
    Use of uninitialized value $name in string eq at /tmp/par-646261646d31/cache-190e38411c53983878cfce3ae31df63e2e156b0d/inc/lib/Environment_obj.pm line 624.
    Use of uninitialized value $name in string eq at /tmp/par-646261646d31/cache-190e38411c53983878cfce3ae31df63e2e156b0d/inc/lib/Environment_obj.pm line 624.
    Use of uninitialized value $env in concatenation (.) or string at /tmp/par-646261646d31/cache-190e38411c53983878cfce3ae31df63e2e156b0d/inc/lib/MSSQLVDB_obj.pm line 422.
    Staging environment  not found. dSource won't be created

    Command used:

    /cs/delphixtools/dxtoolkit2/dx_ctl_dsource -d "EngineName" -type mssql -sourcename TestSchema2 -sourceinst MSSQLSERVER 
                                -sourceenv "Demo_Source_2" -source_os_user "DELPHIX\sv_USdfrre_sd_er" -dbuser "qw_Ufdf4419_Dd_p" -password "dBpassword" -group "Grp_Delphix_Demo_src" 
                                -dsourcename "TestSchema205" -stage_os_user "DELPHIX\SD_uswDSD2_hg" -stageinst MSSQLSERVER - stageenv "Demo_Staging_2" 
                                -backup_dir "\\uswDSD2\mssql_uswduswDSD2mssqlserver\MSSQL15.MSSQLSERVER\MSSQL\Backup" -action create



    ------------------------------
    Abhishek Ramesh babu
    Cloud Automation Engineer - Delphix
    Credit Suisse AG
    ------------------------------


  • 2.  RE: MSSQL dSource linking issue using dxtoolkit command
    Best Answer

    Posted 03-10-2023 02:01:00 AM

    Hi Abhishek,

    Environment name are case sensitive. Could you please confirm that you have a proper names in your example ?

    Also -stage_os_user and -backup_dir requires to escape "\" character. In your example it should be:

      -stage_os_user "DELPHIX\\SD_uswDSD2_hg"

      -backup_dir "\\\\uswDSD2\\mssql_uswduswDSD2mssqlserver\\MSSQL15.MSSQLSERVER\\MSSQL\\Backup"

    regards,

    Marcin 



    ------------------------------
    Marcin Przepiorowski
    Director, Technical Services
    Delphix
    ------------------------------



  • 3.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 02:38:00 PM

    I am also having this same issue. I have a new engine, and set the SQL server environment to "use as staging" , the case is correct and the backup path is escaped properly, still see the same issue.

    C:\temp\dxtoolkit2> dx_ctl_dsource -d pditsdlpap09 -type mssql -sourcename AdventureWorks2016 -sourceinst MSSQLSERVER \ -sourceenv pditsdbadb01 -source_os_user "asc\asc_delphix" -dbuser delphix_sql -password 8#FruchUbR \ -group "ITS-DBA" -dsourcename AdventureWorks2016 -stage_os_user "asc\asc_delphix" -stageinst MSSQLSERVER - stageenv pditsdlpdb09 -backup_dir "\\\\asc\\backup\\sql\\pditsdbadb01" -validatedsync FULL_OR_DIFFERENTIAL -action create

    Use of uninitialized value $name in string eq at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/Environment_obj.pm line 624.
    Use of uninitialized value $name in string eq at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/Environment_obj.pm line 624.
    Use of uninitialized value $env in concatenation (.) or string at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/MSSQLVDB_obj.pm line 422.
    Staging environment  not found. dSource won't be created
    There were problems with dSource action. No job defined.



    ------------------------------
    Brian Fountain
    Associate DBA
    Arrowstreet Capital, Limited Partnership
    ------------------------------



  • 4.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 02:50:00 PM

    Hi Brian,

    Does it work if you escape the user ("asc\\asc_delphix") and get rid of these extraneous backslashes (UbR \ -group "ITS-DBA") and (MSSQLSERVER \ -sourceenv pditsdbadb01)? On a Unix command line you might need the backslashes for line continuation but I don't think you need them on the Windows command line.

    Thanks,
    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 5.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 03:07:00 PM

    Just tried that, still getting same error.
    C:\temp\dxtoolkit2> dx_ctl_dsource -d pditsdlpap09 -type mssql -sourcename AdventureWorks2016 -sourceinst MSSQLSERVER  -sourceenv pditsdbadb01 -source_os_user "asc\\asc_delphix" -dbuser delphix_sql -password 8#FruchUbR  -group "ITS-DBA" -dsourcename AdventureWorks2016 -stage_os_user "asc\\asc_delphix" -stageinst MSSQLSERVER - stageenv "pditsdlpdb09" -backup_dir "\\\\asc\\backup\\sql\\pditsdbadb01" -validatedsync FULL_OR_DIFFERENTIAL -action create

    Use of uninitialized value $name in string eq at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/Environment_obj.pm line 624.
    Use of uninitialized value $name in string eq at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/Environment_obj.pm line 624.
    Use of uninitialized value $env in concatenation (.) or string at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/MSSQLVDB_obj.pm line 422.
    Staging environment  not found. dSource won't be created
    There were problems with dSource action. No job defined.



    ------------------------------
    Brian Fountain
    Associate DBA
    Arrowstreet Capital, Limited Partnership
    ------------------------------



  • 6.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 03:29:00 PM

    Hi Brian,

    Try taking out the space in this parameter " - stageenv"

    Thanks,
    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 7.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 03:44:00 PM

    i really thought that was going to be the smoking gun!  But alas, no still same error

    C:\temp\dxtoolkit2> dx_ctl_dsource -d pditsdlpap09 -type mssql -sourcename AdventureWorks2016 -sourceinst MSSQLSERVER  -sourceenv pditsdbadb01 -source_os_user "asc\\asc_delphix" -dbuser delphix_sql -password 8#FruchUbR  -group "ITS-DBA" -dsourcename AdventureWorks2016 -stage_os_user "asc\\asc_delphix" -stageinst MSSQLSERVER -stageenv "pditsdlpdb09" -backup_dir "\\\\asc\\backup\\sql\\pditsdbadb01" -validatedsync FULL_OR_DIFFERENTIAL -action create

    Staging instance MSSQLSERVER in environment pditsdlpdb09 not found. dSource won't be created
    There were problems with dSource action. No job defined.



    ------------------------------
    Brian Fountain
    Associate DBA
    Arrowstreet Capital, Limited Partnership
    ------------------------------



  • 8.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 03:57:00 PM

    Hi Brian,

    It looks like a different error. Now it is getting "Staging instance MSSQLSERVER in environment pditsdlpdb09 not found.".

    Whereas before it was getting "Use of uninitialized value $name in string eq at C:\Users\BFOUNT~1\AppData\Local\Temp\1\par-62666f756e7461696e\cache-1bede99110a4e0ceafbdac41b652b6e6a939bed9\inc\lib/Environment_obj.pm line 624.".

    This tells me it executed successfully but it did not find a SQL Server instance named "MSSQLSERVER" under the environment named "pditsdlpdb09". If you go under the Manage -> Environments menu and look at the environment named "pditsdlpdb09", do you see a SQL Server instance named "MSSQLSERVER" under the "Databases" tab?

    Thanks,
    Neal



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 9.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 04:17:00 PM

    You are correct, there's a named instance SQL2016 rather than the default. I changed that, and got a different error, but its related to stage_os_user not found. I'll have to investigate that one, but thank you!



    ------------------------------
    Brian Fountain
    Associate DBA
    Arrowstreet Capital, Limited Partnership
    ------------------------------



  • 10.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-30-2023 04:50:00 PM

    Hi Brian,

    If you are executing dxtoolkit commands from Windows, you may not have to escape the backslashes. I'm not 100% sure but the examples in the dxtoolkit documentation ( https://github.com/delphix/dxtoolkit/wiki/dx_ctl_dsource ) may have been executed from a Unix host where the backslash is meaningful and needs to be escaped.

    I was able to get the following syntax to work from a DOS command prompt:
    C:\temp\dxtoolkit> dx_ctl_dsource -d neal6017 -type mssql -sourcename McLaren -sourceinst SQL2017 -sourceenv nealwin2019.dcol2.delphix.com -source_os_user "QA-AD\delphix" -dbuser sa -password XXXXXXX -group "MSSQL" -dsourcename McLaren -stage_os_user "QA-AD\delphix" -stageinst SQL2017 -stageenv "nealwin2019.dcol2.delphix.com" -backup_dir "\\10-43-36-232\backups" -validatedsync FULL_OR_DIFFERENTIAL -action create
    Waiting for all actions to complete. Parent action is ACTION-2844
    Action completed with success



    ------------------------------
    Neal Stack
    Senior Principal Technical Support Engineer
    Delphix
    ------------------------------



  • 11.  RE: MSSQL dSource linking issue using dxtoolkit command

    Posted 03-31-2023 06:17:00 AM

    Thank you Neal, my error now is
    Stage OS user ASC\asc_delphix not found
    There were problems with dSource action. No job defined.

    I have the Stage OS user set as a sysadmin on the source SQL server



    ------------------------------
    Brian Fountain
    Associate DBA
    Arrowstreet Capital, Limited Partnership
    ------------------------------