dbTalk Databases Forums  

Delete DTS Package in code

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Delete DTS Package in code in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Adam Cain
 
Posts: n/a

Default Delete DTS Package in code - 12-09-2004 , 10:31 AM






I'm building a DTS Package on the fly saving the package and then actually
running it with a stored proc so i can run it the package asynchronously. I
don't want the DTS cluttering up the server so can I delete a package from
code. I thought about just saving the package overitself each time but there
are times where the same user may run the program multiple times at once on
the same machine so that likely wouldn't work...

Anyway if anyone can tell me how to delete a DTS package from VB I'd really
appreciate it. Shoot even a stored proc to delete it would work... thanks
Adam

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Delete DTS Package in code - 12-09-2004 , 01:41 PM






Then why no save your package to structured storage file?

In any event have you looked at BOL and the object model?

Start here

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\dtsprog.chm::/dtspmethjz_9l44.htm


--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Adam Cain" <AdamCain (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'm building a DTS Package on the fly saving the package and then actually
running it with a stored proc so i can run it the package asynchronously. I
don't want the DTS cluttering up the server so can I delete a package from
code. I thought about just saving the package overitself each time but there
are times where the same user may run the program multiple times at once on
the same machine so that likely wouldn't work...

Anyway if anyone can tell me how to delete a DTS package from VB I'd really
appreciate it. Shoot even a stored proc to delete it would work... thanks
Adam



Reply With Quote
  #3  
Old   
Adam Cain
 
Posts: n/a

Default Re: Delete DTS Package in code - 12-10-2004 , 07:33 AM



Sorry I'm kinda new to DTS. What is a structured storage file?Is that the
..dts file you can save a package to?

Anyhow the RemoveFromSQLServer should work. I had searched all over but my
mind was stuck on "Delete" so I nver thought to look for "Remove". Thanks for
the help.

"Allan Mitchell" wrote:

Quote:
Then why no save your package to structured storage file?

In any event have you looked at BOL and the object model?

Start here

mk:@MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\dtsprog.chm::/dtspmethjz_9l44.htm


--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - SQL Server 2005 Integration Services.
www.Konesans.com


"Adam Cain" <AdamCain (AT) discussions (DOT) microsoft.com> wrote

I'm building a DTS Package on the fly saving the package and then actually
running it with a stored proc so i can run it the package asynchronously. I
don't want the DTS cluttering up the server so can I delete a package from
code. I thought about just saving the package overitself each time but there
are times where the same user may run the program multiple times at once on
the same machine so that likely wouldn't work...

Anyway if anyone can tell me how to delete a DTS package from VB I'd really
appreciate it. Shoot even a stored proc to delete it would work... thanks
Adam




Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Delete DTS Package in code - 12-11-2004 , 06:18 AM



In message <13C94EAA-2F3B-46F2-AA10-173136CB3CFD (AT) microsoft (DOT) com>, Adam
Cain <AdamCain (AT) discussions (DOT) microsoft.com> writes
Quote:
Sorry I'm kinda new to DTS. What is a structured storage file?Is that the
.dts file you can save a package to?

That's the one.

You don't actually have to save a package to execute it, which may save
you deleting it afterwards.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #5  
Old   
Adam Cain
 
Posts: n/a

Default Re: Delete DTS Package in code - 12-14-2004 , 08:15 AM



Darren, you defintely got my attention. How can I run a package
asynchronously without saving it to run it through a stored procedure?

"Darren Green" wrote:

Quote:
In message <13C94EAA-2F3B-46F2-AA10-173136CB3CFD (AT) microsoft (DOT) com>, Adam
Cain <AdamCain (AT) discussions (DOT) microsoft.com> writes
Sorry I'm kinda new to DTS. What is a structured storage file?Is that the
.dts file you can save a package to?

That's the one.

You don't actually have to save a package to execute it, which may save
you deleting it afterwards.


--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #6  
Old   
Darren Green
 
Posts: n/a

Default Re: Delete DTS Package in code - 12-14-2004 , 11:19 AM



In message <5FF7D3BD-6A7F-4139-9A2C-45CADFAA88C7 (AT) microsoft (DOT) com>, Adam
Cain <AdamCain (AT) discussions (DOT) microsoft.com> writes
Quote:
Darren, you defintely got my attention. How can I run a package
asynchronously without saving it to run it through a stored procedure?

Ok, I missed the bit about the stored proc call. Sorry. That will be a
bit of a problem as you are breaking the create and execute across VB
and SQL. Stick with the save, execute and delete. Use unique names for
the packages each time they are created I guess would aoid the clash of
concurrent users.

Sorry about that, it's possible I'm sure, but I think the effort would
far outweigh any benefit as there are workarounds for your current
issues.

Cheers

Darren

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.