I am using SQL Server 2008 R2, I have a script to update the DB, that script is approx 50 MB in size and contains some about 800,000 lines.
Error:
Ok, none of the answers were sufficient to get my script successfully restoring.
So:
Ensure that your network account has sufficient permissions to access both SQL Server instance and the specific database you intend to restore.
It's best that the database you intend to restore actually exists, if it was merely generated from Generate Scripts (with modifications to include both Schema and Data)
Run the command-line tool in Administrator mode (if necessary), e.g., type CMD from Run on the start menu
In the command-line tool, type something like "SQLCMD -d CMS -i C:\Carnotaurus\Data\script.sql". Here, CMS is the name of the database I intend to restore and "C:\Carnotaurus\Data\script.sql" is the full file path of the restore script that was generated by the Generate Scripts in SMSS.
I hope this clears-up a few missing steps.