Showing posts with label dts. Show all posts
Showing posts with label dts. Show all posts

Friday, March 30, 2012

Running a vb.net exe from a dts

I'm trying to run a VB.NET exe from a dts.
This works when I run the DTS manually but just hangs when I schedule the DTS.
Has anyone seen this before ?Many times when you can run a DTS package manually, but not thru a scheduled job, it boills down to one of two things. Either you are running it from your machine instead of the server, or you have permissions that SQL Agent does not.

Physically logon to the SQL Server (not just open Enterprise Manager) and try to run your package ... if it fails, you were referencing files on your local box and not the server.

If it succeeds, then you need to look at the permissions of the service logon running SQL Agent verses your permissions.|||Thanks for the reply.
The DBA stated that the following error was found on the db server:

"Unable to Locate DLL - The Dynamic Link Library mscoree.dll could not be found in the specified path"

He is currently installing the .net framework on the sequel server.

Do you think this will do the job ?|||After installing the .net framework on the sequel server, I re run the dts and got the following message from the event viewer:

Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 0
Date: 22/05/2007
Time: 14:54:35
User: N/A
Computer: SQLXXXXX
Description:
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .NET Runtime version 1.1.4322.573- FraudDailyImport.exe - Common Language Runtime Debugging Services: Application has generated an exception that could not be handled.

Process id=0x1224 (4644), Thread id=0xe64 (3684).

Click OK to terminate the application.
Click CANCEL to debug the application..[/B]

Anybody got any ideas ?

Thanks in advance.sql

Wednesday, March 28, 2012

Running a Script in DTS

I'm new to DTS.
The task that I want to do is that I want to run a SQL Script from DTS. I know that there is Execute SQL Task for the same purpose.

But my problem is that the Script that i have to run will be in a file and I have to first read the file in DTS.then execute the contents of the file.

The script file may contain :
create database SOMEDB

create table Table1 ( Col1 varchar(10), col2 int)

I tried to use the DTS file handling but when i try to create a FileSystemObject it gives me the error that it cannot create FileSystemObject. And even if i am able to read the File using the FileSystemObject how would I run what I have read.

Can you help me out.

If this is a DTS question (which I think it is) then you are in the wrong place. Hop over to microsoft.public.sqlserver.dts

This is an SSIS forum. SSIS is the successor to DTS.

If this is a question about SSIS then what you want can easily be achieved using the Execute SQL Task which is able to take the statement/script that is going to execute from a file. Just change the SQLSourceType property to "File connection".

-Jamie

running a query within a DTs package

IF a run a query from within a DTS package will I have to use complete instructions, i.e. will I have to include in the query the name of the table that i am importing from or will the DTS package assume this?
thanks!Are you referring to performing a sql or transact/sql statement from within an execute sql task?

If so, despite you establishing a connection with one or more servers/dbs (transform data task or not) you should have to specify the table you are referencing... when you are in the execute sql task properties (ie when you double click) you need to specify which server connection you are using in order to reference that specific table. There is a drop down box in the task's properties window called existing connection... pick the connection which references the server/db that contains the table which you will be performing a query on... You don't want to perform an update statement on tblcustomer (located in db1) and not specify the correct connection in which to find it!

I hope that is what you were asking for if not, give a little shout back with a little more detail and we'll see what we can do.sql

Monday, March 26, 2012

Running a DTS with parameters

Hi
Does anyone know if there is a possibility to run a DTS with parameters ?
David GreenbergDavid Greenberg wrote:

Quote:

Originally Posted by

Hi
Does anyone know if there is a possibility to run a DTS with parameters ?
David Greenberg


Yes. Usually parameters are passed via global variables when the
package is executed. For example using the dtsrun utility from the
command line, or from an Execute Package task or using the COM Package
object.

Some examples at:
http://www.sqldts.com/default.aspx?104
--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--

Running a DTS PKG from a DTS PKG

Any one have an idea how to run a dts pkg from a dts pkg. I have tired the following:
use msdb
EXEC sp_start_job @.job_name = 'PITA XLS OUTPUT'
and get the error that the job does not exhist.
any ideas?
JimOriginally posted by JDionne
Any one have an idea how to run a dts pkg from a dts pkg. I have tired the following:
use msdb
EXEC sp_start_job @.job_name = 'PITA XLS OUTPUT'

and get the error that the job does not exhist.

any ideas?
Jim

HEHE my bad u cant run a dts pkg with the run job sp :)
thanx anyways
jim

Running a DTS Packing in a Stored Proc

Does anyone know how to run a DTS package in a stored procedure?
Also, what security rights does one have to have to run the DTS package in a
stored proc?
Thanks,
Yosh>> Does anyone know how to run a DTS package in a stored procedure?
Check out the command line utility DTSRUN in SQL Server Books Online. You
should be able to call this utility using xp_cmdshell procedure.
Anith|||Use xp_cmdshell to access the DTS run utility from a stored proc. I am
pretty sure the only security rights needed is to be able to execute the
stored procedure.
Derek Davis
ddavis76@.gmail.com
"Yosh" <yoshi@.nospam.com> wrote in message
news:uh%23lU4KuFHA.2072@.TK2MSFTNGP14.phx.gbl...
> Does anyone know how to run a DTS package in a stored procedure?
> Also, what security rights does one have to have to run the DTS package in
> a stored proc?
> Thanks,
> Yosh
>|||no need for peculiarities of xp_cmdshell...this works:
EXEC sp_run_DTSPackage 0, 'DTSName', @.sql_error_code out
IF (@.sql_error_code <> 0)
begin
select @.text = 'Error -60: Execution of DTS Package DTSName failed - ERROR '
+ CONVERT(VARCHAR, @.sql_error_code)
select @.result = -60
GOTO ERROR_POINT
end
where sp_run_DTSPackage is as follows:
CREATE PROCEDURE sp_run_DTSPackage (
@.o_run_id smallint,
@.o_pkg_desc varchar(50),
@.error_code int output )
AS
-- Script: sp_run_DTSPackage.sql
-- Date: October 2004
-- Author: Marc McGuckian
--
-- Description: Use OLE Automatiopn to load and execute the DTS package
@.o_pkg_desc
--
--
-- Return Values: 0 - SUCCESS
-- 1 - DATABASE ERROR
-- 11 - Failed to create an instance of the DTS.Package OLE object
-- 12 - Failed to load package
-- 13 - Failed to set/get DTS Package variable
-- 14 - Failed to obtain system parameter value
-- 15 - Execution of DTS Package Failed
-- 16 - Failed to destroy instance of the DTS.Package OLE object
-- 20 - Package Step Failed
--
--
-- Routines Called: sp_OACreate
-- sp_OAMethod
-- sp_OASetProperty
-- sp_OAGetProperty
-- sp_OADestroy
-- sp_OAGetErrorInfo
--
-- Tables Used:
--
-- OBJECTS Created:
-- TABLES:
-- STORED PROCS:
-- TEMP TABLES:
--
-- GRANTS EXECUTE TO PUBLIC
--
-- Modification History:
--
========================================
====================================
====
-- Name Date Description
--
----
--
--
--
========================================
====================================
====
BEGIN
DECLARE @.hres int, -- HRESULT returned by OLE
method call
@.pkg int, -- Package Object
@.errsrc varchar(255), -- DTS Package Error Source
@.errdesc varchar(255), -- DTS Package Error
Description
@.prop int, -- Package Property
@.o_pkg_prop_desc varchar(150), -- Package Property Name
@.o_pkg_prop_value varchar(150), -- Package Property Value
@.o_pkg_prop_order tinyint,
@.prop_to_set char(1),
@.dtsaccess varchar(50),
@.o_syslog_desc varchar(150) -- Message to be logged to
system log
SELECT @.error_code = 0, @.prop_to_set = 'Y',
@.o_pkg_prop_order = 0, @.dtsaccess = ''
UPDATE ot_lu_dts_properties
SET o_pkg_prop_value = o_param_value
FROM ot_lu_dts_properties dts,
ot_lu_system_parameter sys
WHERE dts.o_param_code = sys.o_param_code
SELECT @.error_code = @.@.ERROR
IF (@.error_code <> 0)
BEGIN
SELECT @.o_syslog_desc = 'Failed to update DTS properties
[ot_lu_dts_properties] - ERROR : ' + CONVERT(VARCHAR, @.error_code)
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
RETURN @.error_code
END
EXEC sp_run_DTS @.dtsaccess out
--Creates an instance of the DTS.Package OLE object
EXEC @.hres = sp_OACreate 'DTS.Package', @.pkg out
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to create an instance of the
DTS.Package OLE object'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 11
RETURN 11
END
--Load DTSLoadStaging package
EXEC @.hres = sp_OAMethod @.pkg, 'LoadFromSQLServer', null, '(local)',
@.PackageName = @.o_pkg_desc, @.PackagePassword = @.dtsaccess, @.Flags = 256
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to load package'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 12
RETURN 12
END
-- Set all DTS package properties
WHILE (@.prop_to_set = 'Y')
BEGIN
-- Find the next property to set
SELECT @.prop_to_set = 'N' -- Assume no more properties to set
SELECT @.prop_to_set = 'Y',
@.o_pkg_prop_desc = pro.o_pkg_prop_desc,
@.o_pkg_prop_value = pro.o_pkg_prop_value,
@.o_pkg_prop_order = pkp.o_pkg_prop_order
FROM ot_lu_dts_package pkg,
ot_lu_dts_properties pro,
ot_lu_dts_package_properties pkp
WHERE pkg.o_pkg_desc = @.o_pkg_desc
AND pkg.o_pkg_id = pkp.o_pkg_id
AND pkp.o_pkg_prop_id = pro.o_pkg_prop_id
AND pkp.o_pkg_prop_order = ( SELECT MIN(tbl.o_pkg_prop_order)
FROM ot_lu_dts_package_properties
tbl
WHERE tbl.o_pkg_id =
pkg.o_pkg_id
AND tbl.o_pkg_prop_order >
@.o_pkg_prop_order )
IF (@.prop_to_set = 'Y')
BEGIN
-- Set DTS Package property value
EXEC @.hres = sp_OASetProperty @.pkg, @.o_pkg_prop_desc,
@.o_pkg_prop_value
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' +
convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' +
@.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE',
'ERROR', @.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to set DTS Package
property ' + @.o_pkg_prop_desc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE',
'ERROR', @.o_syslog_desc
SELECT @.error_code = 13
RETURN 13
END
END -- IF (@.prop_to_set = 'Y')
END -- WHILE (@.prop_to_set = 'Y')
--Set DTS Package Global Variables gvRun
SELECT @.o_pkg_prop_desc = 'GlobalVariables("gvRun").value'
EXEC @.hres = sp_OASetProperty @.pkg, @.o_pkg_prop_desc, @.o_run_id
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to set DTS Package Global Variable
gvRun'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 13
RETURN 13
END
--Execute Package
EXEC @.hres = sp_OAMethod @.pkg, 'Execute'
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Execution of DTS Package DTSLoadStaging
Failed'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 15
RETURN 15
END
SELECT @.o_pkg_prop_desc = 'GlobalVariables("gvPkgStatus").value'
EXEC @.hres = sp_OAGetProperty @.pkg, @.o_pkg_prop_desc, @.error_code OUT
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to obtain DTS Package Global
Variable gvPkgStatus'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 13
RETURN 13
END
SELECT @.o_pkg_prop_desc = 'GlobalVariables("gvPkgStatusDesc").value'
EXEC @.hres = sp_OAGetProperty @.pkg, @.o_pkg_prop_desc, @.o_syslog_desc OUT
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to obtain DTS Package Global
Variable gvPkgStatus'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 13
RETURN 13
END
--Clean up
EXEC @.hres = sp_OADestroy @.pkg
IF @.hres <> 0
BEGIN
EXEC sp_OAGetErrorInfo @.pkg, @.errsrc OUT, @.errdesc OUT
SELECT @.o_syslog_desc = 'Error Number : ' + convert(varchar,@.hres)
+ ' ' + ' Source : ' + @.errsrc
+ ' ' + ' Description : ' + @.errdesc
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.o_syslog_desc = 'Failed to destroy instance of the
DTS.Package OLE object'
EXEC sp_lo_insert_dsslog @.o_run_id, 'RUNDTSPACKAGE', 'ERROR',
@.o_syslog_desc
SELECT @.error_code = 16
RETURN 16
END
RETURN @.error_code
END
you're welcome

RUNNING A DTS PACKET FROM WITHIN TSQL

Here is my problem: I don't have permissions to the 'master' db, thusly I don't have permissions to 'xp_cmdshell'. However, I need to output several small tables that I have created from one large table into individual text files.

Now, from the documentation I have read this is easily possible with the use of dts packets. However, my knowledge of dts packets is non-existent. So, I have created a dts packet that will take the data from a table and export it to a text file.

Here is what I need to know how to do: I would like all the small tables to go to their individual text files based on the file name I provide from within tsql. I would also like this to be done with the use of local tables (i.e. #tablename).

I am trying to alleviate human interface and the resulting errors from the sql statements we have now. We have an elaborate db system with tables and permissions all over the place, and thusly I want this done and removed with the use of local tables. Is this something that anyone could assist me with?

To execute a DTS package from a stored procedure or other t-sql code, you have to use the sp_OACreate and sp_OAMethod system procedures.

The problem, if you don't have permission to the master db, you won't be able to execute these either.

My recommendation to you would be to create SQL Server Agent job(s) to execute the DTS Package and allow the package to execute on a schedule. The SQL Agent execution account should have access to run the DTS Package.

The only other option is to be granted sufficient permission to the master db.

sql

RUNNING A DTS PACKET FROM WITHIN TSQL

Here is my problem: I don't have permissions to the 'master' db, thusly I don't have permissions to 'xp_cmdshell'. However, I need to output several small tables that I have created from one large table into individual text files.

Now, from the documentation I have read this is easily possible with the use of dts packets. However, my knowledge of dts packets is non-existent. So, I have created a dts packet that will take the data from a table and export it to a text file.

Here is what I need to know how to do: I would like all the small tables to go to their individual text files based on the file name I provide from within tsql. I would also like this to be done with the use of local tables (i.e. #tablename).

I am trying to alleviate human interface and the resulting errors from the sql statements we have now. We have an elaborate db system with tables and permissions all over the place, and thusly I want this done and removed with the use of local tables. Is this something that anyone could assist me with?

To execute a DTS package from a stored procedure or other t-sql code, you have to use the sp_OACreate and sp_OAMethod system procedures.

The problem, if you don't have permission to the master db, you won't be able to execute these either.

My recommendation to you would be to create SQL Server Agent job(s) to execute the DTS Package and allow the package to execute on a schedule. The SQL Agent execution account should have access to run the DTS Package.

The only other option is to be granted sufficient permission to the master db.

Running a DTS Package from vb.net

Can anyone point me to some sample code ord give me an example. I'm trying to run a DTS package from my asp.net/vb.net application. I don't need to pass it any variable, just need it to run. I can't seem to find anything on the net for this.
Thanks in advance,
Ryan

There are two ways to do it, through VB.NET code, or through a stored procedure using master..xp_cmdshell. Here's one:

http://www.realworldasp.net/article.asp?article=61
http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic7332.aspx

|||

bmains wrote:


There are two ways to do it, through VB.NET code, or through a stored procedure using master..xp_cmdshell. Here's one:

http://www.realworldasp.net/article.asp?article=61
http://www.msnewsgroups.net/group/microsoft.public.dotnet.languages.csharp/topic7332.aspx


The links you provided are not working solutions because the creators have not addressed the SQL Server Agent permissions needed to run DTS with dtsrun.exe and xp_cmdshell.
To run DTS package through a stored proc you either use DTSRUN.exe or XP_CMDSHELL which is SQL Server Agent dependent. Try the links below for DTSRUN.exe sample code and XP_CMDSHELL configurations with permissions. What I am saying is to run DTS with SQL Server Agent dependent service like xp_CMDSHELL you must give the account used to install SQL Server Agent Admin permissions in Windows and SQL Server. Hope this helps.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_8sdm.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_xp_aa-sz_4jxo.asp

http://www.sqlteam.com/item.asp?ItemID=19595

|||This seems way too complicated. Isn't there simple code I can use to create a stored procedue that calls a dts package. Then I can just execute the stored procedure from my asp page. I'm just looking for some sample T-SQL code that executes a DTS Package.
like this. spexecuteDTSPackage('mypackage')
This would be wonderful.|||I don't know of an easier way because it is SQL Server Agent that runs your DTS package through xp_cmdshell.|||That is the DTSrun utility, which in a stored procedure, you have to use master..xp_cmdShell, and get the rights to do so. See, to run it, it needs to know what server to run it on, what is the name, what are the parameters being passed into it (which is cool because you can dynamically assign the server variables in the package with values passed into the stored procedure), what is the package password if there is one|||

I finally got it working. I think I'm going to write a tutorial since there aren't any good ones out there.

I generated the code for the dtsrun.exe with the dtsgui tool then created a stored procedure.

Thanks for all your help.

|||

You ever write a tutorial for this? I have the same problem and need major help getting a dts to run from .net.

Cordell

Running a DTS package from a stored procedure?

Is it possible to run a DTS package from a stored procedure?
If yes how would I go about doing this?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!You can use dtsrun and xp_cmdshell (probbly the easiest) or you can use the sp_oa SPs - example at
http://www.nigelrivett.net/sp_oacreateLoadDTSpackage.html
"Rob NA" wrote:
>
>
> Is it possible to run a DTS package from a stored procedure?
> If yes how would I go about doing this?
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
>

Running a DTS package from a stored procedure?

Is it possible to run a DTS package from a stored procedure?
If yes how would I go about doing this?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
You can use dtsrun and xp_cmdshell (probbly the easiest) or you can use the sp_oa SPs - example at
http://www.nigelrivett.net/sp_oacrea...TSpackage.html
"Rob NA" wrote:

>
>
> Is it possible to run a DTS package from a stored procedure?
> If yes how would I go about doing this?
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
>

Running a DTS package from a stored procedure?

Is it possible to run a DTS package from a stored procedure?
If yes how would I go about doing this?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!You can use dtsrun and xp_cmdshell (probbly the easiest) or you can use the
sp_oa SPs - example at
http://www.nigelrivett.net/sp_oacre...DTSpackage.html
"Rob NA" wrote:

>
>
> Is it possible to run a DTS package from a stored procedure?
> If yes how would I go about doing this?
> *** Sent via Devdex http://www.devdex.com ***
> Don't just participate in USENET...get rewarded for it!
>sql

Running a DTS

Hi there
I've been trying to do this all w and it's driving me mad !
All I want to do is run a DTS import from a SQL script. When it's run
manually it takes 15 seconds.
The Dts is called "DTS_LisImport"
The DB is "sqlReleaseTwo"
I'm running SQL7
Many thanks
Paul.try
[url]http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_11959518.html[/ur
l]
"Paul in Harrow" <PaulinHarrow@.discussions.microsoft.com> wrote in message
news:D0CC5A4A-5E73-4A91-A17C-344852ED2F7D@.microsoft.com...
> Hi there
> I've been trying to do this all w and it's driving me mad !
> All I want to do is run a DTS import from a SQL script. When it's run
> manually it takes 15 seconds.
> The Dts is called "DTS_LisImport"
> The DB is "sqlReleaseTwo"
> I'm running SQL7
> Many thanks
> Paul.
>|||See if this helps: http://www.sqldts.com/default.aspx?210
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Paul in Harrow" <PaulinHarrow@.discussions.microsoft.com> wrote in message
news:D0CC5A4A-5E73-4A91-A17C-344852ED2F7D@.microsoft.com...
Hi there
I've been trying to do this all w and it's driving me mad !
All I want to do is run a DTS import from a SQL script. When it's run
manually it takes 15 seconds.
The Dts is called "DTS_LisImport"
The DB is "sqlReleaseTwo"
I'm running SQL7
Many thanks
Paul.|||Tried something different:
Use msdb
execute sp_start_job @.job_id= "7B42CBCD-A615-4CF4-B204-8FE4A31E65B1"
[Open sysjobs_view in msdb to get the job_id]
gives me: "Job 'DTS__LisImport' started successfully."
Is there a sp_run_job anywhere?
Paul

Running a 3 step dts process serially in SQL Server 2000

Hi,
I trying to run a 3 steps process in one dts package. Is there a way to run
these processes serially? It is currently running in parallel mode. This of
course is causing a blocking issue in SQL Server 2000.
Please let me know if this is possible in SQL Server 2000. And if it is,
how do I go about implementing it.
Thank you very much in advance for your help.
Thanks,
Sally
I use workflow. You select the first step, then select the second step and
hit workflow.
Russ
"Sally" wrote:

> Hi,
> I trying to run a 3 steps process in one dts package. Is there a way to run
> these processes serially? It is currently running in parallel mode. This of
> course is causing a blocking issue in SQL Server 2000.
> Please let me know if this is possible in SQL Server 2000. And if it is,
> how do I go about implementing it.
> Thank you very much in advance for your help.
> --
> Thanks,
> Sally
sql

Running a 3 step dts process serially in SQL Server 2000

Hi,
I trying to run a 3 steps process in one dts package. Is there a way to run
these processes serially? It is currently running in parallel mode. This o
f
course is causing a blocking issue in SQL Server 2000.
Please let me know if this is possible in SQL Server 2000. And if it is,
how do I go about implementing it.
Thank you very much in advance for your help.
Thanks,
SallyI use workflow. You select the first step, then select the second step and
hit workflow.
Russ
"Sally" wrote:

> Hi,
> I trying to run a 3 steps process in one dts package. Is there a way to r
un
> these processes serially? It is currently running in parallel mode. This
of
> course is causing a blocking issue in SQL Server 2000.
> Please let me know if this is possible in SQL Server 2000. And if it is,
> how do I go about implementing it.
> Thank you very much in advance for your help.
> --
> Thanks,
> Sally

running a .net application from a dts package.

Hi just wondering if anyone knows if it is possible to run a .net application
with a dts package, thanks.
--
Paul G
Software engineer.You can launch a .Net EXE with an Execute Process task.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
> Hi just wondering if anyone knows if it is possible to run a .net
> application
> with a dts package, thanks.
> --
> Paul G
> Software engineer.|||ok thanks for the information.
--
Paul G
Software engineer.
"Dan Guzman" wrote:
> You can launch a .Net EXE with an Execute Process task.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
> > Hi just wondering if anyone knows if it is possible to run a .net
> > application
> > with a dts package, thanks.
> > --
> > Paul G
> > Software engineer.
>
>

Friday, March 23, 2012

running a .net application from a dts package.

Hi just wondering if anyone knows if it is possible to run a .net application
with a dts package, thanks.
Paul G
Software engineer.
You can launch a .Net EXE with an Execute Process task.
Hope this helps.
Dan Guzman
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
> Hi just wondering if anyone knows if it is possible to run a .net
> application
> with a dts package, thanks.
> --
> Paul G
> Software engineer.
|||ok thanks for the information.
Paul G
Software engineer.
"Dan Guzman" wrote:

> You can launch a .Net EXE with an Execute Process task.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
>
>
sql

running a .net application from a dts package.

Hi just wondering if anyone knows if it is possible to run a .net applicatio
n
with a dts package, thanks.
--
Paul G
Software engineer.You can launch a .Net EXE with an Execute Process task.
Hope this helps.
Dan Guzman
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
> Hi just wondering if anyone knows if it is possible to run a .net
> application
> with a dts package, thanks.
> --
> Paul G
> Software engineer.|||ok thanks for the information.
--
Paul G
Software engineer.
"Dan Guzman" wrote:

> You can launch a .Net EXE with an Execute Process task.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:F58673BA-4C72-4038-8F8B-21A80479592E@.microsoft.com...
>
>

rundts from within a stored procedure

I saved a dts package as a structured storage file and put it in a directory.

I'm trying to call and run it with the following stored procedure-

CREATE PROCEDURE run_dts AS

DECLARE @.object int
DECLARE @.hr int

--create a package object
EXEC @.hr = sp_OACreate 'DTS.Package', @.object OUTPUT
if @.hr <> 0
BEGIN
print 'error create DTS.Package'
RETURN
END

EXEC @.hr = sp_OAMethod @.object, 'LoadFromStorageFile',
NULL, '\\server\directory\billing.dts', ''
IF @.hr <> 0
BEGIN
print 'error LoadFromStorageFile'
RETURN
END

EXEC @.hr = sp_OAMethod @.object, 'Execute'
IF @.hr <> 0
BEGIN
print 'Execute failed'
RETURN
END
GO

If I run this from query analyzer, it gives me "The command(s) completed successfully," but the dts doesn't run?

Any ideas?try checking the permission context\owner of the the stored procedure vs. that of the DTS package.

Tuesday, March 20, 2012

Run saved DTS package in 2005

I have saved a DTS Package, in sql serv 2005. How do i run it ? I cant fiqure it outLiar.

You do not have a saved DTS package in 2005. 2005 does not support DTS packages.

Shame on you for trying to decieve people!|||You need to make sure the DTS runtime has been installed.

http://msdn2.microsoft.com/en-us/library/ms143706(SQL.90).aspx|||Blindman -- must be

When talking about dts i was referring to the equivalent, guess that was to much logic for you to handle|||I have saved a DTS Package, in sql serv 2005. How do i run it ? I cant fiqure it out

Manually or scheduled?

In the BI Dev Studio you just right click to run. If you run as a job, then just choose the package when you set up the job step(s).|||Blindman -- must be

When talking about dts i was referring to the equivalent, guess that was to much logic for you to handleBlind leading the blind. You need to be clear, because you can access SQL 2000 database from the 2005 Management studio and even see a list of DTS packages, but you can't edit or run them.

Thus, the need for clarity...