Quantcast
Channel: SQL Server Setup & Upgrade Forum
Viewing all articles
Browse latest Browse all 7701

How to restore a database by using a script file?

$
0
0

Gurus!

I have received a huge, 1 GB sql script file, and I need to create a database in my SQL server instance by using it. The guys who sent it to me generated it by using the Tasks -> Generate Script option on the original database, and while they generated it, they selected the 'script both schema and data' option. Because of all the data in the database, all the INSERT statements that were generated has caused the script file to balloon up to 1 GB. For some reasons, they are unable to give me the .bak file.

Needless to say, I can't open up the 1 GB script file in a query window and then execute it. But I need to create a database on my PC using this script file. How do I do it without opening it Gurus? What commands do I run in order to pass the path of the script file as a parameter, and then create a database without opening the file? And by some chance, if there is some syntax error somewhere in the middle of the file, how do I handle it Gurus?

Please let me know Gurus! Seeking your wisdom on this!

Novice Kid


Viewing all articles
Browse latest Browse all 7701

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>