Showing posts with label databse. Show all posts
Showing posts with label databse. Show all posts

Sunday, March 11, 2012

Detaching databse to move to another location on the same server

Hi,
I am trying to detach a database to move to another locaion on the same
machine
The database has replication. I get the following message:
Cannot detach database while being replicated.
Any Idea how to detach database without removing replication.
Thanks
Have you tried a backup and restore method instead ?
"Paul k" <Paul k@.discussions.microsoft.com> wrote in message
news:2B485CBB-DA5D-4E7A-BB8F-1F5EF9ADC5EE@.microsoft.com...
> Hi,
> I am trying to detach a database to move to another locaion on the same
> machine
> The database has replication. I get the following message:
> Cannot detach database while being replicated.
> Any Idea how to detach database without removing replication.
> Thanks
>
|||you can stop MSSQL Server, and then copy the files to the other server, Then
re attach them there.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"Paul k" <Paul k@.discussions.microsoft.com> wrote in message
news:2B485CBB-DA5D-4E7A-BB8F-1F5EF9ADC5EE@.microsoft.com...
> Hi,
> I am trying to detach a database to move to another locaion on the same
> machine
> The database has replication. I get the following message:
> Cannot detach database while being replicated.
> Any Idea how to detach database without removing replication.
> Thanks
>

Detaching and Attaching a database

Hi:
I need to detach the databse to change its location and then attach again.
If this database is a publisher in a replication, will detaching and
attaching affect anything? I don't think so but i just want to confirm it.
Thanks
You must remove all publications from the database and unpublish the
database to detach it.
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:98E2311A-E92D-4041-ABDC-0ABA37C39D78@.microsoft.com...
> Hi:
> I need to detach the databse to change its location and then attach again.
> If this database is a publisher in a replication, will detaching and
> attaching affect anything? I don't think so but i just want to confirm
> it.
> Thanks
|||Thanks for replying. Can you please tell me how do I remove all publications
from the database and unpublish the database it? And after I attach it, how
do I put all all the publications back and publish the database again. Can
you please give me some instructions? Actually I am new to replication.
Thanks
Sohail
"Hilary Cotter" wrote:

> You must remove all publications from the database and unpublish the
> database to detach it.
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:98E2311A-E92D-4041-ABDC-0ABA37C39D78@.microsoft.com...
>
>

Detaching a replication databse

I am trying to detatch a database that is set up as a publisher. I have desabled the replication tasks on both the publisher and subscriber db and am still unable to detach the db. Any ideas?

The image below is an example of the message I receive. I have tried after hours so at that time the users are 0.

Thanks.Usually when I get these it is either residual connections from apps the end-users have not shut down, or connections from developers using EM or QA that have not been disconnected, or sometimes even a connection in EM or QA from a session on the server itself.

Have everyone log out completely from the connecting app as well as EM and QA.|||Kindly do not post multiple (Duplicate) posts, refer to this http://www.dbforums.com/t989046.html link to follow.

Detaching a replication databse

I am trying to detatch a database that is set up as a publisher. I have desabled the replication tasks on both the publisher and subscriber db and am still unable to detach the db. Any ideas?

The image below is an example of the message I receive. I have tried after hours so at that time the users are 0.

Thanks.You still have active connection to the database, that's why you can't detach the database. You also need to completely uninstalled the replication. As shown on the database properties, the database still replication enabled.|||Originally posted by joejcheng
You still have active connection to the database, that's why you can't detach the database. You also need to completely uninstalled the replication. As shown on the database properties, the database still replication enabled.

As stated, the image just shows the current message. After hours I have 0 connections but I still receive the replication in progress message.|||To confirm on replication status run sp_removedbreplication on the involved database.