Showing posts with label across. Show all posts
Showing posts with label across. Show all posts

Sunday, March 25, 2012

Derived column based on result of Oracle query

Hi,

I need to create a derived column for each row in a SQL dataset.

This derived column needs to be created by passing across two values from the SQL dataset and querying an Oracle table based on those parameters. If the Oracle query returns a record(s) then the derived column should be set to 1 otherwise leave it as default (0).

One of these parameters needs to check a date range so I can't use a Lookup Transformation...any ideas how I can accomplish this ?

Thanks

Here is one way to do this...

-Have one source for the sql source and another source for the oracle source.

-Send them both to a merge join, choose a left outer join with the sql source as the left input, choose one column from the oracle source.

-After the merge join use a derived column transformation. Use an expression to say that if the field from the oracle source is null then 0 else 1.

edit: After re-reading your post, the date range makes things much more difficult. It may be best to send both sources to staging tables in sql server, and then write run a query to join them together perhaps a (correlated subquery with a case statement in the select clause).

|||

Hi,

I am not sure if this will solve your problem completely:

In a Data Flow Task pull the two values from the SQL dataset into the Recordset Destination.

Now, in the Control Flow Task, use a For Each Loop Container to store the Recordset into a variable (you will have to create variables for each field that you want to write to the destination as well as one for the recordset).

Loop through the recordset and for each pair of values, use a Excecute SQL Task to execute a SQL query or a Stored Procedure which will return matching record(s). Now based on whether a record was returned or not, write all the fields, plus the derived column value into the destination.

Regards,

B@.ns

|||

Thanks guys - I actually used a combination of your techniques to get the result.

|||I just wanted to point out that you can use a Lookup to do this. You just need to go the the advanced tab, enable memory restriction, and you can alter the query used for the lookup to include ranges.sql

Derived Column - DateTimeStamp From String (dd-mmm-yy)

I have come across something strange. I was wondering anyone else had the same problem or is it me?

I have a source file as shown below:
1,30-Feb-06,3,Test
2,20-Feb-06,5,Test1

Second column is defined as String(9) in the flat file source. Then I have a Derived Column between source and Trash destination. The Derived Column adds a new column to the datd flow. The expression is as shown below :
(DT_DBTIMESTAMP)(SUBSTRING(Col2,1,2) + "/" + SUBSTRING(Col2,4,3) + "/" + SUBSTRING(Col2,8,2))

The data is loading into the database successfully, where I was expecting it to fail. I placed a data viewer and saw the following result set.

Source (Col2) Derived Col
-
30-Feb-06 06/02/1930 00:00:00 - WRONG result set
20-Feb-06 20/02/2006 00:00:00 - RIGHT result set

Can anyone repeat this problem or am I missing something? I have got SP1 and Hotfix installed.

Thanks

Sutha

This one feels like an old friend - albeit an irritating old friend.

Briefly, this is a result of routines in oleaut. Really, the oleaut library is trying to be friendly and to cast your string to a valid date. Knowing that there are different formats out there such as yy-mm-dd and dd-mm-yy it "assumes" that you have a valid date in one of these formats and therefore - to hugely oversimplify - finds the format that enables it to perform a cast to a valid date.

Note that this behaviour has been around for a long time when using a non-US local (there are developers who believe it led to some slight misalignment of the pyramids) and many applications actually rely on the behaviour, so it is difficult to change after a long time.

I would suggest that if you are likely to have invalid dates of this particular nature, that you validate them using some code before applying the cast or conversion. Not a great solution, but effective.

Donald

Friday, March 9, 2012

Deploying DB Maintenance plan in SQL 2005 across many differentservers

I am in the process of depolying a database maintenance plan tasks for
several servers. I have designed one using the Databases maintenance
plan wizard but I want to be able to replicate the same maintenance
plan for all the SQL instances in our environment. I want to avoid to
manually create them for each and every instance? If possible I want
to also avoid importing this from other servers, I am looking to see
if there is a way to script it all.
Is there a way to deploy the same database maintenance plan for all
the SQL instances in a automated fashion? What will be the most
efficient way to accomplish this?
Any help in this regard will be greatly appreciated.
Thanks
Take a look at SQL Farms and see if it can help out.
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"shub" <shubtech@.gmail.com> wrote in message
news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>I am in the process of depolying a database maintenance plan tasks for
> several servers. I have designed one using the Databases maintenance
> plan wizard but I want to be able to replicate the same maintenance
> plan for all the SQL instances in our environment. I want to avoid to
> manually create them for each and every instance? If possible I want
> to also avoid importing this from other servers, I am looking to see
> if there is a way to script it all.
> Is there a way to deploy the same database maintenance plan for all
> the SQL instances in a automated fashion? What will be the most
> efficient way to accomplish this?
> Any help in this regard will be greatly appreciated.
> Thanks
|||On Mar 24, 10:47Xam, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> Take a look at SQL Farms and see if it can help out.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
> "shub" <shubt...@.gmail.com> wrote in message
> news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>
>
>
> - Show quoted text -
Thank you so much for your response. Besides this product is there any
other option to deploy database maintenance plan across different
server in SQL 2005?
|||That is one of the down falls of using the maintenance plans. I would create
your own scheduled jobs and custom maintenance sps so that you can script
these and do what you want with them.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"shub" <shubtech@.gmail.com> wrote in message
news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>I am in the process of depolying a database maintenance plan tasks for
> several servers. I have designed one using the Databases maintenance
> plan wizard but I want to be able to replicate the same maintenance
> plan for all the SQL instances in our environment. I want to avoid to
> manually create them for each and every instance? If possible I want
> to also avoid importing this from other servers, I am looking to see
> if there is a way to script it all.
> Is there a way to deploy the same database maintenance plan for all
> the SQL instances in a automated fashion? What will be the most
> efficient way to accomplish this?
> Any help in this regard will be greatly appreciated.
> Thanks
|||You may be able to generate a script for the plan (not sure about this
though) and then execute that script against each server. Seems that most
objects in SSMS can be scripted out.
I do agree with Andrew that you should consider not using maintenance plans
at all and do/control everything with your own scripts.
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"shub" <shubtech@.gmail.com> wrote in message
news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...
On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> Take a look at SQL Farms and see if it can help out.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
> "shub" <shubt...@.gmail.com> wrote in message
> news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>
>
>
> - Show quoted text -
Thank you so much for your response. Besides this product is there any
other option to deploy database maintenance plan across different
server in SQL 2005?
|||On Mar 25, 12:54Xpm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> I guess one could investigate to export the maint plan to a .dtsx file (a maint plan is an SSIS
> package after all). And use that dtsx file as base for multi-server deployment. Of course, one need
> to investigate how much customization of the dtsx file is needed. For instance, you don't want to
> deploy such file to another server if the old server name is in there somewhere.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> "TheSQLGuru" <kgbo...@.earthlink.net> wrote in messagenews:13uievj7t0rja8e@.corp.supernews.com...
>
>
>
>
>
>
> - Show quoted text -
FWIW - this does work and the only thing that needs to be changed is
the connection. The steps are:
1) Export to dtsx file
2) Open in BIDS
3) Modify the connection to the destination server
4) Import into the destination server
However, this does not import the schedules and can cause problems if
you import over an existing maintenance plan. Once the maintenance
plan has been imported, you still have to open the plan on the
destination server and modify the plan to schedule each sub-plan.
Personally, I have found that it really does not take any longer to
create a new maintenance plan manually than it does to export/modify/
import/update on each destination server.
Jeff
|||And everytime you do something manually you run the risk of making an error
or having some setting different on different servers inadvertently. A well
tested script can be configured to set everything right each time for each
server/DB it needs to act against.
Also, you can easily script job schedules too as well as check for existence
of existing job/maintenance plan prior to stomping on it. :-)
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Jeffrey Williams" <jeff.williams@.sharp.com> wrote in message
news:9b46cf7e-7d44-4473-acdc-458d33c7cb15@.e10g2000prf.googlegroups.com...
On Mar 25, 12:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> I guess one could investigate to export the maint plan to a .dtsx file (a
> maint plan is an SSIS
> package after all). And use that dtsx file as base for multi-server
> deployment. Of course, one need
> to investigate how much customization of the dtsx file is needed. For
> instance, you don't want to
> deploy such file to another server if the old server name is in there
> somewhere.
> --
> Tibor Karaszi, SQL Server
> MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> "TheSQLGuru" <kgbo...@.earthlink.net> wrote in
> messagenews:13uievj7t0rja8e@.corp.supernews.com...
>
>
>
>
>
>
> - Show quoted text -
FWIW - this does work and the only thing that needs to be changed is
the connection. The steps are:
1) Export to dtsx file
2) Open in BIDS
3) Modify the connection to the destination server
4) Import into the destination server
However, this does not import the schedules and can cause problems if
you import over an existing maintenance plan. Once the maintenance
plan has been imported, you still have to open the plan on the
destination server and modify the plan to schedule each sub-plan.
Personally, I have found that it really does not take any longer to
create a new maintenance plan manually than it does to export/modify/
import/update on each destination server.
Jeff
|||In addition you may not have the same DB's on each server so unless you
chose it to do all dbs it will fail as well.
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13uis61kv2i4n92@.corp.supernews.com...
> And everytime you do something manually you run the risk of making an
> error or having some setting different on different servers inadvertently.
> A well tested script can be configured to set everything right each time
> for each server/DB it needs to act against.
> Also, you can easily script job schedules too as well as check for
> existence of existing job/maintenance plan prior to stomping on it. :-)
>
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "Jeffrey Williams" <jeff.williams@.sharp.com> wrote in message
> news:9b46cf7e-7d44-4473-acdc-458d33c7cb15@.e10g2000prf.googlegroups.com...
> On Mar 25, 12:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> FWIW - this does work and the only thing that needs to be changed is
> the connection. The steps are:
> 1) Export to dtsx file
> 2) Open in BIDS
> 3) Modify the connection to the destination server
> 4) Import into the destination server
> However, this does not import the schedules and can cause problems if
> you import over an existing maintenance plan. Once the maintenance
> plan has been imported, you still have to open the plan on the
> destination server and modify the plan to schedule each sub-plan.
> Personally, I have found that it really does not take any longer to
> create a new maintenance plan manually than it does to export/modify/
> import/update on each destination server.
> Jeff
>

Deploying DB Maintenance plan in SQL 2005 across many different

I am in the process of depolying a database maintenance plan tasks for
several servers. I have designed one using the Databases maintenance
plan wizard but I want to be able to replicate the same maintenance
plan for all the SQL instances in our environment. I want to avoid to
manually create them for each and every instance? If possible I want
to also avoid importing this from other servers, I am looking to see
if there is a way to script it all.
Is there a way to deploy the same database maintenance plan for all
the SQL instances in a automated fashion? What will be the most
efficient way to accomplish this?
Any help in this regard will be greatly appreciated.
ThanksTake a look at SQL Farms and see if it can help out.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"shub" <shubtech@.gmail.com> wrote in message
news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>I am in the process of depolying a database maintenance plan tasks for
> several servers. I have designed one using the Databases maintenance
> plan wizard but I want to be able to replicate the same maintenance
> plan for all the SQL instances in our environment. I want to avoid to
> manually create them for each and every instance? If possible I want
> to also avoid importing this from other servers, I am looking to see
> if there is a way to script it all.
> Is there a way to deploy the same database maintenance plan for all
> the SQL instances in a automated fashion? What will be the most
> efficient way to accomplish this?
> Any help in this regard will be greatly appreciated.
> Thanks|||On Mar 24, 10:47=A0am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> Take a look at SQL Farms and see if it can help out.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
> "shub" <shubt...@.gmail.com> wrote in message
> news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>
> >I am in the process of depolying a database maintenance plan tasks for
> > several servers. I have designed one using the Databases maintenance
> > plan wizard but I want to be able to replicate the same maintenance
> > plan for all the SQL instances in our environment. =A0I want to avoid to=
> > manually create them for each and every instance? If possible I want
> > to also avoid importing this from other servers, I am looking to see
> > if there is a way to script it all.
> > Is there a way to deploy the same database maintenance plan for all
> > the SQL instances in a automated fashion? =A0What will be the most
> > efficient way to accomplish this?
> > Any help in this regard will be greatly appreciated.
> > Thanks- Hide quoted text -
> - Show quoted text -
Thank you so much for your response. Besides this product is there any
other option to deploy database maintenance plan across different
server in SQL 2005?|||That is one of the down falls of using the maintenance plans. I would create
your own scheduled jobs and custom maintenance sps so that you can script
these and do what you want with them.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"shub" <shubtech@.gmail.com> wrote in message
news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>I am in the process of depolying a database maintenance plan tasks for
> several servers. I have designed one using the Databases maintenance
> plan wizard but I want to be able to replicate the same maintenance
> plan for all the SQL instances in our environment. I want to avoid to
> manually create them for each and every instance? If possible I want
> to also avoid importing this from other servers, I am looking to see
> if there is a way to script it all.
> Is there a way to deploy the same database maintenance plan for all
> the SQL instances in a automated fashion? What will be the most
> efficient way to accomplish this?
> Any help in this regard will be greatly appreciated.
> Thanks|||You may be able to generate a script for the plan (not sure about this
though) and then execute that script against each server. Seems that most
objects in SSMS can be scripted out.
I do agree with Andrew that you should consider not using maintenance plans
at all and do/control everything with your own scripts.
--
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"shub" <shubtech@.gmail.com> wrote in message
news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...
On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> Take a look at SQL Farms and see if it can help out.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
> "shub" <shubt...@.gmail.com> wrote in message
> news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>
> >I am in the process of depolying a database maintenance plan tasks for
> > several servers. I have designed one using the Databases maintenance
> > plan wizard but I want to be able to replicate the same maintenance
> > plan for all the SQL instances in our environment. I want to avoid to
> > manually create them for each and every instance? If possible I want
> > to also avoid importing this from other servers, I am looking to see
> > if there is a way to script it all.
> > Is there a way to deploy the same database maintenance plan for all
> > the SQL instances in a automated fashion? What will be the most
> > efficient way to accomplish this?
> > Any help in this regard will be greatly appreciated.
> > Thanks- Hide quoted text -
> - Show quoted text -
Thank you so much for your response. Besides this product is there any
other option to deploy database maintenance plan across different
server in SQL 2005?|||I guess one could investigate to export the maint plan to a .dtsx file (a maint plan is an SSIS
package after all). And use that dtsx file as base for multi-server deployment. Of course, one need
to investigate how much customization of the dtsx file is needed. For instance, you don't want to
deploy such file to another server if the old server name is in there somewhere.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message news:13uievj7t0rja8e@.corp.supernews.com...
> You may be able to generate a script for the plan (not sure about this though) and then execute
> that script against each server. Seems that most objects in SSMS can be scripted out.
> I do agree with Andrew that you should consider not using maintenance plans at all and do/control
> everything with your own scripts.
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "shub" <shubtech@.gmail.com> wrote in message
> news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...
> On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
>> Take a look at SQL Farms and see if it can help out.
>> --
>> Kevin G. Boles
>> Indicium Resources, Inc.
>> SQL Server MVP
>> kgboles a earthlink dt net
>> "shub" <shubt...@.gmail.com> wrote in message
>> news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>>
>> >I am in the process of depolying a database maintenance plan tasks for
>> > several servers. I have designed one using the Databases maintenance
>> > plan wizard but I want to be able to replicate the same maintenance
>> > plan for all the SQL instances in our environment. I want to avoid to
>> > manually create them for each and every instance? If possible I want
>> > to also avoid importing this from other servers, I am looking to see
>> > if there is a way to script it all.
>> > Is there a way to deploy the same database maintenance plan for all
>> > the SQL instances in a automated fashion? What will be the most
>> > efficient way to accomplish this?
>> > Any help in this regard will be greatly appreciated.
>> > Thanks- Hide quoted text -
>> - Show quoted text -
> Thank you so much for your response. Besides this product is there any
> other option to deploy database maintenance plan across different
> server in SQL 2005?
>|||On Mar 25, 12:54=A0pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> I guess one could investigate to export the maint plan to a .dtsx file (a =maint plan is an SSIS
> package after all). And use that dtsx file as base for multi-server deploy=ment. Of course, one need
> to investigate how much customization of the dtsx file is needed. For inst=ance, you don't want to
> deploy such file to another server if the old server name is in there some=where.
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asph=
ttp://sqlblog.com/blogs/tibor_karaszi
>
> "TheSQLGuru" <kgbo...@.earthlink.net> wrote in messagenews:13uievj7t0rja8e@.=corp.supernews.com...
> > You may be able to generate a script for the plan (not sure about this t=hough) and then execute
> > that script against each server. =A0Seems that most objects in SSMS can =be scripted out.
> > I do agree with Andrew that you should consider not using maintenance pl=ans at all and do/control
> > everything with your own scripts.
> > --
> > Kevin G. Boles
> > Indicium Resources, Inc.
> > SQL Server MVP
> > kgboles a earthlink dt net
> > "shub" <shubt...@.gmail.com> wrote in message
> >news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...=
> > On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> >> Take a look at SQL Farms and see if it can help out.
> >> --
> >> Kevin G. Boles
> >> Indicium Resources, Inc.
> >> SQL Server MVP
> >> kgboles a earthlink dt net
> >> "shub" <shubt...@.gmail.com> wrote in message
> >>news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com..=.
> >> >I am in the process of depolying a database maintenance plan tasks for=
> >> > several servers. I have designed one using the Databases maintenance
> >> > plan wizard but I want to be able to replicate the same maintenance
> >> > plan for all the SQL instances in our environment. I want to avoid to=
> >> > manually create them for each and every instance? If possible I want
> >> > to also avoid importing this from other servers, I am looking to see
> >> > if there is a way to script it all.
> >> > Is there a way to deploy the same database maintenance plan for all
> >> > the SQL instances in a automated fashion? What will be the most
> >> > efficient way to accomplish this?
> >> > Any help in this regard will be greatly appreciated.
> >> > Thanks- Hide quoted text -
> >> - Show quoted text -
> > Thank you so much for your response. Besides this product is there any
> > other option to deploy database maintenance plan across different
> > server in SQL 2005... Hide quoted text -
> - Show quoted text -
FWIW - this does work and the only thing that needs to be changed is
the connection. The steps are:
1) Export to dtsx file
2) Open in BIDS
3) Modify the connection to the destination server
4) Import into the destination server
However, this does not import the schedules and can cause problems if
you import over an existing maintenance plan. Once the maintenance
plan has been imported, you still have to open the plan on the
destination server and modify the plan to schedule each sub-plan.
Personally, I have found that it really does not take any longer to
create a new maintenance plan manually than it does to export/modify/
import/update on each destination server.
Jeff|||And everytime you do something manually you run the risk of making an error
or having some setting different on different servers inadvertently. A well
tested script can be configured to set everything right each time for each
server/DB it needs to act against.
Also, you can easily script job schedules too as well as check for existence
of existing job/maintenance plan prior to stomping on it. :-)
Kevin G. Boles
Indicium Resources, Inc.
SQL Server MVP
kgboles a earthlink dt net
"Jeffrey Williams" <jeff.williams@.sharp.com> wrote in message
news:9b46cf7e-7d44-4473-acdc-458d33c7cb15@.e10g2000prf.googlegroups.com...
On Mar 25, 12:54 pm, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> I guess one could investigate to export the maint plan to a .dtsx file (a
> maint plan is an SSIS
> package after all). And use that dtsx file as base for multi-server
> deployment. Of course, one need
> to investigate how much customization of the dtsx file is needed. For
> instance, you don't want to
> deploy such file to another server if the old server name is in there
> somewhere.
> --
> Tibor Karaszi, SQL Server
> MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>
> "TheSQLGuru" <kgbo...@.earthlink.net> wrote in
> messagenews:13uievj7t0rja8e@.corp.supernews.com...
> > You may be able to generate a script for the plan (not sure about this
> > though) and then execute
> > that script against each server. Seems that most objects in SSMS can be
> > scripted out.
> > I do agree with Andrew that you should consider not using maintenance
> > plans at all and do/control
> > everything with your own scripts.
> > --
> > Kevin G. Boles
> > Indicium Resources, Inc.
> > SQL Server MVP
> > kgboles a earthlink dt net
> > "shub" <shubt...@.gmail.com> wrote in message
> >news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...
> > On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
> >> Take a look at SQL Farms and see if it can help out.
> >> --
> >> Kevin G. Boles
> >> Indicium Resources, Inc.
> >> SQL Server MVP
> >> kgboles a earthlink dt net
> >> "shub" <shubt...@.gmail.com> wrote in message
> >>news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
> >> >I am in the process of depolying a database maintenance plan tasks for
> >> > several servers. I have designed one using the Databases maintenance
> >> > plan wizard but I want to be able to replicate the same maintenance
> >> > plan for all the SQL instances in our environment. I want to avoid to
> >> > manually create them for each and every instance? If possible I want
> >> > to also avoid importing this from other servers, I am looking to see
> >> > if there is a way to script it all.
> >> > Is there a way to deploy the same database maintenance plan for all
> >> > the SQL instances in a automated fashion? What will be the most
> >> > efficient way to accomplish this?
> >> > Any help in this regard will be greatly appreciated.
> >> > Thanks- Hide quoted text -
> >> - Show quoted text -
> > Thank you so much for your response. Besides this product is there any
> > other option to deploy database maintenance plan across different
> > server in SQL 2005... Hide quoted text -
> - Show quoted text -
FWIW - this does work and the only thing that needs to be changed is
the connection. The steps are:
1) Export to dtsx file
2) Open in BIDS
3) Modify the connection to the destination server
4) Import into the destination server
However, this does not import the schedules and can cause problems if
you import over an existing maintenance plan. Once the maintenance
plan has been imported, you still have to open the plan on the
destination server and modify the plan to schedule each sub-plan.
Personally, I have found that it really does not take any longer to
create a new maintenance plan manually than it does to export/modify/
import/update on each destination server.
Jeff|||In addition you may not have the same DB's on each server so unless you
chose it to do all dbs it will fail as well.
--
Andrew J. Kelly SQL MVP
Solid Quality Mentors
"TheSQLGuru" <kgboles@.earthlink.net> wrote in message
news:13uis61kv2i4n92@.corp.supernews.com...
> And everytime you do something manually you run the risk of making an
> error or having some setting different on different servers inadvertently.
> A well tested script can be configured to set everything right each time
> for each server/DB it needs to act against.
> Also, you can easily script job schedules too as well as check for
> existence of existing job/maintenance plan prior to stomping on it. :-)
>
> --
> Kevin G. Boles
> Indicium Resources, Inc.
> SQL Server MVP
> kgboles a earthlink dt net
>
> "Jeffrey Williams" <jeff.williams@.sharp.com> wrote in message
> news:9b46cf7e-7d44-4473-acdc-458d33c7cb15@.e10g2000prf.googlegroups.com...
> On Mar 25, 12:54 pm, "Tibor Karaszi"
> <tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
>> I guess one could investigate to export the maint plan to a .dtsx file (a
>> maint plan is an SSIS
>> package after all). And use that dtsx file as base for multi-server
>> deployment. Of course, one need
>> to investigate how much customization of the dtsx file is needed. For
>> instance, you don't want to
>> deploy such file to another server if the old server name is in there
>> somewhere.
>> --
>> Tibor Karaszi, SQL Server
>> MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
>>
>> "TheSQLGuru" <kgbo...@.earthlink.net> wrote in
>> messagenews:13uievj7t0rja8e@.corp.supernews.com...
>> > You may be able to generate a script for the plan (not sure about this
>> > though) and then execute
>> > that script against each server. Seems that most objects in SSMS can be
>> > scripted out.
>> > I do agree with Andrew that you should consider not using maintenance
>> > plans at all and do/control
>> > everything with your own scripts.
>> > --
>> > Kevin G. Boles
>> > Indicium Resources, Inc.
>> > SQL Server MVP
>> > kgboles a earthlink dt net
>> > "shub" <shubt...@.gmail.com> wrote in message
>> >news:20611010-8c52-4718-982c-4f4400a0b6bc@.s12g2000prg.googlegroups.com...
>> > On Mar 24, 10:47 am, "TheSQLGuru" <kgbo...@.earthlink.net> wrote:
>> >> Take a look at SQL Farms and see if it can help out.
>> >> --
>> >> Kevin G. Boles
>> >> Indicium Resources, Inc.
>> >> SQL Server MVP
>> >> kgboles a earthlink dt net
>> >> "shub" <shubt...@.gmail.com> wrote in message
>> >>news:da1295e1-0f53-4b03-8a70-d3ca9903c812@.d21g2000prf.googlegroups.com...
>> >> >I am in the process of depolying a database maintenance plan tasks
>> >> >for
>> >> > several servers. I have designed one using the Databases maintenance
>> >> > plan wizard but I want to be able to replicate the same maintenance
>> >> > plan for all the SQL instances in our environment. I want to avoid
>> >> > to
>> >> > manually create them for each and every instance? If possible I want
>> >> > to also avoid importing this from other servers, I am looking to see
>> >> > if there is a way to script it all.
>> >> > Is there a way to deploy the same database maintenance plan for all
>> >> > the SQL instances in a automated fashion? What will be the most
>> >> > efficient way to accomplish this?
>> >> > Any help in this regard will be greatly appreciated.
>> >> > Thanks- Hide quoted text -
>> >> - Show quoted text -
>> > Thank you so much for your response. Besides this product is there any
>> > other option to deploy database maintenance plan across different
>> > server in SQL 2005... Hide quoted text -
>> - Show quoted text -
> FWIW - this does work and the only thing that needs to be changed is
> the connection. The steps are:
> 1) Export to dtsx file
> 2) Open in BIDS
> 3) Modify the connection to the destination server
> 4) Import into the destination server
> However, this does not import the schedules and can cause problems if
> you import over an existing maintenance plan. Once the maintenance
> plan has been imported, you still have to open the plan on the
> destination server and modify the plan to schedule each sub-plan.
> Personally, I have found that it really does not take any longer to
> create a new maintenance plan manually than it does to export/modify/
> import/update on each destination server.
> Jeff
>