1

An external consult wrote a guide on how to copy a database. Step two was detach the database using Sql Server Manager. After the detach the database was not visible in the SQL Server Manager...

Not much to do but write a mail to the service provider asking to have the database attached again. The service porviders answer: Not posisble to attach again since the SQL Server security has been violated".

Rolling back to last backup is not the option I want to use.

Can any one give feedback if this seems logic and reasonable to assume that a detached database in a SQL Server 2008 accessed through SQL Server Manager cannot be reattached. It was done by rightclicking the database and choosing detach.

-- update --

Based on the comments below I update the question with the server setup.

There are two dedicated servers:

srv1: Web server with remote desktop and an Sql Server Manager

srv2: Sql server that can be accessed through the Sql Server Manager on the web server

-- update2 --

After a restart of the server the DBA could suddenly do the attachment of the database. And I guess that after the restart it was a simple task. So all of your answer were rigth! It seems that I can only mark one as a correct answer so I marked the first answer correct. But all are correct answer.

Thanks a lot. Without posting the link to this thread then we might had so suffer while watching our database beeing restored by a backup :-) Thanks a lot.

BR. Anders

1

If you know the location of the mdf and ldf files and if you have either sysadmin or dbcreator roles then you can just attach the db yourself using sp_attach_db. If you don't have these things and your service provider refuses to take this action then I would be looking for a new service provider.

  • Thanks for the tip. I will pass it on to the hosting providers DBA. I got an email from the DBA. He will work on it in the morning (European time). We have two databases: Umbraco and UmbracoDev. It is Umbraco that has been detached. And now it looks like the database UmbracoDev has the datafile for Umbraco attached... at least it looks like some other process is using it (error 5). If so a server restart may be all it takes. He will try that as the first thing in the morning. I will post the result here. – Tillebeck Nov 25 '09 at 21:36
0

It is a policy held by your service provider. Since it is possible that the database was attached to another instance and modified, they do not want it re-attached to their instance. I don't know your setup, but if you are on a shard instance, this may be why. If you have a dedicated MSSQL instance they shouldn't care whatsoever.

You can always ask to speak with their supervisor?

  • It is a dedicated MSSQL 2008. So hopefully it will turn out allright. – Tillebeck Nov 25 '09 at 17:22
0

Technically it's a pretty simple operation to attach or re-attach a database. It sounds like they have a security policy that prohibits this. I'm assuming they host your database, is that right? Why did you detach it to begin with?

  • They host the database on a dedicated sql server. It was detached so it could be copied. It was instructions I was given by an external consultant in the attempt to copy a production database to have a development database. – Tillebeck Nov 25 '09 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.