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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

the Brigadoon of databases

Status
Not open for further replies.

thedougster

Programmer
Jan 22, 2009
56
US
I've been working with SQL2008 AdventureWorks; specifically database AdventureWorks, table Person.Contact.

I experimented with using a DataGrid control's DataSource property to add a new project data source to the DataGrid, although my code was written to access the database without using a DataGrid. My code was unable to do so because, naturally enough, the database was already in use by the DataGrid.

However, when I removed the DataGrid, to my surprise the AdventureWorks database was just plain gone. That's right, not corrupted, but gone from the disk without a trace. The other databases (AdventureWorksDW, AdventureWorksDW2008, AdventureWorksLT, AdventureWorksLT2008, ReportServer$SQLEXPRESS, ReportServer$SQLEXPRESSTempDB) were still there, but not the database named simply "AdventureWorks".

So I reinstalled AdventureWorks. Now here's the part where you all conclude I've lost my mind: AdventureWorks installed without any problem - but no database named simply "AdventureWorks". No "Person.Contact" table, even in any of the other databases. No sign of them, no explanation.

But you can look up the AdventureWorks schema online and see that they DO exist. So I'm NOT insane after all - honest, fellas, I’m not dangerous, it’s all right to talk to me.

So wha’d’ya think is going on here?
 
I suspect the database got somehow detached and you had to attach it again.
 
markros:

>I suspect the database got somehow detached and you had to
>attach it again.

Sounds plausible. How do I do that?
 
Right click the databases folder under the server. Click on attach and naviate to the mdf file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top