0

I am executing an XMLA script which creates a database. The Data Source object in the database is created successfully. When I view the connection string of the data source, the radio button for 'Use SQL Server Authentication' is selected (with blank username and password), even though the connection string specifies "Integrated Security=SSPI". I need the option of 'Use Windows Authentication' to be selected automatically from my script.

Here is the relevant XMLA that creates the data source:

            <DataSource xsi:type="RelationalDataSource">
                <ID>MyDataStore</ID>
                <Name>MyDataStore</Name>
                <ConnectionString>Provider=SQLNCLI10.1;Data Source=MYSERVER;Integrated Security=SSPI;Initial Catalog=MYDB</ConnectionString>
                <ImpersonationInfo>
                    <ImpersonationMode>Default</ImpersonationMode>
                </ImpersonationInfo>
                <Timeout>PT0S</Timeout>
            </DataSource>
Ouananiche
  • 579
  • 5
  • 12
  • I got this working. The format of the connection string is important. I examined what was being generated more closely and realized it was specifying "Integrated Security=True", and not SSPI as I had in my example code. I added code to convert this to "Integrated Security=SSPI". This did the trick. – Ouananiche Apr 23 '12 at 16:36

1 Answers1

0

One thing that I know is that Deployment Wizard removes security information from the generated XMLA script. But you seem to have edited it so I think you are missing a DataSourcePermissions tag.

My datasource tag is exactly like yours and my deployment works fine, so try adding it:

        <DataSourcePermissions>
          <DataSourcePermission>
            <ID>DataSourcePermission</ID>
            <Name>DataSourcePermission</Name>
            <RoleID>Role</RoleID>
            <Read>Allowed</Read>
          </DataSourcePermission>
        </DataSourcePermissions>
Diego
  • 34,802
  • 21
  • 91
  • 134