You are here: Re: How to Execute SQL Scripts using Batch file? « MsSQL Server « IT news, forums, messages
Re: How to Execute SQL Scripts using Batch file?

Posted by Erland Sommarskog on 10/10/07 21:16

(raghutumma@gmail.com) writes:
> How can we execute SQL Scripts using Batch file???
>
> i think Batch file should contain Username,Password,Database and
> Scripts...
> Using that file scripts should run...
>
> How can i give UserName,Password,Database and all those things?
>
> Plz send me details how to do that...if possible with example...

From a .BAT file you can use the command-line tools OSQL or SQLCMD. They
are largely identical, but SQLCMD has some extra bells and whistles. On
the other hand SQLCMD only comes with SQL 2005.

For an overview over command-line options, run OSQL -? or SQLCMD -? at
the command line. For more details, look them up in Books Online.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация