Restore from a .sql file

Hi, I have a backup created remote, so I got a .sql file.
Im trying to restore it on a new DB engine, but when I try to use the sql file it says “File is too large to open”. The .sql is 2.5Gb.

What’s the correct way to restore from a .sql file?
Thanks.

More info:
Using:
RESTORE DATABASE med
FROM DISK = N’C:\temp\Med202403241111.sql’
WITH NORECOVERY;

I get:
The media family on device ‘C:\temp\Med202403241111.sql’ is incorrectly formed. SQL Server cannot process this media family.

Msg 3013, Level 16, State 1, Line 1

Hello Francisco_Villagran,

You created a remote backup and received the SQL file. Unfortunately, restoring this backup via SSMS is not feasible due to its size. Additionally, it cannot be restored using SQL commands as it is not a typical physical SQL Server backup.

You have two options for restoring the backup: either utilize the restore functionality (ensure to select a remote connection) or employ the sqlcmd utility by passing the backup file for execution:

sqlcmd -S localhost -d NorthWind -i "C:\MyScript.sql"

Here are more details:
https://sqlbackupandftp.com/blog/remote-sql-server-backups-explained/
https://sqlbackupandftp.com/blog/how-to-restore-sql-server-backups/

Please don’t hesitate to reach out if you have any further questions or concerns.

Thank you!