SQLTeam.com | Weblogs | Forums

Problem with backup database


#1

Hi all,
First of all, forgive me for my poor english.
I am new in sql server
I am facing the follow situation :
I have a computer PC at my home and one in my office at work.
I am develop a project in Visual Studio (Visual Basic) that is use an
sql database.
I am working on that project at my home and at my office.
I want to transfer the sql database from my home PC to my Work PC and
viceversa.
Otherwise, All the changes I made in the home database, you have to do from the beginning to the database in office.
and that is taking to many time.

How i can transfer the database from my home to my office ?

Thanks in advance!


#2

Not sure if this is permitted in your office as it is not at many places.
Take a backup of the database to an external drive and copy it to the machine then restore the database.


#3

dear ahmeds08,
I did. But i take an error message that the restore is failed.
i dont know what happents


#4

Is the version of SQL Server the same on both your home PC and your office one. One thing you cannot do is restore a backup to a previous version of SQL Server. You cannot create a database in SQL 2014 and then try to restore to SQL 2012 for example. You can restore to a newer version but as you are wanting to go back and forth you need to ensure both versions would be the same.

That said, without seeing the error message it is difficult to know what the issue is in this case.


#5

its the same version : SQL SERVER 2012


#6

here the error message


#7

A quick glance at the error messages point to you possibly not having permissions at the OS level to create the data files. You may want to confirm your permissions on the server. What level of access does your own login have on the SQL Server instance?


#8

I have addministratore rights in the windows logon


#9

SQL Server does not have access to that folder location. You need to modify the security on the folder to allow the service account access.

You should be able to grant access to the NT SERVICE\MSSQLSERVER account (if you have a named instance - you will need that instances account.


#10

tick the box marked 'Relocate all files to folder' on the 'Files' section.

Hope this helps.