Showing posts with label folder. Show all posts
Showing posts with label folder. Show all posts

Monday, March 26, 2012

How to determine package's executing folder?

I should have written this down when I came across it -- but I recently saw an example of how to determine a package's currently-executing folder. Can anyone help?

Thanks!

- Mike

Can you elaborate on what you mean by "the current executing folder"?

-Jamie

|||

Jamie Thomson wrote:

Can you elaborate on what you mean by "the current executing folder"?

-Jamie

Thanks, Jamie -- sure, the folder where the DTSX resides as it executes.

Here's the situation -- the DBAs want to put all the packages I've prepared into a single folder.

The "main" package calls each of 42 "sub-packages", one after another. I'm planning to use the
Execute Package task for each of the 42, and set it to "File system" to reference each of the 42.

The Connection property of the Execute Package task wants the path to the DTSX file the Execute Package
task runs, and I'm not sure how to set this at runtime. Because all the packages will live in the same arbitrary
folder, I hoped I might be able to use an expression or something to set the Connection property properly.

Thanks for asking!

- Mike

|||

mike.groh wrote:

Jamie Thomson wrote:

Can you elaborate on what you mean by "the current executing folder"?

-Jamie

Thanks, Jamie -- sure, the folder where the DTSX resides as it executes.

Here's the situation -- the DBAs want to put all the packages I've prepared into a single folder.

The "main" package calls each of 42 "sub-packages", one after another. I'm planning to use the
Execute Package task for each of the 42, and set it to "File system" to reference each of the 42.

The Connection property of the Execute Package task wants the path to the DTSX file the Execute Package
task runs, and I'm not sure how to set this at runtime. Because all the packages will live in the same arbitrary
folder, I hoped I might be able to use an expression or something to set the Connection property properly.

Thanks for asking!

- Mike

Right. Well as far as I know theres no way for the package to discover where it "lives". The way I solve this is for each package to have a variable called RootFolder which gets set by an indirect configuration. I've talked about it on my blog quite a bit:

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

Indirect configurations ROCK!
(http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2342.aspx)

Indirect configurations gotcha
http://blogs.conchango.com/jamiethomson/archive/2005/10/31/2336.aspx

-Jamie

|||

Thanks! I'll check it out in your blog.

- Mike

Friday, March 23, 2012

How to determine if SQl Server is installed

What would the best way be to programmatically determine if SQL Server is
installed?
Looking in a specific folder on the C: drive would not be useful, since it
might be installed in a non-standard location. And scanning all available
hard disks is not very desirable.
The best solution would be if there's a registry key that gives me the
location.
Thanks,
PeterWhat type of application do you plan to use to do this? VB? Etc. Your best
bet would be to look for the SQL Service.
"jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
news:CC3DE372-56C7-45B8-932B-C6485C54F759@.microsoft.com...
> What would the best way be to programmatically determine if SQL Server is
> installed?
> Looking in a specific folder on the C: drive would not be useful, since it
> might be installed in a non-standard location. And scanning all available
> hard disks is not very desirable.
> The best solution would be if there's a registry key that gives me the
> location.
> Thanks,
> Peter
>|||> The best solution would be if there's a registry key that gives me the
> location.
What location are you referring to?
The reg key for a default instance is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer
And for named instances:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Mi
crosoft SQL Server
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"jpstewart" <jpstewart@.discussions.microsoft.com> wrote in message
news:CC3DE372-56C7-45B8-932B-C6485C54F759@.microsoft.com...
> What would the best way be to programmatically determine if SQL Server is
> installed?
> Looking in a specific folder on the C: drive would not be useful, since it
> might be installed in a non-standard location. And scanning all available
> hard disks is not very desirable.
> The best solution would be if there's a registry key that gives me the
> location.
> Thanks,
> Peter
>

Monday, March 12, 2012

how to deploy the reports to their own folders?

here is what i did, from either Report Manager or SQL Server Management
Studio i created a folder, then i move the reports to this folder, but
from Microsoft Visual Studio, as long as i deploy the project, it still
save my moved reports outside of the folder i created. i wonder how do
i let the system deploy the projects and still save inside the folder i
created. thanks.Use the project properties of the report project to specify the folder you
want the reports and data sources to go to. If you created it in "/My
Reports That Are Cool" then you specify the same folder name in the report
project properties.
-Tim
"Wang Xiaoning" <wang_xiaoning@.hotmail.com> wrote in message
news:1148590710.476371.266730@.g10g2000cwb.googlegroups.com...
> here is what i did, from either Report Manager or SQL Server Management
> Studio i created a folder, then i move the reports to this folder, but
> from Microsoft Visual Studio, as long as i deploy the project, it still
> save my moved reports outside of the folder i created. i wonder how do
> i let the system deploy the projects and still save inside the folder i
> created. thanks.
>|||Tim, i want to group the reports, saying, sales report go to sales
folder, finance report got o finance, then for end user, as long as
they see local/reports, they will know how to navigate to his own
folders and reports.|||do you mean i have to create tow projects(one for sales, one for
fiance)?

Friday, March 9, 2012

How to deploy a report in Reporting Services without using VS 2005?

When I try to put a new report in existing folder there's no problem,
but now i have fresh installed Reporting Services and no Visual Studio
2005. How do i open a new folder?Joko ugar wrote:
> When I try to put a new report in existing folder there's no problem,
> but now i have fresh installed Reporting Services and no Visual Studio
> 2005. How do i open a new folder?

Please ignore this question :)