<?xml version="1.0" encoding="UTF-8"?>
<DbVisualizer>
<Databases>
<Database id="1">
<Alias>MyMssqlServer</Alias>
<Url />
<Driver>SQL Server (jTDS)</Driver>
<Userid>db_monitor</Userid>
<Profile>auto</Profile>
<Type>sqlserver</Type>
<Password>ABCDEFGHSIFJSDSDKJSD</Password>
<ServerInfoFormat>1</ServerInfoFormat>
<AutoDetectType>true</AutoDetectType>
<Properties>
<Property key="dbvis.ConnectionModeMigrated">true</Property>
</Properties>
<UrlFormat>0</UrlFormat>
<UrlVariables>
<Driver>
SQL Server (jTDS)
<UrlVariable UrlVariableName="Server">192.168.1.1</UrlVariable>
<UrlVariable UrlVariableName="Port">1433</UrlVariable>
<UrlVariable UrlVariableName="Database">abcdefg</UrlVariable>
</Driver>
</UrlVariables>
<SshSettings>
<SshEnabled>false</SshEnabled>
<SshHost />
<SshPort>22</SshPort>
<SshUserid />
<SshPassword />
<SshPrivateKeyFile />
<SshPassphrase />
</SshSettings>
</Database>
</DbVisualizer>
And I have a provision process that generated new server for me with sqlserver on it and I need to add there properties to this XML file, so basically I need to duplicate the section of the element "Database" change a few properties and push it right after the Database element that already exist, For that I created a template for this section in an external file I am changing what ever I need but how can append the entire section to the file, I am aware that I can do it one element at a time but thats a lot of element so I want to push this entire section after the one I have:
<Database id="IDNUMBER">
<Alias>MACHINAME</Alias>
<Url />
<Driver>SQL Server (jTDS)</Driver>
<Userid>db_monitor</Userid>
<Profile>auto</Profile>
<Type>sqlserver</Type>
<Password>ABCDEFGHSIFJSDSDKJSD==</Password>
<ServerInfoFormat>1</ServerInfoFormat>
<AutoDetectType>true</AutoDetectType>
<Properties>
<Property key="dbvis.ConnectionModeMigrated">true</Property>
</Properties>
<UrlFormat>0</UrlFormat>
<UrlVariables>
<Driver>
SQL Server (jTDS)
<UrlVariable UrlVariableName="Server">MACHINEIP</UrlVariable>
<UrlVariable UrlVariableName="Port">1433</UrlVariable>
<UrlVariable UrlVariableName="Database">abcdefg</UrlVariable>
</Driver>
</UrlVariables>
<SshSettings>
<SshEnabled>false</SshEnabled>
<SshHost />
<SshPort>22</SshPort>
<SshUserid />
<SshPassword />
<SshPrivateKeyFile />
<SshPassphrase />
</SshSettings>
</Database>
No comments:
Post a Comment