How to generate script(also want to save) for a table using command line.I want to connect to sql server through command line.Can i create a procedure and invoke from command line? help me.thanks in advance.
How to generate script(also want to save) for a table using command line.I want to connect to sql server through command line.Can i create a procedure and invoke from command line? help me.thanks in advance.
you can execute SQL statements from the command line using the osql utility. http://msdn.microsoft.com/en-us/library/aa213090%28SQL.80%29.aspx
The two ways that come to mind both involve using SMO. One way would be to use Powershell to fire it off, and the other would be two write a C# application to do it.
But, effectively, there would be very little difference between the two approaches.
There is publishing wizard which can be executed from command line. There is good article on this, I just tried it.
No one has followed this question yet.