Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Sivangari
Starting Member
16 Posts |
Posted - 2010-10-06 : 01:46:57
|
Hi,I need to run a .sql file without opening that .sql file in SQL Management studio.Can any one help me please. |
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-06 : 01:57:41
|
You can use Sqlcmd.Not sure about proper syntax though.its something like thissqlcmd -S Servername -U username -P password -d databasename -i'input sql filename' -o 'o/p filename' PBUH |
|
|
Sivangari
Starting Member
16 Posts |
Posted - 2010-10-06 : 02:42:18
|
Hi,Thanks for your kindly help.But can u give me the format. i cannot find it.Thanks. |
|
|
Sachin.Nand
2937 Posts |
Posted - 2010-10-06 : 02:44:49
|
Just google it or look for it in BOL.I am sure you can find it.PBUH |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-10-06 : 04:29:40
|
RTMhttp://msdn.microsoft.com/en-us/library/ms162773.aspxFirst hit on google for sqlcmdCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-10-06 : 04:31:04
|
And the second hit is a tutorial explaining how to use it.http://msdn.microsoft.com/en-us/library/ms170207.aspxCharlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
|
|
|
|
|