The following uses as to refer to SQL Server Analysis Service.
There are three methods to connect to SQL Server Analysis Service in a program:
Method 1: Use the as connection string to connect directly (the client program and the as server are in the same domain)
For example: <Add name = "connectionstring1" connectionstring = "Data Source = 172.19.38.62; initial catalog = databasename;"/>
Method 2: Use the IIS web site program ISAPI provided by SQL as to indirectly connect (the client program and the as server are not in the same domain (PS: I have not verified, it should be acceptable ))
For detailed steps, see: http://www.microsoft.com/china/technet/prodtechnol/ SQL /2005/httpasws.mspx
Connection string: <Add name = "connectionstring1" connectionstring = "provider = msolap.3; initial catalog = databasename; Data Source = http: // localhost/OLAP/msmdpump. dll;"/>
NOTE 2:
: If you use IE to access the configured site address, the error 500 on the server is displayed, which is normal. You can use the program to connect to the address.
: On the as server, you need to use the SQL management studio program to configure the Security (permissions) OF THE as server, allowing access from the IUSR user account on the local machine.
Method 3: (weird, but it can solve the problem of connecting clients in different domains to the as server)
There are two PCs A and B, and the programs on a PC (such as any.. NET applications or SQL management studio) need to access B PC's as, because the default connection mode provided by as is domain user connection, therefore, if a PC and B pc are not in the same domain or a login user is not a domain account, you can use the following method to connect A to B's:
- Create a local user (for example, analysistestuser) on server B)
Start-> right-click my computer-> Manage-> local users and groups-> right-click User-> New User-> enter analysistestuser, and check the password to never expire
- Configure B permissions: open management studio on B server, connect to the local as, expand the need to connect to the database-> right-click the roles directory-> select new role... -> enter role name (such as role1)-> select membership from the left-side Navigation Pane-> click Add to add an analysistestuser.
- Log out of the current user on server a, and then log on with the newly created analysistestuser.
OK, now the program on a PC can be connected to the as of B pc; in fact, as long as the and B PCs have a common local user account name, and configure the account permission in as on B.