Showing posts with label task. Show all posts
Showing posts with label task. Show all posts

Thursday, March 22, 2012

Create a hidden resource

Good day
I am using the CreateResource method (C#) to upload a jpg file to a report
server. I have completed this task, however I am manually navigating to the
Report Manager, going to the Properties section of the jpg file and checking
the "Hide in list view" checkbox.
I am sure this can be done programmatically, and I suspect it has to do with
this last parameter of the CreateResource method? Please could someone help
me.
ThanksI have managed to complete this, using the SetProperties method. The actual
property name I was looking for was "Hidden" - how simple :) I just set this
to "True"
"Imrahn" wrote:
> Good day
> I am using the CreateResource method (C#) to upload a jpg file to a report
> server. I have completed this task, however I am manually navigating to the
> Report Manager, going to the Properties section of the jpg file and checking
> the "Hide in list view" checkbox.
> I am sure this can be done programmatically, and I suspect it has to do with
> this last parameter of the CreateResource method? Please could someone help
> me.
> Thanks

Create a delay between FTP tasks, or?

Hi,

I have a package that will be using an FTP task to send a file (file1) to an ftp site.

Once the file (file1) is received at the ftp site, a corresponding file (file2) will be placed in the ftp directory, and then I will need to ftp the corresponding file (file2) back.

However, there will be a time delay between the time that file1 is received and file2 is put in the ftp directory. Maybe 5 to 30 minutes.

What is the best way to handle this scenario? I want to ftp file2 back as soon as it's available. However, I don't know when that is, and so I was wondering if there is a way to dynamically check for the availability of the file, so that I don't have to "hard code" a wait time into my process.

Thanks!

Setup a for loop to evaluate a variable such that as long as the variable is set to 0 the loop will happen. Then, using a script task, you can check to see if the file exists, and if not wait 5 seconds, or something like that. If it does, then set the for loop control variable to 1, which will allow it to exit and then execute another FTP task.|||Yes, that sounds reasonable. Do you have a sample of how one would write a script task to check for the availability of a file on a remote ftp site? I guess I could just use basic ftp commands, yes?|||This might help get your started. Does some slightly different stuff, but connectivity wise, it may get you going in the right direction.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1074276&SiteID=1|||

Hi,

Another suggestion, you can use the file system task editor with set attributes, if it is successful your file is back. You can loop through this, maybe use a thread.sleep in a script component.

Larry

|||

LarryETL wrote:

Hi,

Another suggestion, you can use the file system task editor with set attributes, if it is successful your file is back. You can loop through this, maybe use a thread.sleep in a script component.

Larry

He needs to check a remote FTP site though.

Tuesday, March 20, 2012

Create a Condition for a DTS Task

I simply want an email to go out if any records in a table exist, else no email. I have other steps completed in this DTS job but this is the last step. Any ideas?
ddaveNever mind. I decided it be best to drop it into a stored procedure.

ddave

Create 1 connection to execute multiple Packages

I want to create 1 connection because I have to execute multiple packages (2005). But when I go into the execute package task editor, the dropdown only ever has "New Connection". Is this a bug?Connections are package local. One package cannot see another package's connection managers.
We, unfortunately, don't have the notion of a file data source which it sounds like you're looking for. Basically, a way to create a connection that you can share across multiple packages.
You'll need to create a new connection per package.
K|||Kirk, not sure if I explained correctly. I'm trying to have 1 master package that executes child packages all on the same "ETL server". So I want 1 connection to be the "ETL Server" such that it can be changed in 1 place (actually, I would just have a runtime setting change it based on a config) when moving from DEV (each developer would have their own instance) to QA to PROD.

The reason I want many packages is so that multiple ETL developers can work on a component and build it without having to wait. Additionally, if everything was in 1 package, it would be huge.

Is the only way to accomplish this without having to change each package's sql server location is to reference it by its file location?|||OK, a few questions to clarify.

What kind of connection do you want the one connection to be SQL, file?
You have one package that you want to call multiple subpackages?
You want the subpackages to use the one connection?
I'm not sure what you mean by "1 connection to be the 'ETL Server' "

"Is the only way to accomplish this without having to change each package's sql server location is to reference it by its file location?"
I don't understand why you need to change the package's sql server location. Which package's SQL Server location? The parent package or the sub-packages?

I think what's confusing me here is that your description has a lot of moving parts. Can you simplify the problem into two or three root issues. I have a simple mind and can't deal with all the complexity. :)

|||Let me offer a scenario and you can tell me how it doesn't meet your needs.

You can create a parent package. It can call all the other sub-packages. When the subpackages execute, the parent packages connection is available to them. However, not at design time. I think this is the issue you're having. The sub-package doesn't have areference to the parent package at design time, so it doesn't have the connections either.

What I'd suggest is that you create a Data source per machine and have all the connections reference it. You'll still need to create a connection manager in each package, but they will all reference the same data source. Moving to different machines is no problem because you can have a "machine resident" data source file that properly points to your "ETL Server".

Is this what you're after?|||see responses below, thanks for taking the time to respond.

Q. What kind of connection do you want the one connection to be SQL, file?
A. The connection of the SSIS server where the subpackages reside.

Q. You have one package that you want to call multiple subpackages?
A. YES

Q. You want the subpackages to use the one connection?
A. YES

Q. I'm not sure what you mean by "1 connection to be the 'ETL Server' "
A. If I store all the subpackages on SQL Server, I'll bound to have different servers for different environments, etc.

Q.I don't understand why you need to change the package's sql server location. Which package's SQL Server location? The parent package or the sub-packages?
A. sub-packages

I'm not after the connections inside the subpackage from the parent packaeg, nor the connections in the parent package from the subpackage.

What I am looking for is to create 1 connection and tie it to where the subpackages are stored since it needs to be dynamic without having to spin through every execute package task in the master package and change the sql server it resides on at runtime.

Alternatively, I could create a new connection for every execute child package in my master package all pointing to the same SQL Server that is storing them, but its extremely redundant and would only be useful if I'm pointing to (LOCAL) and the user and password never changes.

Why can't the EXECUTE PACKAGE task just use one of the connections available in the "connections managers" collection? I thought that was the reason for the "connection manager" abstraction layer, so that a physical connection can be changed in one place, and all logical connections are automatically redirected?

Any chance of implementing this? Alternatively, implementing a FOR EACH connection enumerator (although, this would be hokey)?

Followup question would be this: If I'm executing a package from another package, what is the performance difference (if any) of executing a package in general stored in the file system VS. stored in sql server? I'm assuming that if its not stored in sql server, it needs to be brought in from the file system and compiled on its 1st use?

My goal is to create an ETL where multiple developers can work on different components at the same time. The easiest way to do this would be to create 1 package per table. A master package would call all the child packages, but the master package needs to know which ETL server all the child packages are stored in, which changes from environment to environment.
|||

"Why can't the EXECUTE PACKAGE task just use one of the connections available in the "connections managers" collection?"
It can, If all your execute package tasks are in the same package, yes, they can all use the same connection manager. Is this not working for you?

"what is the performance difference (if any) of executing a package in general stored in the file system VS. stored in sql server"
No performance difference between the two storage methods once loaded. Packages aren't compiled. They're read into the object model.

"The easiest way to do this would be to create 1 package per table. "
Really? Why is this easiest. Why limit it to one package per table. Why not just have developers develop package files and check them into sourcesafe? Then when they're done developing them, deploy to SQL Server? Not sure I follow this logic.

Please keep the threads cogent by only asking only one question per thread.

K

|||Hi,
I'm coming into this late and I think I may be misunderstanding it all but let me have a punt anyway.

You have 1 master package which is intended to call multiple child packages.
You want 1 connection manager in the master package to be used to call all child packages.
You want to cycle through a list of all the child packages and execute them using 1 Execute Package Task
If that is all correct then I think what you want to do is possible using property expressions.

Have I understood correctly?

-Jamie|||"Why can't the EXECUTE PACKAGE task just use one of the connections available in the "connections managers" collection?"
It can, If all your execute package tasks are in the same package, yes, they can all use the same connection manager. Is this not working for you?

Whew, thats all i need, maybe its a bug - using June CTP. I create a new execute package task and then create a new connection for it. Then I create a 2nd execute package task, and click on the connection dropdown, but all that is available is New Connection.

|||

Ah! You're using SQL Connections. Dah!
Yes, this is a bug!
Thanks, great find. Please file a bug.
K

Saturday, February 25, 2012

Cpu count in the Profiler and Task Manager

Hello Group,
does anyone know if there is a relationship between the CPU count that is
displayed in the SQL Profiler and the Task Manager? I have a trace running
to show when a long insert takes places and the CPU column displays "16".
The same moment I have the Task Manager open and I am looking at the
SQLSERV.exe it displayes "40".
I thought that the numbers would be the same.
Rich
Rich,
I think you're comparing CPU usage numbers for an individual SPID versus the
entire SQL Server application.
HTH
Jerry
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
> Hello Group,
> does anyone know if there is a relationship between the CPU count that is
> displayed in the SQL Profiler and the Task Manager? I have a trace
> running
> to show when a long insert takes places and the CPU column displays "16".
> The same moment I have the Task Manager open and I am looking at the
> SQLSERV.exe it displayes "40".
> I thought that the numbers would be the same.
> Rich
|||Hello Jerry,
hmmmm, if that is the case, seems like I could add up all of the SPID and it
would equal the total?
Rich
"Jerry Spivey" wrote:

> Rich,
> I think you're comparing CPU usage numbers for an individual SPID versus the
> entire SQL Server application.
> HTH
> Jerry
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
>
>

Cpu count in the Profiler and Task Manager

Hello Group,
does anyone know if there is a relationship between the CPU count that is
displayed in the SQL Profiler and the Task Manager? I have a trace running
to show when a long insert takes places and the CPU column displays "16".
The same moment I have the Task Manager open and I am looking at the
SQLSERV.exe it displayes "40".
I thought that the numbers would be the same.
RichRich,
I think you're comparing CPU usage numbers for an individual SPID versus the
entire SQL Server application.
HTH
Jerry
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
> Hello Group,
> does anyone know if there is a relationship between the CPU count that is
> displayed in the SQL Profiler and the Task Manager? I have a trace
> running
> to show when a long insert takes places and the CPU column displays "16".
> The same moment I have the Task Manager open and I am looking at the
> SQLSERV.exe it displayes "40".
> I thought that the numbers would be the same.
> Rich|||Hello Jerry,
hmmmm, if that is the case, seems like I could add up all of the SPID and it
would equal the total?
Rich
"Jerry Spivey" wrote:

> Rich,
> I think you're comparing CPU usage numbers for an individual SPID versus t
he
> entire SQL Server application.
> HTH
> Jerry
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
>
>

Cpu count in the Profiler and Task Manager

Hello Group,
does anyone know if there is a relationship between the CPU count that is
displayed in the SQL Profiler and the Task Manager? I have a trace running
to show when a long insert takes places and the CPU column displays "16".
The same moment I have the Task Manager open and I am looking at the
SQLSERV.exe it displayes "40".
I thought that the numbers would be the same.
RichRich,
I think you're comparing CPU usage numbers for an individual SPID versus the
entire SQL Server application.
HTH
Jerry
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
> Hello Group,
> does anyone know if there is a relationship between the CPU count that is
> displayed in the SQL Profiler and the Task Manager? I have a trace
> running
> to show when a long insert takes places and the CPU column displays "16".
> The same moment I have the Task Manager open and I am looking at the
> SQLSERV.exe it displayes "40".
> I thought that the numbers would be the same.
> Rich|||Hello Jerry,
hmmmm, if that is the case, seems like I could add up all of the SPID and it
would equal the total?
Rich
"Jerry Spivey" wrote:
> Rich,
> I think you're comparing CPU usage numbers for an individual SPID versus the
> entire SQL Server application.
> HTH
> Jerry
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:DEF40479-CBE6-4F6D-A668-641BFEEE8586@.microsoft.com...
> > Hello Group,
> >
> > does anyone know if there is a relationship between the CPU count that is
> > displayed in the SQL Profiler and the Task Manager? I have a trace
> > running
> > to show when a long insert takes places and the CPU column displays "16".
> > The same moment I have the Task Manager open and I am looking at the
> > SQLSERV.exe it displayes "40".
> >
> > I thought that the numbers would be the same.
> >
> > Rich
>
>