Sync a database

I have a production database and a development database.

I want to daily sync the development database to match the production database.

They are both on two different servers. (I could put them on the same server if that makes it possible, but would rather not.)

Is there some type of package I can create and run that will copy (without taking down the production server) the database from production to development (I can take it down), to update everything?

To create the development initially, I couldn't do an import, because it errored on a permission. So I did a backup copy. Then I moved that to my development server and did a restore. I don't want to have to do that everyday, it's too tedious and moving that file took 21 minutes.

Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
Starr DuskkConnect With a Mentor ASP.NET VB.NET DeveloperAuthor Commented:
After reading about the options, I went back to try copy database and this time left off copying the Logins selection when that errored again.

It seems to be copying fine and I can create a package for it and set a schedule.

So that's right click the database name, Tasks, Copy database.

Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
>to match the production database.
Define 'match'.

What I've seen at multiple clients is that the SQL Agent job that performs nightly backups has an extra step at the end that does a 'then drop this dev server database, and restore from the backup as the now-deleted dev server database.'
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
I want to copy the production to the development, having the same name, etc.

I need to know how to do it in real verbiage, not pseudo. Also, the backup of the production will not be on the machine with the development.

Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
I'm not intimately familiar with SQL Agent, so I'll step back to encourage other experts to respond.
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.