Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

SQL to Excel Data Connection with Mirroring

$
0
0

I've got a spreadsheet that pulls fine and dandy from the ServerA when it is the principal in a 2-server mirror setup, but as soon as ServerB becomes the principal, Excel no longer is able to retrieve data.

There are two setups I've tried:

  1. With the database I am querying as the initial catalog in the Excel data connection, in which case I get "Cannot open database XXXXX" requested by the login. The login failed." when refreshing data
  2. With master as the initial catalog, in which case I get the error "Database 'XXXXX' cannot be opened. It is in the middle of a restore." when refreshing data

My connection string is as follows:

Text
Provider=SQLOLEDB.1;Persist Security Info=True;User ID=XXXXXX;Initial Catalog=master;Data Source=ServerA;Extended Properties="Failover Partner=ServerB";Use Procedure for Prepare=1;Auto Translate=True;Packet...

Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>