Home > Archive > MS SQL Server > April 2005 > mdf/ldf files in Data folder but not in sysdatabases









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author mdf/ldf files in Data folder but not in sysdatabases
Jeffrey Sheldon via SQLMonster.com

2005-04-25, 9:23 am

Like having a junk drawer in your home. We have a junk SQL server where
some things are just thrown in.

We are cleaning it up and found a mdf/ldf file in the Data folder but the
database does not show in enterprise manager.

If we do a select * from sysdatabases it doesn't show there also. But if
we try to attach/detach we get an error that the database is in use.

If we go to the current processes, the database is not sleeping/active, a
sp_helpdb doesn't show anything.

Any other script to run to locate the identity/purpose of this database?
We think this could be MSDE related.

--
Message posted via http://www.sqlmonster.com
Jens Süßmeyer

2005-04-25, 11:23 am

You can try to attach the databases to check what in, there is a way to to
it in Enterprise Manager, or you use the well documented procedure
sp_attach_db.


HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---


"Jeffrey Sheldon via SQLMonster.com" <forum@nospam.SQLMonster.com> schrieb
im Newsbeitrag news:56c90fa7a0b8422
b8f19ccb3505e3efe@SQ
LMonster.com...
> Like having a junk drawer in your home. We have a junk SQL server where
> some things are just thrown in.
>
> We are cleaning it up and found a mdf/ldf file in the Data folder but the
> database does not show in enterprise manager.
>
> If we do a select * from sysdatabases it doesn't show there also. But if
> we try to attach/detach we get an error that the database is in use.
>
> If we go to the current processes, the database is not sleeping/active, a
> sp_helpdb doesn't show anything.
>
> Any other script to run to locate the identity/purpose of this database?
> We think this could be MSDE related.
>
> --
> Message posted via http://www.sqlmonster.com



Jeffrey Sheldon via SQLMonster.com

2005-04-25, 11:23 am

Hello,

we get the error message that the database is in use if we try the
attach/detach either through SQL or GUI on Enterprise Manager.

Any other suggestions?

Jeff

--
Message posted via http://www.sqlmonster.com
Jens Süßmeyer

2005-04-25, 11:23 am

PErhaps the files are used from another DB which name doesnt´t ring a bell
with the names of the files ?

There is an SP to see what Databases are chained to which files:

EXEC sp_helpfile


HTH, Jens Suessmeyer.

"Jeffrey Sheldon via SQLMonster.com" <forum@SQLMonster.com> schrieb im
Newsbeitrag news:f6b6934040874de
1bbc47708a8cc30b3@SQ
LMonster.com...
> Hello,
>
> we get the error message that the database is in use if we try the
> attach/detach either through SQL or GUI on Enterprise Manager.
>
> Any other suggestions?
>
> Jeff
>
> --
> Message posted via http://www.sqlmonster.com



Tibor Karaszi

2005-04-25, 11:23 am

Do the attach from QA, so you can post the command here and so you know exactly the parameters
passed to the procedure. Also post exact error message. It is strange that the database isn't in
sysdatabases but SQL Server still say that the database is in use. Are you sure that SQL server
doesn't complain that some other process has the database *files* open? To be certain , you can
check whether any process has the files open (I believe that sysinternals has such tool).

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/



"Jeffrey Sheldon via SQLMonster.com" <forum@nospam.SQLMonster.com> wrote in message
news:56c90fa7a0b8422
b8f19ccb3505e3efe@SQ
LMonster.com...
> Like having a junk drawer in your home. We have a junk SQL server where
> some things are just thrown in.
>
> We are cleaning it up and found a mdf/ldf file in the Data folder but the
> database does not show in enterprise manager.
>
> If we do a select * from sysdatabases it doesn't show there also. But if
> we try to attach/detach we get an error that the database is in use.
>
> If we go to the current processes, the database is not sleeping/active, a
> sp_helpdb doesn't show anything.
>
> Any other script to run to locate the identity/purpose of this database?
> We think this could be MSDE related.
>
> --
> Message posted via http://www.sqlmonster.com



jrpm

2005-04-25, 11:23 am

You should list the contents of the sysfiles table in each database. If the
files are active, they will be listed in one of them.

It sounds like a database was renamed or moved at some point and the file
names not modified appropriately.



"Jeffrey Sheldon via SQLMonster.com" wrote:

> Like having a junk drawer in your home. We have a junk SQL server where
> some things are just thrown in.
>
> We are cleaning it up and found a mdf/ldf file in the Data folder but the
> database does not show in enterprise manager.
>
> If we do a select * from sysdatabases it doesn't show there also. But if
> we try to attach/detach we get an error that the database is in use.
>
> If we go to the current processes, the database is not sleeping/active, a
> sp_helpdb doesn't show anything.
>
> Any other script to run to locate the identity/purpose of this database?
> We think this could be MSDE related.
>
> --
> Message posted via http://www.sqlmonster.com
>

Jeffrey Sheldon via SQLMonster.com

2005-04-25, 11:23 am

We think this is MSDE database that resides in the SQL server Data folder
but is not showing on THIS particular Server.

anyhow I appreciate the help we can take it from here.

--
Message posted via http://www.sqlmonster.com
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com