tags:

views:

1564

answers:

2

I have an scheduled agent that is trying to access a database on another server. When it runs I get an error 4063 - Database ...databasename... has not been opened yet.

The servers is listed in the ACL as manager.

What are some other possible causes for this errors?

+1  A: 

Does the other server trust the server executing the agent? Check the server document -> Security -> Trusted servers.

Anders Lindahl
I didnt check this, but I will. Thanks!!
Eric Labashosky
A: 

It's possible to get a handle to a database without opening it. If you try and call most methods without opening it first then you will get that error. The most likely explanation though is that you don't have access to open it.

What id signed the agent? Probably not the server. The agent will run with the authority of the agent signer, so that is the id that needs to be in the ACL of the database you are trying to open.

There are a whole bunch of rules about how agents can run under different authorities and on behalf of different users. That can get pretty complex if the situation requires it. But check the agent signer has rights to open the database first then look at any "run on behalf of" settings.

kerrr