- Contents
Interaction Process Automation Technical Reference
Step 8: Import the SQL Files
At this point, Microsoft SQL Server is running and you can batch-import an entire folder of .SQL files. This section describes one method, using the "sqlcmd" tool included in Microsoft SQL Server.
-
Create a batch file named import.bat, in the same folder as the generated .SQL files.
-
Add the following line to the batch file, where you provide appropriate values for {server}, {database}, {user} and {password}:
Note: Type this command on a single command line with no line breaks:
for %%i IN (*.sql) Do sqlcmd -S {server} -d {database} -U {user} -P {password} -i "%%i" >> import.log
-
Run the batch file.
-
Check the import.log file to ensure that no errors occurred. The generated SQL files are now in the database.

