Auto Createapplication.dat for serverlist

Single-click script execution on multiple SQL Servers.

Moderators: JonathanWatts, Anu Deshpande, dlkj, Colin Millerchip, Michelle Taylor

Auto Createapplication.dat for serverlist

Postby dbdmora » Wed Mar 28, 2012 9:17 pm

How can we create a application.dat with out server list automatically?

multiple users use multiscript and we would like to auotmatically create the application.dat file on a daily basis when new SQL servers are online. This way anyone can copy the application.dat file to their local folder and get an upto date server list.

It used to work but something in the new version broke it.
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby Brian Donahue » Fri Mar 30, 2012 1:17 pm

Hi,

Are you talking about the List Manager application? That's the only thing I know that could import a list of SQL Servers automatically. Is it because you're trying to connect to SQL Server 2012?
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby dbdmora » Fri Mar 30, 2012 2:22 pm

Hello Brian, I am actually talking about application.dat file that multiscript stores all the servers you added to the Database distribution list. We had a SSIS package that would create the application.dat file with our servers, where anyone can copy it to their PC. Now for some reason it is failing after upgrading multiscript. If someone can give us the correct string inside the application.dat file we need to follow, this will help us tremendously
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby Brian Donahue » Fri Mar 30, 2012 3:11 pm

I'm not exactly sure what you're after but I can send you an XSD (schema definition file) of the applicaiton.dat and that may help.

I also have a utility, although a bit clunky, which will detect all the databases you have access to on a network and add them to your dat file.

ftp://support.red-gate.com/utilities/mu ... export.zip
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby dbdmora » Fri Mar 30, 2012 3:14 pm

Yes, please send me the XSD for application.dat. That will help us make sure our SSIS package is correct.
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby Brian Donahue » Fri Mar 30, 2012 3:26 pm

Here is the schema definition:
Code: Select all
<?xml version=\"1.0\" encoding=\"utf-8\"?>
<xs:schema elementFormDefault=\"qualified\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">
  <xs:element name=\"MultiScriptApplication\" nillable=\"true\" type=\"MultiScriptApplication\" />
  <xs:complexType name=\"MultiScriptApplication\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DatabaseLists\" type=\"ArrayOfDatabaseList\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"AddedServers\" type=\"ArrayOfServer\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Options\" type=\"ApplicationOptions\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"CurrentProject\" type=\"xs:string\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"ArrayOfDatabaseList\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"DatabaseList\" nillable=\"true\" type=\"DatabaseList\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"DatabaseList\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Name\" type=\"xs:string\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Databases\" type=\"ArrayOfDatabase\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ValidAndSelectedDatabases\" type=\"ArrayOfDatabase\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"ArrayOfDatabase\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Database\" nillable=\"true\" type=\"Database\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"Database\">
    <xs:sequence>
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Selected\" type=\"xs:boolean\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Protocol\" type=\"NetworkProtocol\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Timeout\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"PacketSize\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"EncryptConnection\" type=\"xs:boolean\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ServerObject\" type=\"Server\" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name=\"NetworkProtocol\">
    <xs:restriction base=\"xs:string\">
      <xs:enumeration value=\"Default\" />
      <xs:enumeration value=\"SharedMemory\" />
      <xs:enumeration value=\"NamedPipes\" />
      <xs:enumeration value=\"TCPIP\" />
      <xs:enumeration value=\"IPX\" />
      <xs:enumeration value=\"MultiProtocol\" />
      <xs:enumeration value=\"AppleTalk\" />
      <xs:enumeration value=\"VIA\" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name=\"Server\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ServerName\" type=\"xs:string\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"IntegratedSecurity\" type=\"xs:boolean\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"UserName\" type=\"xs:string\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"Password\" type=\"xs:string\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"RememberPassword\" type=\"xs:boolean\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Protocol\" type=\"NetworkProtocol\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Timeout\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"PacketSize\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"EncryptConnection\" type=\"xs:boolean\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"ArrayOfServer\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"unbounded\" name=\"Server\" nillable=\"true\" type=\"Server\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"ApplicationOptions\">
    <xs:sequence>
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ExecutionTimeout\" type=\"xs:int\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"BatchSeparator\" type=\"xs:string\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"DisplayFormat\" type=\"DisplayFormat\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MaximumNonXMLDataRetrieved\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MaximumXMLDataRetrieved\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MaximumCharactersPerColumn\" type=\"xs:int\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"UseParallelExecution\" type=\"xs:boolean\" />
      <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MaximumParallelServers\" type=\"xs:int\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"ScriptEncoding\" type=\"Encoding\" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name=\"DisplayFormat\">
    <xs:restriction base=\"xs:string\">
      <xs:enumeration value=\"Grid\" />
      <xs:enumeration value=\"Text\" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name=\"Encoding\" abstract=\"true\">
    <xs:sequence>
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"EncoderFallback\" type=\"EncoderFallback\" />
      <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"DecoderFallback\" type=\"DecoderFallback\" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name=\"EncoderFallback\" abstract=\"true\" />
  <xs:complexType name=\"DecoderFallback\" abstract=\"true\" />
</xs:schema>
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby dbdmora » Fri Mar 30, 2012 4:10 pm

Brian, thanks for replying so quickly. when I open application.dat file with notepad++ I don't see the same thing as below. I am running version 1.1.0.34. Am i on the latest version? Thanks

P.S this is what I see
Code: Select all
<?xml version="1.0" encoding="utf-16" standalone="yes"?><!--
SQL Multi Script 1
SQL Multi Script
Version:1.1.0.34--><multiScriptApplication version="2" type="multiScriptApplication"><databaseLists type="List_databaseList" version="1"><value version="2" type="databaseList"><name>Default Distribution List</name><databases type="BindingList_database" version="1" /><guid>c84c1b63-faa3-426c-ba7e-feb4473355a2</guid></value></databaseLists><addedServers type="List_server" version="1" /></multiScriptApplication>
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby Brian Donahue » Fri Mar 30, 2012 4:21 pm

The above is the complete schema definition -- it defines the rules of how the file should be formatted. If it doesn't make any sense I'm afraid I can't really help you because you need to have a good understanding of xsd/xml to know what is wrong in the document.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby Brian Donahue » Fri Mar 30, 2012 4:37 pm

Just had a look and it may be a case-sensitivity issue? In the XSD, it's MultiScriptApplication and in your file it's multiScriptApplication...
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby dbdmora » Fri Mar 30, 2012 6:38 pm

Brian, it is not a case sensative issue. The XML below is coming from what MultiScript automatically creates into application.dat file.

Is it possible the SSIS package encoding output is wrong? Sometimes if we copy the contents inside the app.dat file we create into the one that Multiscript creates, it works.

What type of file encoding does multiscript use to create application.dat. that might be the issue because all the XML is correct. If we ouput as plain text and just rename the file extension to .dat, multiscript re-encodes but blanks out the inside content, if that makes sense.
dbdmora
 
Posts: 34
Joined: Mon Nov 21, 2011 9:55 pm
Location: Atlanta, GA

Postby Brian Donahue » Mon Apr 02, 2012 9:17 am

MultiScript should be producing UTF-8 XML.
Brian Donahue
 
Posts: 6668
Joined: Mon Aug 23, 2004 10:48 am

Postby sashunya » Thu Jul 12, 2012 6:08 pm

dbdmora, have you been able to resolve this issue? I am at my wits end...
sashunya
 
Posts: 1
Joined: Thu Jul 12, 2012 6:06 pm


Return to SQL Multi Script 1

Who is online

Users browsing this forum: No registered users and 0 guests