use xp_cmdshell and sqlcmd
EXEC xp_cmdshell 'sqlcmd -S ' + @DBServerName + ' -d ' + @DBName + ' -i ' + @FilePathName
More Related Contents:
- Insert results of a stored procedure into a temporary table
- Select top 10 records for each category
- How important is the order of columns in indexes?
- Using the result of an expression (e.g. Function call) in a stored procedure parameter list?
- sql query to return differences between two tables
- SQL Server – transactions roll back on error?
- Difference between a User and a Login in SQL Server
- Drop all the tables, stored procedures, triggers, constraints and all the dependencies in one sql statement
- For Nvarchar(Max) I am only getting 4000 characters in TSQL?
- Is it possible to select sql server data using column ordinal position
- Insert Picture into SQL Server 2005 Image Field using only SQL
- Execute Stored Procedure from a Function
- How do I group on continuous ranges
- Dynamic SQL to generate column names?
- Is it possible to perform multiple updates with a single UPDATE SQL statement?
- Restrict an SQL Server connection to a specific IP address
- Incorrect syntax near the keyword ‘with’…previous statement must be terminated with a semicolon
- SQL Server PIVOT perhaps?
- How to find consecutive rows based on the value of a column?
- SQL server identity column values start at 0 instead of 1
- How to escape square brackets inside square brackets for field name
- How do you copy a record in a SQL table but swap out the unique id of the new row?
- What is the internal representation of datetime in sql server?
- Eliminate and reduce overlapping date ranges
- Cumulative Total in MS Sql server [duplicate]
- SQL query to group by day
- Export table data from one SQL Server to another
- SQL can I have a “conditionally unique” constraint on a table?
- Memory effective way to read BLOB data in C#/SQL 2005
- SQL, How to Concatenate results?