I'd like to import a database without knowing its name from a .sql
file.
In MySql
server it is easy because there is tools like heidSQL in which I can import easily my database from a sql file but in SQL Server I can't find the method to do it.
I tried to read the file in notepad but the encoding makes the content unreadable.
When i execute this query RESTORE HEADERONLY FROM DISK = N'C:\Planning\bdd.sql'
i have this
- How can I do it with SQL server?
- Can SQL Server Management Studio do this task or do I have to install a new tool?
.sql
are script files that should contain readable code which you can open and run from Management Studio. This does not look much usable. – Nenad Zivkovic Jun 7 '13 at 10:51.bak
and you can restore them with SSMS. However it is possible to name the file otherwise. Perhaps you can try restoring it and see if it's valid backup. Right click onDatabases
node in SSMS and chooseRestore Database...
– Nenad Zivkovic Jun 7 '13 at 10:54.sql
file to.bak
and try it again. – Devart Jun 7 '13 at 11:04