Re: about automation tool
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 22 Oct 2007 19:51:37 -0500
Thanx for your previous reply, its very useful , but i need a tool for
this process .if you know any such type of tool please reply me as soon as
possible.
Can you elaborate on your requirements?
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Gautam" <Gautam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:78274903-9DBB-4332-808F-5DBF766C6135@xxxxxxxxxxxxxxxx
Hi,
I am using sqlserver2005
Thanx for your previous reply, its very useful , but i need a tool for
this process .if you know any such type of tool please reply me as soon as
possible.
"Dan Guzman" wrote:
> hi, my self gautam , i am a DBA . Is there any automation tool which is
> usefil for running all batch file?
Windows includes a FOR command that can be used to iterate over a list of
files and execute a command for each. For example:
FOR %%f IN (Tables\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (PrimaryKeys\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (ForeignKeys\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (UniqueConstraints\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (Indexes\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (Views\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
FOR %%f IN (StoredProcedures\*.sql) DO SQLCMD -E -S MyServer -E -I -i "%%f"
This method works best when you have one script per object type and don't
need to control the execution order. In cases where you have hard
dependencies (e.g. view that references other view), you'll need to make
sure scripts run in the correct order. This can be accomplished with a
number of techniques, such as individual SQLCMD commands or using ":r"
within a SQLCMD file to specify the external scripts in the desired order.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Gautam" <Gautam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:16EC7068-D3C8-4F08-A0ED-71AA8171C932@xxxxxxxxxxxxxxxx
> hi, my self gautam , i am a DBA . Is there any automation tool which is
> usefil for running all batch file? Means, Suppose in a database there > are
> more than 350 table , 25 procedure and 25 functions are present in a
> database .i maintain total around 400 scripts in individual. But when > we
> create a new database we will run each single script so, its take so > much
> time .. so i want a automation or other tool which is useful for > running
> all scripts in one time ?
.
- Follow-Ups:
- Re: about automation tool
- From: Gautam
- Re: about automation tool
- Prev by Date: Re: duplicate removal
- Next by Date: Re: about automation tool
- Previous by thread: Re: duplicate removal
- Next by thread: Re: about automation tool
- Index(es):
Relevant Pages
|