Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Friday, March 30, 2012

Relative path for child packages

hello again!, this time I'm trying to run a Master Package from the SQL Server Agent but I can't set relative paths to the connections for all the child packages that the master package contains.
It only finishes execution when I set absolute paths for all connections in the connection manager within the SSIS Project.

Is there any property in the SQL Server Agent or mayby a workaround to solve this?
Use absolute paths. Any reason you need relative paths?|||

Hi Santiago,

Unfortunately you cannot pass parameters to SQL Agent jobs. Workarounds usually involve:

1. Package configurations: set the path in a variable and use Expressions in the Package Connection Managers to dynamically apply the variable value.

2. Call the package dynamically: use a stored procedure to build a "dtexec" command-line and execute it via xp_cmdshell.

There are other ways to accomplish this as well. Personally, I recommend package configurations. I use xp_cmdshell less and less these days and when I do I enable it, do what I need to do, and disable it.

Hope this helps,

Andy

|||You can use a variable and expression-based connection strings if you need the paths to be dynamic at runtime. I usually store a root path in a variable, then use expressions to prefix that onto the name of the child package before calling it.|||

jwelch wrote:

You can use a variable and expression-based connection strings if you need the paths to be dynamic at runtime. I usually store a root path in a variable, then use expressions to prefix that onto the name of the child package before calling it.

Same here. This is (one of) the reason(s) that I always use the same folder structure on all of my projects.

Common folder structure

(http://blogs.conchango.com/jamiethomson/archive/2006/01/05/SSIS_3A00_-Common-folder-structure.aspx)

I also include the root path variable in my package template.

SSIS: Package Template

(http://blogs.conchango.com/jamiethomson/archive/2007/03/11/SSIS_3A00_-Package-Template.aspx)

-Jamie

Tuesday, March 20, 2012

reinitialization of subscriptions

If I have a subscription to a publication (transactional)
and the Distribution Agent tells me I need to
reinitialize.
What are the steps to do this?
Do I need to delete all the data on the subscriber? If
so, is there a way around this? If not, what is the best
practice of accomplishing this?
What if there are changes made at the subscriber do I
loose them if the subscription is reinitializatized?
Thanks...
Jimmy,
reinitialize means apply a new snapshot, so, you'll need to run the snapshot
agent first then run the distribution agent. When you say will it delete all
the data on the subscriber, I'm not sure why this is a concern. For
transactional replication, the subscriber data is treated as RO data. If
however someone has edited the data, then you could use binary checksums to
see what has changed and then do the same changes on the publisher. If the
subscriber is using updatable transactional replication then the changes are
already on the publisher. If you're using a queue, then be sure to run the
queue reader to send up the changes.
HTH,
Paul Ibison
|||expand your publishing database, right click on your publication, select
properties, click on your subscriber tab, highlight your subscriber, and
click the reinitialize button.
It will delete all the data of the replication objects and their schemas and
then replace them.
"Jimmy" <anonymous@.discussions.microsoft.com> wrote in message
news:9dc801c43447$43f3a5a0$a601280a@.phx.gbl...
> If I have a subscription to a publication (transactional)
> and the Distribution Agent tells me I need to
> reinitialize.
> What are the steps to do this?
> Do I need to delete all the data on the subscriber? If
> so, is there a way around this? If not, what is the best
> practice of accomplishing this?
> What if there are changes made at the subscriber do I
> loose them if the subscription is reinitializatized?
> Thanks...
|||Paul,
You said...
then you could use binary checksums to see what has
changed and then do the same changes on the publisher
How?
Larry...

>--Original Message--
>Jimmy,
>reinitialize means apply a new snapshot, so, you'll need
to run the snapshot
>agent first then run the distribution agent. When you
say will it delete all
>the data on the subscriber, I'm not sure why this is a
concern. For
>transactional replication, the subscriber data is
treated as RO data. If
>however someone has edited the data, then you could use
binary checksums to
>see what has changed and then do the same changes on the
publisher. If the
>subscriber is using updatable transactional replication
then the changes are
>already on the publisher. If you're using a queue, then
be sure to run the
>queue reader to send up the changes.
>HTH,
>Paul Ibison
>
>.
>
|||Larry,
there's a good explanation of BINARY_CHECKSUM in books online (BOL). If you
have any problems with the explanation, please post back.
Regards,
Paul Ibison

Wednesday, March 7, 2012

Registry Permissions for on demand pull subscription

To configure an on-demand pull subscription, the domain user account used by
the SQL Server Agent service must have full control permissions on the
registry key: HKLM\Software\Microsoft\Microsoft SQL
Server\80\Replication\Subscriptions. When I attempt to use the registry
editor to configure the permissions, the subscriptions portion of the key is
not present. I am running Win 2000 Server and SQL Server 2000. I am logged on
as an administrator, and I have sucessfully created a merge publication and a
push subcription. Any thoughts on what may be my problem? What SQL process
creates the subscriptions entry in the registery?
Tom McAvoy, MCP
The subscriptions portion of the key can be filled in by using reg files,
but the preferred way of doing it is having Windows Synchronization Manager,
or the ActiveX Controls make these changes.
When you create your push (only through the procs), or you pull (procs or
wizards), ensure you select on demand pull. This will register your
subscription and make the necessary registry entries.
If you did not do this, you will have to configure your pull subcription
withing WSM.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Tom McAvoy" <TomMcAvoy@.discussions.microsoft.com> wrote in message
news:7E02406B-F211-49F4-B1FD-41C2B6127F4A@.microsoft.com...
> To configure an on-demand pull subscription, the domain user account used
by
> the SQL Server Agent service must have full control permissions on the
> registry key: HKLM\Software\Microsoft\Microsoft SQL
> Server\80\Replication\Subscriptions. When I attempt to use the registry
> editor to configure the permissions, the subscriptions portion of the key
is
> not present. I am running Win 2000 Server and SQL Server 2000. I am logged
on
> as an administrator, and I have sucessfully created a merge publication
and a
> push subcription. Any thoughts on what may be my problem? What SQL process
> creates the subscriptions entry in the registery?
> --
> Tom McAvoy, MCP
|||Hillary, thank you for the response. I am unable to create the 'on-demand
pull' subscription due to the lack of permissions on the registry key. I
receive an 'access denied error'. I don't have the exact error info
avaialble right now. I'll review the problem on Monday and post more complete
error info.
"Hilary Cotter" wrote:

> The subscriptions portion of the key can be filled in by using reg files,
> but the preferred way of doing it is having Windows Synchronization Manager,
> or the ActiveX Controls make these changes.
> When you create your push (only through the procs), or you pull (procs or
> wizards), ensure you select on demand pull. This will register your
> subscription and make the necessary registry entries.
> If you did not do this, you will have to configure your pull subcription
> withing WSM.
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Tom McAvoy" <TomMcAvoy@.discussions.microsoft.com> wrote in message
> news:7E02406B-F211-49F4-B1FD-41C2B6127F4A@.microsoft.com...
> by
> is
> on
> and a
>
>
|||It seems that you need to be a power user or admin on the machine you are
trying to pull the subscription to.
Also the account which is doing the pulling should be in the PAL.
"Tom McAvoy" <TomMcAvoy@.discussions.microsoft.com> wrote in message
news:8518A10B-BFB3-4C4D-A6E4-8A605F129C22@.microsoft.com...
> Hillary, thank you for the response. I am unable to create the 'on-demand
> pull' subscription due to the lack of permissions on the registry key. I
> receive an 'access denied error'. I don't have the exact error info
> avaialble right now. I'll review the problem on Monday and post more
complete[vbcol=seagreen]
> error info.
> "Hilary Cotter" wrote:
files,[vbcol=seagreen]
Manager,[vbcol=seagreen]
or[vbcol=seagreen]
used[vbcol=seagreen]
registry[vbcol=seagreen]
key[vbcol=seagreen]
logged[vbcol=seagreen]
publication[vbcol=seagreen]
process[vbcol=seagreen]