How to import DB with .sql extension into SQL Server 2012? 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.
From BOL:


  If the database being restored does not exist, the user must have
  CREATE DATABASE permissions to be able to execute RESTORE. If the
  database exists, RESTORE permissions default to members of the
  sysadmin and dbcreator fixed server roles and the owner (dbo) of the
  database (for the FROM DATABASE_SNAPSHOT option, the database always
  exists).


You're creating a database on your server, regardless of the fact that it already existed on another server, therefore you need CREATE DATABASE permissions.