August 29, 2022 at 8:50 am
Please assist. I have a database on a live Production Server that is out of sync and not giving the resultsi need. I would like to delete/drop this db and replace it with my QA db that is healthy. How do i go about this, without lossing any data and to prevent any problems/issue's from happening?
August 29, 2022 at 2:44 pm
Restore the qa to prod under a different db name.
Once you verify that the restored db is what you want, then:
DROP the original db;
RENAME the restored db to be the same name as the original db.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
August 29, 2022 at 4:15 pm
you going to replace a PROD DB with a non prod one? how is it that your QA db is correct and your prod is bad? or is it just that the schema in the PROD DB is incorrect?
to restore a db from QA to PROD you need to have your QA Environment fully licensed for SQL Server - if it is the developer license you have on your QA environment then you CAN'T do that.
if it is just the schema that is wrong you need to first test your change (e.g. a set of scripts to update the production schema as well as any script required to update the existing data on the destination db so it matches/works with the new schema) on a copy of the prod db - and then when you are happy with your deployment scripts you apply those on the PROD DB - making sure you have a backup done PRIOR to do that deployment.
August 29, 2022 at 5:05 pm
Does this mean it's not a PROD database, but resides on a PROD server ? Can you clarify ?
"...I have a database on a live Production Server that is out of sync and not giving the results I need. ..."
August 29, 2022 at 6:02 pm
It is regarding this issuse: https://www.sqlservercentral.com/forums/topic/sys-object that i would like to drop Production and restore QA in it's place.
The DB schemas are the same. Production just stopped updating and i cant find the source of the problem.
August 29, 2022 at 6:12 pm
my advise is for your company to hire a good SQL Consultant with both code and Data analysis experience to go through your issues and find out what happened and how to fix it - your issue may be code, or it may be data or both - applying the code/schema you have on QA does not guarantee that the prod db will be up and running correctly neither that the issue, whatever it is, will not surface again soon.
taking in consideration all your history here on the forums I would also strongly advise that YOU are not involved on doing this change in PROD.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply