SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Database moved under System Databases by mistake


SQL Database moved under System Databases by mistake

Author
Message
montse 22199
montse 22199
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
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.
Attachments
bd.doc (43 views, 364.00 KB)
sanket kokane
sanket kokane
SSC Eights!
SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)SSC Eights! (833 reputation)

Group: General Forum Members
Points: 833 Visits: 1022
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 .

-----------------------------------------------------------------------------
संकेत कोकणे
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)SSC Guru (54K reputation)

Group: General Forum Members
Points: 54101 Visits: 17681
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" ;-)
montse 22199
montse 22199
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
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!
George M Parker
George M Parker
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 1472
Dup
George M Parker
George M Parker
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 1472
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.
George M Parker
George M Parker
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 1472
Hit the wrong button... :-D

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.
George M Parker
George M Parker
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1590 Visits: 1472
Just curious, were you able to resolve this issue?
montse 22199
montse 22199
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
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!
montse 22199
montse 22199
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
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!!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search