Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find active DB

Status
Not open for further replies.

appi

IS-IT--Management
Mar 17, 2003
296
CH
Hi Folks,

we have an application which needs to get a new Instance if an update needs to be done. So we've 3 Versions of their database inside our SQL-Server2000 but we do not exactly know which will be the active one.
Does anyone have a query which shows us the active DB ?
Any help is welcome
regards
Uwe
 
Easiest way is connect to the application and have something that hits the database. then go to management, current activity. the active one shoudl have connections to it. id imagine the inactive one wouldnt.
 
Hi Titleist,

that doesn't bring the result I need, because I need to stand on a DB to make the query. And than I got this DB as active DB. But we have all so called "inactive" DB's from that Application in th tree and I want to figure out which is used by the application. I guess I have to take a look in the configuration of the Application, because all DB's are "up" and I can't figure out which is the real active for the app.

thks
 
I don't think SQL Server has a way to figure this out for you. If I understand you correctly, this is the situation:

You have three versions of one database:

DATABASE v1
DATABASE v2
DATABASE v3

and all three are the exact same thing. Are the names all the same or are they different? Are they all created at the exact same time?

How do you currently tell which is the 'ACTIVE' database? Is it the most recently created?

More information about how this application works and how it creates three databases would help.

-SQLBill
 
thats why i suggested causing activity to be generated in the database. if you want use sql profiler. you should be able to see which database is getting activity when you activly hit the server through the application
 
Hi,
Bill: you're right. thats the szenario. But we're not sure which of the DB Releases is the one which the DB connects. It is an Surf-Control (internet Activity) Tool.
I found datasets in one table which has the newest timestamps in it. So I found the last release, but former Installations gave the DB's not good names like _new_Version and neue_version, so we don't exactly know which one is the real newest.
But for an upgrade we need to create a new DB so it was not possible to grade up the existing DB.
Now we have a new problem.
The Installation creates a blank Database. We tried to use the Import Mechanism of SQL-Server, but it seems that the changes, which the Service-Patch Instrallation of our software does, are not there after the import.
Does the Import imported the old table-structures as well, and how do we import the data only ??

Any hints welcome
regards
Uwe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top