Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Database moved under System Databases by mistake Expand / Collapse
Author
Message
Posted Tuesday, November 06, 2012 3:57 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 22, 2013 2:08 PM
Points: 19, Visits: 63
I have a sw wich has a tool to configure replication between my 2 dbs I have. When the tool asked me for a name of my distribuitor database I put the same name as my main database by mistake, then the tool misplaced the database under system databases

How can I put it back under user databases? The client side of the sw is working fine...I .

The only way Im thinking is to set the db offline and then place a backup...but Im not sure and since Im in production I dont want to mess up with my data!!

Please experts heeelp!! You cna check the image in the document I attached.


  Post Attachments 
bd.doc (25 views, 364.50 KB)
Post #1381740
Posted Tuesday, November 06, 2012 10:29 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, August 01, 2013 10:17 AM
Points: 323, Visits: 984
if you have enough space,
then I will suggest
1.take a back up of the database and restore it on the same server with different name,
2. and then rename the db which is under system database.
3.Rename the new database with the original name and configure Replication again.

It can minimize your downtime .


-----------------------------------------------------------------------------
संकेत कोकणे
Post #1381790
Posted Wednesday, November 07, 2012 5:58 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:19 AM
Points: 5,949, Visits: 12,812
montse 22199 (11/6/2012)
I have a sw wich has a tool to configure replication between my 2 dbs I have. When the tool asked me for a name of my distribuitor database I put the same name as my main database by mistake, then the tool misplaced the database under system databases

How can I put it back under user databases? The client side of the sw is working fine...I .

The only way Im thinking is to set the db offline and then place a backup...but Im not sure and since Im in production I dont want to mess up with my data!!

Please experts heeelp!! You cna check the image in the document I attached.

the distribution database is a system database, no matter what you call it. What issue are you trying to correct, the fact you mispelt the name?


-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs"
Post #1381931
Posted Wednesday, November 07, 2012 8:51 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 22, 2013 2:08 PM
Points: 19, Visits: 63
Thanks so much for your suggestions. I will do that, I am programming to do it today in the evening..wish me luck!
Post #1382030
Posted Wednesday, November 07, 2012 10:01 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 8:15 AM
Points: 653, Visits: 1,428
Dup
Post #1382066
Posted Wednesday, November 07, 2012 10:01 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 8:15 AM
Points: 653, Visits: 1,428
montse 22199 (11/7/2012)
Thanks so much for your suggestions. I will do that, I am programming to do it today in the evening..wish me luck!


First and foremost, my advice would be to call Microsoft and open a support ticket. Since this is a production user database that has been marked by SQL Server as a system database, you want to be overly cautious no matter what you try.

That being said, I've been able to re-create the problem and resolve it in a TEST environment. If you configure a SQL server for distribution (right click on the Replication folder and select Configure Distribution), you can manually enter in the name of a user database for the "distribution database name". It defaults to "distribution".

I manually entered the name of a user database and then completed the wizard. Afterwards, I confirmed that my user database was moved under the system database folder in SSMS.
Post #1382067
Posted Wednesday, November 07, 2012 10:04 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 8:15 AM
Points: 653, Visits: 1,428
Hit the wrong button...

To undo the operation, I right clicked on the Replication Folder and selected Disable Publishing and Distribution. I then seleced the Yes, Disable Publishing on this Server option and completed the wizard.

SQL Server restored my user database to the user database folder.

Again, I did this in a TEST environment and I still recommend that you call Microsoft and open a support case. Before doing anything, make sure you have a solid database backup and have confirmed that it is solid by restoring it to another location.

Good Luck.
Post #1382068
Posted Thursday, November 08, 2012 4:39 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 19, 2013 8:15 AM
Points: 653, Visits: 1,428
Just curious, were you able to resolve this issue?
Post #1382766
Posted Friday, November 09, 2012 9:18 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 22, 2013 2:08 PM
Points: 19, Visits: 63
Because this is a production Server, until today I schedule this tasks, was very helpul the steps you guys gave me.
I will let you know for sure how was it. ive been doing some tests about the distribuitor but because the software tool I have to configure replication was develop by my vendor and is different that the one in Sql I am not sure yet how my db is going to react when I hit right click and disable the replication. Ill keep you guys post it.
Thanks a lot for your help!
Wish me luck!

Post #1383085
Posted Monday, November 12, 2012 10:34 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 22, 2013 2:08 PM
Points: 19, Visits: 63
I was able to restore my db fine.
When I was trying to delete the db which was under system databases it didnt let me, so I run a query to change it to single user dropping connections the db may have and then it let me.

Thanks all a lot for your help and support!!

Post #1383772
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse