Friday, March 30, 2012

How can I Remove the Screwed-up AdventureWorksDB in SQL Server Management Studio Express?

Hi all,

I downloaded AdventureWorksDB.msi Microsoft and struggled to install it in my SQL Server Management Studio Express 8 months ago. I forgot the AdventureWorks examples and other stuff were in my C:\ drive. Recently, I downloaded a new AdventureWork.msi and executed it to install without removing the old stuff from the "Add and Remove" of Control Panel. Now my AdventureWorks database is screwed-up in my termical PC that is linked with Microsoft NT 4 LAN System!!! Please kindly help and tell me how I can revome the scewed-up AdventureWorksDB in my terminal PC.

Thanks in advance,

Scott Chang

Hello Scott -

I'm not sure what is going on here - can you tell me where the software is installed and what you mean by "screwed up"? to help you, the readers need to know what you're seeing, and where. Be as detailed as you can.

Thanks!

Buck Woody

|||

Hi Buck,

I can tell you the following 2 things:

1) When I double-clicked on AdventureWorksDB.msi recently, it tried to install the stuff of Sample Databases for Express Editions in my C:\Program Files\Microsoft SQL Server\MSSQL1\MSSQL\. But it stated an error occurred in the last step of installation process. After it happened, I tried to remove "AdventureWorksDB" in the "Add and Remove" of Control Panel, I got the following error:

AdventureWorksDB Error. 1326 Error: getting file security: C:\Program Files\Microsoft SQL.Server\MSSQL 1

\MSSQL\GetLastError 5.

I think it was because I forgot to remove the old AdventureWorksDB, before I clicked the new AdventureWorks.msi!!

2) This morning, I entered my SQL Server Management Studio Express and tried to removed the "AdventureWorksDB" in the Databases by using 'Delete' after I right-clicked "AdventureWorksDB" and "Delete Object" appeared - I kept clicking "Delete Object" and it just kept going and doing the same thing again and again..... I gave up at this poit!!!

That is what I called "screwed-up" AdventureWorksDB. Please help and tell me how I can remove this "screwed-up" stuff.

Thanks again,

Scott Chang

|||I see. Try this: Right-click the database and select "All Tasks", then "Detach Database". Re-start the server, and then see if the database was released. If it is, then you can delete the Adventureworks database files from the hard drive.|||

Hi Buck, Thanks for your response.

I following your instructions and I got the following:

Database to detach:

Database Name Drop Update Keep Status Message

AdventureWorks V Failure Detach database failed to Server

|OK|

After I clicked on the |OK| button, the following appeared:

Microsoft SQL Server Management Studio Express

Detach database failed for Server 'myComputerID\SQLEXPRESS'. (Microsoft.SqlServer.Express.Smo)

Additional Information:

-> An exception occured while executing a Transct-SQL statement or batch. (Microsoft.SqlServer.Express.ConnecttionInfo)

-> EXECUTE permission denied on object 'sp_detach_db', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL

Server, Error: 229)

|OK|

I am completely lost now. Please help me again and give me more instructions to resolve/solve the proble.

Many Thanks and Regards,

Scott Chang

|||

Hi Scott,

The installer should have put something in add/remove programs for you to uninstall it. The new one does that.

|||

Hi,

Refer http://download.microsoft.com/download/d/8/6/d865cf0c-c44b-401b-b426-b3bf5c628112/SQLServerDatabasesAndSamplesOverview.htm for instruction on how to remove Adventure Works DB

HTH

Hemantgiri S. Goswami

No comments:

Post a Comment