You are not moving instances, you are copying databases via backup restore. All you need is to get the syntax right, as per RESTORE
spec:
<general_WITH_options> [ ,...n ]::=
--Restore Operation Options
MOVE 'logical_file_name_in_backup' TO 'operating_system_file_name'
[ ,...n ]
Each WITH option is separated from the preceding with a comma. What you're missing is the , and you need to move the files into the destination location:
RESTORE DATABASE Backup_Test
FROM DISK = 'C:\SQLBackup\Backup_Tesk.bak' \\\Stored in the destination
WITH REPLACE
, MOVE 'Backup_Test' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\Backup_Test.mdf',
, MOVE 'Backup_Test_log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Data\Backup_Test_log.ldf'
Judging from your folder names (MSSQL10
vs. MSSQL10_50
) your source server is SQL Server 2008 (not R2) and only the destination is SQL Server 2008 R2. Which means that the copy will upgrade the database and the database will never be possible to copy/restore on the original non-R2 instance.
Could not find database engine startup handle error means SQL Server installation was able to install SQL Server services but when installation is trying to start SQL Server services its failing.
A simple solution I mentioned In This Technet Article is
Please go to SQL Server configuration manager and locate the SQL Server services
Right click on SQL Server express service and select properties and change startup account to Local System and select apply then OK. This will start services with Local system account privilege.
Certain reasons which can cause this error.
The account which user selected on Server Configuration page window ( during installation) is somehow not able to bring SQL Server database engine services online. Either is lacks privilege or it is corrupted. During installation of database engine services SQL Server tries to bring online database services as a internal process but due to startup account either corrupt or not having appropriate privileges it fails to do so and ultimately installation fails.
Other reason is when installation fails first time due to some reason and user uninstall failed installation from add remove program, the un-installation leaves account in broken state so any further attempt to install flashes this error message.
The reason can be also that SQL Server installation was successful in installing SQL Server and its services but due to some other limitation in system or other system related errors SQL Server is not able to come online.
In Your case reason is
2015-02-08 19:55:06.16 spid14s Error: 17190, Severity: 16, State: 1.
2015-02-08 19:55:06.16 spid14s Initializing the FallBack certificate failed with error code: 1, state: 20, error number: 0.
2015-02-08 19:55:06.16 spid14s Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
2015-02-08 19:55:06.16 spid14s Error: 17182, Severity: 16, State: 1.
To solve this Either start SQL Server service account with Local System or Create a new local account having admin privileges on the local machine and try starting SQL Server service with that account. This Blogs.msdn article says such error can come if account profile is corrupt
As you are already aware running SQL Server service with account having admin privileges is not advised. In such case for time being you can run the account with local system but you can use Configure Windows Service Account and Permissions to create account with minimum privileges.
EDIT:
FCB::Open failed: Could not open file
E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf for file number 1. OS error: 2(The system cannot find the file
specified.).
2015-02-09 10:42:45.12 spid8s Error: 5120, Severity: 16, State:
101.
2015-02-09 10:42:45.12 spid8s Unable to open the physical file
"E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\MSDBData.mdf".
Operating system error 2: "2(The system cannot find the file
specified.)".
2015-02-09 10:42:45.12 spid8s Error: 17207, Severity: 16, State:
1.
As per below logs SQL Server is searching for msdb file at location
E:\sql12_main_t.obj.x86Release\sql\mkmastr\databases\mkmastr.proj\
Can you manually move both msdb data file and log file to above location. I know this is not your desired location but let first SQL Server come online then we can use alter database command and change location to what ever suits you. To me this is bug and is happening because SQL Server is unable to ,somehow, decide the location of msd files and so choosing random location.
Revert if this does not works
Best Answer
Normally, a distro packages things in a specific format, so for instance adding a repository like
Will tell
apt
to download a package list and look for the packages here,However, with Microsoft that's not the case. They have a repository for 17.10 (as they should) which has all their packages for Ubuntu, but they have another repository specifically for SQL Server. To make matters more confusing, that SQL Server repository is in the tree of 16.04.
So they have both (pay attention to the
/pool/
s)You need the
16.04/mssql-server
repository. You can add that withYou may think because you have the
17.10/prod
and you have SQL Server installed that you don't need the16.04/prod
repository. That's incorrect, you'll need that too if you want the SQL Clientsqlcmd
provided by mssql-toolsI did file a doc bug upstream with a description of the confusion so maybe they'll fix it someday
If you find your system in an inconsistent state for any reason, you can always remove SQL Server and start over.