Re: about automation tool
- From: "Dan Guzman" <guzmanda@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 06:41:53 -0500
So, my question is:" Is there any third
party tool which is useful for running all object scripts at one time " OR "
Is there any tool present which is useful for converting or running all .sql
script file into .bat file( batch file)" ?
It seems to me that the SQLCMD/FOR as I mentioned in my initial response addresses this requirement. Is there something lacking?
For a third party product, take a look at SQL Packager from Red Gate: http://www.red-gate.com/products/index.htm
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Gautam" <Gautam@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:6DD1637A-2BA9-42D9-82A7-64CC5144D22C@xxxxxxxxxxxxxxxx
Hi Dan Guzman,
Actually, I am working on a sqlserver2005 database . Now, in a
database there are number of objects are present means (350 tables, 50
stored procedures, 50 UDF, etc) so its an easy job to make a script of each
single objects one by one , but after making scripts , when we run it on
another database server or in another database , we choose each script one by
one , so its consumes so much time .So, my question is:" Is there any third
party tool which is useful for running all object scripts at one time " OR "
Is there any tool present which is useful for converting or running all .sql
script file into .bat file( batch file)" ?
"Dan Guzman" wrote:
> 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 ?
>>
.
- References:
- Re: about automation tool
- From: Dan Guzman
- Re: about automation tool
- From: Gautam
- Re: about automation tool
- Prev by Date: Re: about automation tool
- Next by Date: Component COM+ problem in Windows Server 2003
- Previous by thread: Re: about automation tool
- Next by thread: Component COM+ problem in Windows Server 2003
- Index(es):
Relevant Pages
|