9 Replies - 754 Views - Last Post: 17 May 2016 - 09:27 AM

#1 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 592
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

how to find what db is connected to a restore?

Posted 05 May 2016 - 07:16 AM

ok this is prob a dumb question but i cant seem to find the answer for this question:

how can i tell what database was used for a restore on ms studio?

there are clients that have a ton of databases in our system but only 1 restore and i need to clean out the old databases.

any thoughts?

i cant just back up the restore either because i am out of room on the server so that is a no go...
Is This A Good Question/Topic? 0
  • +

Replies To: how to find what db is connected to a restore?

#2 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,359
  • Joined: 03-December 12

Re: how to find what db is connected to a restore?

Posted 05 May 2016 - 12:32 PM

According to one of our DBA's, not unless the file is named. Otherwise, you need to start the restore process to know.
Was This Post Helpful? 0
  • +
  • -

#3 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 592
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

Re: how to find what db is connected to a restore?

Posted 06 May 2016 - 03:46 AM

great give me bad news
Was This Post Helpful? 0
  • +
  • -

#4 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,359
  • Joined: 03-December 12

Re: how to find what db is connected to a restore?

Posted 06 May 2016 - 04:37 AM

Sorry...change how the names are done going forward...
Was This Post Helpful? 0
  • +
  • -

#5 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 792
  • View blog
  • Posts: 1,886
  • Joined: 24-April 12

Re: how to find what db is connected to a restore?

Posted 14 May 2016 - 10:15 AM

I have to admit. I did not understand the question. But if you are asking whether you can tell what's in a backup file without the name telling you, you can do a restore header only to see what it contains.

This post has been edited by BBeck: 14 May 2016 - 10:17 AM

Was This Post Helpful? 0
  • +
  • -

#6 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 592
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

Re: how to find what db is connected to a restore?

Posted 17 May 2016 - 05:09 AM

nope not at all


meaning i have multiple databases:

client1_a size 90g
client1_b size 90g
client1_c size 90g
client1_d size 90g

1 restored db called client1 which was restored from one of the above db's

i need to know which db the restore came from so i can delete the rest

so if it came from

client1_a size 90g
i would delete the other 3

I would normally just back up the db and delete the rest however i have 2gigs free space and as you can see the db's in question are 90gigs and i cant randomly delete databases not know which is the good one
Was This Post Helpful? 0
  • +
  • -

#7 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,359
  • Joined: 03-December 12

Re: how to find what db is connected to a restore?

Posted 17 May 2016 - 05:17 AM

What about creating a test database to see which is the current version.
Was This Post Helpful? 0
  • +
  • -

#8 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 592
  • View blog
  • Posts: 3,823
  • Joined: 12-January 10

Re: how to find what db is connected to a restore?

Posted 17 May 2016 - 05:37 AM

what i was told is that since they werent sure which is the one attached to leave them all there-- sounds good but i am outa room

also i cant do that because there have been about 50 other restored db's on there since this one was restored so it will just grab the last restored db
Was This Post Helpful? 0
  • +
  • -

#9 astonecipher  Icon User is offline

  • Too busy for this
  • member icon

Reputation: 2329
  • View blog
  • Posts: 9,359
  • Joined: 03-December 12

Re: how to find what db is connected to a restore?

Posted 17 May 2016 - 05:49 AM

Seems like a good time to update the naming requirements!
Was This Post Helpful? 0
  • +
  • -

#10 smendoza88  Icon User is offline

  • D.I.C Head

Reputation: 19
  • View blog
  • Posts: 96
  • Joined: 13-July 11

Re: how to find what db is connected to a restore?

Posted 17 May 2016 - 09:27 AM

I haven't touched sql server in a long time but doesn't it write to the logs which file was restored? I can't remember if it does or doesn't though. Sounds like you may need to grab a external HD and copy the back ups to it, make a new backup and figure out what you want to do with the old ones.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1