How to run .bat or script file in SQL server for creating database?
Create SQL Database by Running Script File (.bat File)
Open Command Prompt. Go to Start -> Run -> cmd now Enter.

Run command cd\ on command prompt.

Copy DATABASENAME.bat file folder path.

Type following command on command prompt and hit Enter.
cd "Folder path location"

Now type DATABASE.bat file name and Enter.

Type following command on command prompt:
Batch File Path >> Server Name >> Database Name
Hit Enter.
A new database into SQL Server will be created.