Most of the time when we need to execute a SQL script or statement, then we go for SQL Server Management Studio to execute our T-SQL scripts. But the same result we can achieve using Command Prompt.
This is very simple way to do that just a matter of write a command and pass few arguments.
You can see the process status like as in when you execute a query in Management studio.
Use-case : There may be having some situations you won't be able to execute T-SQL script using Management Studio. Most of the time when doing data population. In my case, I had a situation I needed to populate a Database without using backup/restore. Once I generated script with all the schemas and related data it took around 400+Mb sql file. SQL Server Management Studio will not allow you to run the script unless you execute the query in high-end box. Because, when the file loaded to the memory it will too hard to cater our requirement. You may probably get memory error. For those kind of scenarios, this is the solution.
Happy Compiling !.. :-)
Happy Compiling !.. :-)
Comments
Post a Comment