Monday, February 13, 2012

[298] SQLServer Error: 4060, Cannot open database requested

I get the same messages every morning at 0700:
[298] SQLServer Error: 4060, Cannot open database requested in login
'database1. Login fails. [SQLSTATE 42000]
[298] SQLServer Error: 4060, Cannot open database requested in login
'database2'. Login fails. [SQLSTATE 42000]
In reviewing technical articles, the messages appear to be related to an
expired subscription cleanup process for replication. The two databases in
questions were deleted because they were no longer needed. The messages
appear to have started then.
I have only been with the company for 5 months, the databases were deleted 3
months ago. Replication is not used now, nor was it when I first started. I
have spoken with several other people, who say replication was not used.
My only guess that maybe my predecessor was experimenting with it. My
question now is, what can I do to correct the issue to eliminate the SQL
Agent error messages. The reference articles discuss things to try in the
"Replication Monitor" folder. Since we are not using replication, this
folder doesn't exist.
We are running SQLServer 2000 SP4.
Any assistance would greatly be appreciated. Thanks!!!
Tom
Tom Roth wrote:
> I get the same messages every morning at 0700:
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database1. Login fails. [SQLSTATE 42000]
> [298] SQLServer Error: 4060, Cannot open database requested in login
> 'database2'. Login fails. [SQLSTATE 42000]
>
> In reviewing technical articles, the messages appear to be related to an
> expired subscription cleanup process for replication. The two databases in
> questions were deleted because they were no longer needed. The messages
> appear to have started then.
> I have only been with the company for 5 months, the databases were deleted 3
> months ago. Replication is not used now, nor was it when I first started. I
> have spoken with several other people, who say replication was not used.
> My only guess that maybe my predecessor was experimenting with it. My
> question now is, what can I do to correct the issue to eliminate the SQL
> Agent error messages. The reference articles discuss things to try in the
> "Replication Monitor" folder. Since we are not using replication, this
> folder doesn't exist.
> We are running SQLServer 2000 SP4.
> Any assistance would greatly be appreciated. Thanks!!!
Start by figuring out what logins are generating these errors. Maybe
that will give you a clue where to look. To find those logins:
SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
'database2')
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||The two databases in quesstion were deleted (removed). There is nothing in
'syslogins.'
Tom
"Tracy McKibben" wrote:

> Tom Roth wrote:
> Start by figuring out what logins are generating these errors. Maybe
> that will give you a clue where to look. To find those logins:
> SELECT * FROM master.dbo.syslogins WHERE dbname IN ('database1',
> 'database2')
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||Tom Roth wrote:
> The two databases in quesstion were deleted (removed). There is nothing in
> 'syslogins.'
I understand that the databases were deleted. The error message that
you're getting indicates that something is attempting to login to SQL
Server, and the login being used specifies one of those deleted
databases as the "default" database. Each SQL login has a "default"
database, and in SQL 2000, that info is stored in syslogins. The query
I gave you will find any logins that are defaulted to those deleted
databases.
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||I ran the query, and the answer is none. Neither of the databases are
referenced. The MS article (296792) mentions that If the first database that
is published is then unpublished and dropped, and there are databases that
are published, the Expired Subscription Cleanup Agent fails.
The issue is that we are not currently using publisher. Soemthing must not
have been properly cleaned up whenever replication was turned off. It
appears as though a sp named sp_expired_subscription_cleanup is the cause. I
just can't figure out how to get around it.
Tom
"Tracy McKibben" wrote:

> Tom Roth wrote:
> I understand that the databases were deleted. The error message that
> you're getting indicates that something is attempting to login to SQL
> Server, and the login being used specifies one of those deleted
> databases as the "default" database. Each SQL login has a "default"
> database, and in SQL 2000, that info is stored in syslogins. The query
> I gave you will find any logins that are defaulted to those deleted
> databases.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||It may be possible some job for replication try to do this which is not
disabled or dropped after replication.
Second try to run profiler during the time when this error occurs to
find out the issue.
Thanks and Regards
Amish shah
http://shahamishm.tripod.com
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database that
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must not
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause. I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:
|||It may be possible some job related to replication is not disabled or
dropped and cause this issue. find out any if job is running this.
Second you can run profile at the time when error happens to find
details
Regards
Amish shah
http://shahamishm.tripod.com
Run profiler during time period when you are getting this error to
Tom Roth wrote:[vbcol=seagreen]
> I ran the query, and the answer is none. Neither of the databases are
> referenced. The MS article (296792) mentions that If the first database that
> is published is then unpublished and dropped, and there are databases that
> are published, the Expired Subscription Cleanup Agent fails.
> The issue is that we are not currently using publisher. Soemthing must not
> have been properly cleaned up whenever replication was turned off. It
> appears as though a sp named sp_expired_subscription_cleanup is the cause. I
> just can't figure out how to get around it.
> --
> Tom
>
> "Tracy McKibben" wrote:

No comments:

Post a Comment