Avatar of rajneesh1978
rajneesh1978
Flag for India asked on

RE : SQL Server 2005(Database backup)

Hi ,

I have database on dev and live server with the same name and already sync. Now, i have updated some design, import some data and delete extra data.

I would like to sync the dev and live server, how?

Thanks
Microsoft SQL Server 2005

Avatar of undefined
Last Comment
David Todd

8/22/2022 - Mon
David Todd

Hi,

How important is the dev server data?

Standard practice in my shop is to update test overnight by restoring productions latest backup. Dev is updated once a fortnight.

All changes are scripted, and scripts are applied to production by DBA.

Cheers
  David
rajneesh1978

ASKER
Dev server data is important because this is the first time launch of programme. I have already restored the dev database one time to production for testing, now i have the updated database in dev instead of live.

Note : Previously i have restored by using Database ->Task-> Bakup and file name is .bak file that i restored in live. Can i follow the same step for updating live again.

We don't have any DBA, so i need to restore the dev database.

Please let me know the step for restroring

Thanks
ASKER CERTIFIED SOLUTION
Raja Jegan R

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Todd

Hi,

rrjegan17 is right.

But I suggest that in the absence of a DBA, you need to do this like a DBA and script it, because the script is reusable.

use tempdb
go

restore filelistonly from disk = 'Your full path and name of backup file'
;

restore database YourDatabaseName
from disk = 'Your full path and name of backup file'
with
  replace
  , move 'LogicalDatafile' to 'PhysicalDatafile - including full path'
  , move 'LogicalLogfile' to 'PhysicalLogfile - including full path'
  , stats = 5

HTH
  David
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck