I have a database with .sql
extension which is exported from server using putty.
How to import this into SQL Server 2012 in Management Studio?
It is not accepting .sql
as database, throwing error.
If I try to restore using
RESTORE HEADERONLY FROM DISK = N'D:\LogFile\accesslog.sql';
I am getting the following error:
Msg 262, Level 14, State 1, Line 1
CREATE DATABASE permission denied in database 'master'.Msg 3013, Level 16, State 1, Line 1
RESTORE HEADERONLY is terminating abnormally.
Please help me with this.
Best Answer
You can't directly restore a MySQL backup to MSSQL. What you can do is use tools such as Microsoft SQL server migration assistant.
But those still won't help you if you don't have the proper permissions on the destination server. You'll most likely be creating a database, editing schemas and creating logins and users. Which means you need the sysadmin role.
Possible duplicate of this question or this question.