Xp_cmdshell Dtsrun Problem
Feb 16, 2001
Hi,
i am running the xp_cmdshell 'dtsrun ...' from Query Analyzer to call my DTS and the process seem to stuck there. It say "Executing" in the bottom of the screen since 3 hours. The DTS take 10 seconds to run when i start it manually. This is working fine on my other server but not on this one.
Any help will be appreciated
Martin
View 1 Replies
ADVERTISEMENT
Jul 23, 2005
Newbie here.In my database I'm needing to automate some data imports. I have theimport set up as a DTS package and it works wonderfully. But I'mhaving trouble kicking it off as a stored procedure, or even from theQuery Analyzer. I used dtsrunui to get a proper connection string, butwhen I enterEXEC xp_cmdshell 'dtsrun /S "(local)" /N "MyPackage" /A"KeyNum":"19"="19687627" /W "0" /E'I get an error that says "Could not find stored procedure'xp_cmdshell'". xp_cmdshell is indeed there, under Master, ExtendedProcedures. I tried calling it dbo.xp_cmdshell, but that didn't help.I'm guessing that I need to point the command to the location of theSP, but I have no idea how to do that. Anyone willing to shed a littlelight would get my eternal gratitude. :)Thanks in Advance, maddman
View 2 Replies
View Related
Sep 5, 2001
What is the minimum SQL install required for dtsrun? Can I get away with copying a few files and not installing SQL.
Basically, the central SQL database has a DTS package which I need to enable a number of users to run. What I do not want to do is have to install SQL Server on all the end users computers.
ANy advice would be greatly appreciated.
View 1 Replies
View Related
Dec 7, 1999
We need to schedule a dtsrun batch to run on several servers at the same time. Can
someone tell me how to write this in my command prompt so it will run remotely.
We tried to run it locally but it does not work.
Thanks,
Dianne
View 1 Replies
View Related
Mar 11, 2003
Hi,
Question with DTSRUN
1) I have a batch file which runs a DTS package. Problem is after completion of the package the control doesn't return to command prompt. Any idea how to tackle this.
2) Even on the same server /U /P doesn't work. It errs out saying password is incorrect, Although I can connect to ISQL with same credentials.
Need to fix this asap.
Thanks,
View 4 Replies
View Related
Apr 13, 2006
I am trying to run two dts jobs using a batch file obviously using dtsrun but im having trouble. I've never attempted this before and it looked easy but not as easy as I thought.
I have two dts jobs, call them package1 and package2. I also saved these as .dts files. I made a .bat file and put it in the same location as the .dts files.
My batch file looks like this:
dtsrun /F package1
dtsrun /F package2
pause
This does not work and I get the following:
C:WINDOWS>dtsrun /F package1
DTSRun: Loading...
Error: -2147287038 (80030002); Provider Error: 0 (0)
Error string: The system cannot find the file specified.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 704
Can anyone help and tell me what I am doing wrong?
Thanks
Neil.
View 4 Replies
View Related
Feb 4, 2008
Hello all,
I am trying to run a DTS package from a .DAT file and in my file this is my code:
DTSRun /S ServerName /E /N "Promo Point Adjust - Import promo file"/
But when I run that the data in the table is not being updated. my question is
-how to I step through the to see what the disconnect is?
-Or if there is an error that is happening but being displayied?
Can anyone help me
View 1 Replies
View Related
Nov 23, 2005
when I run the following in sql Analyzer :dtsrun /S"Local" /Ntestemail /UExternalRO /P"changmail"got this error:Server: Msg 170, Level 15, State 1, Line 1Line 1: Incorrect syntax near '/'.Is the command right?And how to run this dts package in commandline?Thanks
View 1 Replies
View Related
Mar 20, 2002
I have SQL Server 7.0 desktop installation and I installed SQL Server 2000 clinet.
Now, when I execute DTSRun from the command prompt, I am getting error message
dtsrun.exe Entry Point Not Found in dynamic link library SQLRESLD.dll
Can some one help on this.
Thanks
View 1 Replies
View Related
Mar 20, 2001
Hello
I have created a very simple DTS package to transfer data from one database to another on the same server. I am able to successfully execute the package from DTS. But if i try to schedule the package and run it from SQL agent it fails. The job that is created by the SQL agent appears as follows -
'DTSRun /~Z0x2939C85E61C391613034D42DC85BA5E18B1E12D06DC31F 242542405E07594E436B58219AC124F29B80EDEB464ACB52BA 977BF7A0E59BE9C183507AF7CDA9EB1033C1E04009EC5D4467 E1955FB83FA31BC185F4D4398F51F008BDE6677D23F9C5571A 4C3010B0ED1943C234'
and the error message i get is invalid switch .... DTS command invalid options
Please help!
Thanks
aruna
View 1 Replies
View Related
Apr 9, 2001
Hello everyone,
I have a question about dtsrun hoping someone have an answer. Does anyone know if there is a switch that I can turn onoff so that it will suppress the output result when I execute the dtsrun ulitity?
This is what I ran:
master..xp_cmdshell 'dtsrun /Sclancy /E /N ExpDispute'
I get the following result back after it's done:
output
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DTSRun: Loading...DTSRun:Executing...DTSRun OnStart: Copy Data from Results to [Transplus_TestArchive].[dbo].[SG_DISPUTE] Step DTSRun OnProcess: Copy Data
from Results to [Transplus_TestArchive].[dbo].[SG_DISPUTE] Step; 14 Rows have been transformed or copied.; PercentComplete = 0; ProgressCount = 14 DTSRun OnFinish: Copy Data from Results to [Transplus_TestArchive].[dbo].[SG_DISPUTE] Step DTSRun:
Package execution complete.
(6 row(s) affected)
Thank you in advance for any help.
Mai Nguyen
View 2 Replies
View Related
Jul 31, 2001
Hello!
Here's a problem I'm having with user's laptop.
I installed SQL Server 7.0 client tools long time ago so she was able to use dtsrun utility.
Recently we moved our production database to the new server.
The difference between new server and old one is SP.
The old server had SP1 for MSSQL Server 7.0 and new server has SP2.
The DTS packages were copied from old server to new one and recreated accordingly.
Then when user was trying to run dtsrun utility she was getting error "Parameter is incorrect".
Then I applied SP2 to her SQL installation.
After that we've got different error message "Can not create COM server to load DTS package.
Class not registered".
I tried to register following files dtsffile.dll,dtspkg.dll,dtspump.dll,axscphst.dll using regsvr32 but I coudn't-I was getting errors.
Then I reinstall SQL client tools and applied SP2 again-still same error about COM server.
Any ideas what else can be done or changed to fix it?
Thank you
P.S.this user has another computer.
Applying SP2 to her SQL client installation fixed "Incorrect parameter" error and dtsrun works fine on this machine.
Lena
View 1 Replies
View Related
Jul 12, 2000
Hi,
Thanks for any help on this matter in advance.
I have a DTS Package that when I run from within the MMC it runs fine but when I schedule the job from the DTS design window or create a new job via SQL Agent and use dtsrun.exe with the correct parameters I get the following error:
DTSRun: Loading . . . Error -2147008511 (80074001) Provider Error: 0 (0)
Error String: Not implemented
Dts Owner is sa
Sa is also listed as owner for the job.
I tried changing the provider to ODBC for SQL Server since error message indicated a provider error and that did not work.
I searched Technet for 4001, provider error, dtsrun and got nothing relative. It would seem like a rights issue but SQL Agent Logs on as a local administrator for the SQL box which is also the PDC.
Any insight?
Thanks
Paul Kelly
like_dbaguy@hotmail.com
View 1 Replies
View Related
Jan 9, 2001
Hi everyone,
I am using SQL Server 2000 and I get this error.
I get the following error when I attempt to run DTSRun from the command prompt:
C:>DTSRun /S (local) /U sa /N "ACPAY_New" /R "ThedaCare1"
DTSRun: Loading...
Error: -2147217355 (80041035); Provider Error: 0 (0)
Error string: General error -2147217355 (80041035).
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
Help context: 705
This error makes no sense to me. I also get the following message too
C:>DTSRun /S local /U rrojas /N ACPAY_New /R ThedaCare1
DTSRun: Loading...
Error: -2147217390 (80041012); Provider Error: 0 (0)
Error string: [Microsoft][ODBC SQL Server
Driver][DBNETLIB]ConnectionOpen (Connect()).
Error source:
Help file:
Help context: 0
What I have done is created a package called ACPAY_New and saved the package
in two places, the SQL Server and the Meta Data Services (Repository). The
name of the Database is ThedaCare1, the name of the server itself is local or rrojas, the user name is rrojas. I have no idea as to what this error message
means. If I run the job in SQL Server Agent, the job does not run at all.
If I run the package on it's own within Data Transformation Services, by
right clicking and execute it runs fine.
Please help.
Thanks,
Rey
View 1 Replies
View Related
Nov 27, 2000
Hi,
I am trying to run dtsrun command as a sheduled job and the user who executes that job is "sa".I am trying to import data from a Non-Secured Network to a Secured Network only port 1433 is opened.
The problem is that dtsrun is a OS based command and that runs in the context of the service which started the sql service and which is a RPC request.
I need to run a certain dts package at a sceduled intervals and i need a work around other than dtsrun..how can i do the same
replies will be greatlt appreciated
Jane
View 1 Replies
View Related
Jan 25, 2002
Hi Everybody,
I have created a DTS Package from SQL to Visual FoxPro(*.dbf). The DTS Package is working fine in Enterprise Manager. But when I tried to use 'dtsrun' by passing the servername, username,password and Package as parameters it is giving error.
The command which I tried in Query Analyzer as follows,
exec master..xp_cmdshell 'dtsrun /S DBser1 /U sa /P aaa /N pack1'
I am not able to execute the 'dts package' through
'dtsrun' utility. I am surprised that the same package is working fine Enterprise Manager without any error.
I tried all combination for FoxPro file by Creating Data Source Name throgh File DSN, System DSN and User DSN. All these alternatives are working fine in Enterprise Manager. But when I use 'dtsrun' utility it is giving all comibination of errors.
The following error I am getting when I execute through 'dtsrun.exe' utility,
DTSRun OnError: Delete from Table test Step,
Error = -2147467259 (80004005)
Error string: General error: Invalid file dsn 'C:Srims.dsn'
Error source: Microsoft OLE DB Provider for ODBC Drivers
OR
DTSRun OnError: Delete from Table test Step, Error = -2147467259 (80004005)
Error string: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error source: Microsoft OLE DB Provider for ODBC Drivers
Can anybody guide me how to execute through 'dtsrun' utility.
tks in advance,
Sam
View 5 Replies
View Related
Mar 20, 2002
I have SQL Server 7.0 desktop installation and I installed SQL Server 2000 clinet.
Now, when I execute DTSRun from the command prompt, I am getting error message
dtsrun.exe Entry Point Not Found in dynamic link library SQLRESLD.dll
Can some one help on this.
Thanks
View 1 Replies
View Related
May 31, 1999
hi....
ok...all i want to do is take a global variable and pass it to another procedure using a wrapper... what am i missing...
if i call the 2nd procedure from the first it works fine.... but if i use the wrapper to call both procedures...and yes before you ask i am calling the first procedure that creates the variable before the second which uses it...
it doesn't see it... says it has no value...what am i missing.. please help...
kim
View 5 Replies
View Related
Aug 10, 2004
Hi all
I have a batchjob which runs a DTS package now it calls it ok
However it is running against 2 Databases on 2 servers and I get a login error even tho I am using the sa login
does anyone know of any issues relating to this Hopefully with a soloution that does not involve a lot of work
thanks
Michael Grieve
View 7 Replies
View Related
Jan 22, 2007
Hi,
I have a DTS named "Rahul_Test" where i have a global variale named "Rahul" INteher (1 Byte). N trying to assign this variable from SQL statement. Here is the syntax that I am writing.
exec master..xp_cmdshell 'DTSRUN -E -S142.102.27.222 -Usa -Psa -N"Rahul_Test" -ARahul:8="aaa"'
After executing the syntax I am getting the following message...
DTSRun: Loading...
DTSRun: Executing...
DTSRun: Package execution complete.
NULL
But the global variable "Rahul" doesnot get changed to 225.
Kindly help me out in this regard.
Thanks in advance.
Rahul Jha
View 4 Replies
View Related
Mar 26, 2008
Folks:
I have lots of Stored procedures in which we use 'dtsrun' to run DTS Packages. Now, after I upgrade the server to SQL 2005 will I have to change all the Stored procedure's to reflect 'dtexec' instead of 'dtsrun'?
Thanks !
View 1 Replies
View Related
Aug 18, 2005
I have been successful at setting up three or four DTS packages to runusing the DTSrun command line utility and the Windows scheduler untilnow. The latest package gives me the following error no matter what Itry.Error: -2147217355 (80041035); Provider Error: 0 (0)Error string: General error -2147217355 (80041035).Error source: Microsoft Data Transformation Services (DTS) PackageHelp file: sqldts80.hlpHelp context: 705I googled the error but got only two hits, only one of which actuallydiscussed the error. That one talked about the security and ID contextof the system agent but I can't even run the package from the commandline, never mind using the Windows chron. The DTS command line I'musing looks like this:DTSRun /S MyServerInstance /R DBName /N MyDTSPacakgeName /EVariations included /U MyUserName /P MyPassWord and a couple others.Next step would have been to use /!Y and /!C to create an encoded batchfile to use for the Windows scheduler.Any help would be most appreciated.Randy
View 4 Replies
View Related
Mar 21, 2006
I have a question. I am doing some work for someone and I have a batchfile that they can run that will execute an OSQL line and a DTSRUNline. In both lines I run them using the /S /U /P switches and ofcourse the /N or /i switch to tell it what to run. I have also triedreplacing the /U /P switches with the /E switch.My problem is that as long as I specify the users password on the OSQLline (either with /U & /P or with /E & /P) it will run. If I try andjust use the /E it will say password failed for DOMAIN/USER . Ok, Idon't really care I can specify the password and the script will run.However no matter what I do the DTSRUN line will not run, it gives methis same password error.I can run this line just fine on my PC on my network and my domainusing just the /S /E switches.Any ideas as to why it will work for OSQL but not DTSRUN?Thanks in advance.
View 5 Replies
View Related
May 4, 2006
I am trying to get a DTS package to be run from the command line withthe dtsrun utility. The DTS package is stored in the database. The userI supply is a user in the database. I get an error stating "SQL Serverdoes not exist or access denied." It looks to me like the SQL Serverinstance does exist because it tries to start the package. I get"DTSRun: Executing". If I put in a server that is non-existent, I do notget that message. I also know that my username and password are correct.Here is output from my attempt to run dtsrun for my DTS pkg (server,user, password change to protect my db security):C:>dtsrun /Sserver_name /Uuser /Ppass /Npkg_nameDTSRun: Loading...DTSRun: Executing...DTSRun OnStart: DTSStep_DTSExecuteSQLTask_1DTSRun OnError: DTSStep_DTSExecuteSQLTask_1, Error = -2147467259 (80004005)Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Serverdoes not exist or access denied.Error source: Microsoft OLE DB Provider for SQL ServerHelp file:Help context: 0Error Detail Records:Error: -2147467259 (80004005); Provider Error: 17 (11)Error string: [DBNETLIB][ConnectionOpen (Connect()).]SQL Serverdoes not exist or access denied.Error source: Microsoft OLE DB Provider for SQL ServerHelp file:Help context: 0DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_1DTSRun: Package execution complete.I suspect that my user I am connecting to the database with does nothave privileges to execute the DTS package. I cannot determine, fromBOL, what privs I need to grant to this user to let them execute thispackage. Any ideas?TIA,Brian--================================================== =================Brian PeaslandJoin Bytes!http://www.peasland.netRemove the "nospam." from the email address to email me."I can give it to you cheap, quick, and good.Now pick two out of the three" - Unknown
View 5 Replies
View Related
Jul 20, 2005
In a Multi Server Job under SQL Server Agent (MSX), we have a series ofsteps like:DTSRun /~Z0x8E8635E6BBA...The ~Z means it's an encrypted hexidecimal string. The person who createdthis step is no longer accessible, and the string can't be triviallydecrypted, so I don't know what this runs.Someone once mentioned that I could go to Query Analyzer, run it, andwatch the execution plan. However, if I start the job, the executionplan simply walks through the steps required to find the job, and doesn'tgo into the details of the job. I don't know how to run the DTSRuncommand directly within Query Analyzer.Is there a way I can use the execution plan to determine what package thisDTSRun line is executing? Please give me the appropriate command orcommands.-Adam
View 1 Replies
View Related
Apr 13, 2007
I am trying to execute a DTS Package from within a stored procedure, however the Execute statement hangs while running the debugger.
The sql is EXECUTE @SP_Return = master.dbo.xp_cmdshell 'DTSRun /E /SBIGO /NPFW Data Load', NO_OUTPUT
The debugger hangs, SQL Query Analyser does not respond after exiting the debugger and MSSQLSERVER needs to be stopped & restarted.
The DTS Packages runs fine from the cmd prompt as can be seen below
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:Documents and SettingsGreg>DTSRun /E /SBIGO /NPFW Data Load
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: Copy Data from PFWDataLoad to [Bistro Group].[dbo].[tblPFW_Monthly_Load_Data] Step
DTSRun OnProgress: Copy Data from PFWDataLoad to [Bistro Group].[dbo].[tblPFW_Monthly_Load_Data]
Step; 500 Rows have been transformed or copied.; PercentComple te = 0; ProgressCount = 500
DTSRun OnFinish: Copy Data from PFWDataLoad to [Bistro Group].[dbo].[tblPFW_Mon
thly_Load_Data] Step
DTSRun: Package execution complete.
C:Documents and SettingsGreg>
Any help would be great.
View 1 Replies
View Related
Jul 20, 2001
Hello!
MSSQL Server 7.0 SP2
One of my users is running DTS packages on her computer using dtsrun utility.
I installed SQL client tools so she can run dtsrun utility.
It was working fine until we moved production database to the new server.
Local DTS packages were saved to the new server and recreated accordingly.
Now when she is running DTS packages in MSDOS using dtsrun she's getting error message "Can not create COM server to load DTS package. Class not registered".
Before this message she was getting different error "Paremeter is incorrect"
Then I applied SP2 to her client sql tools.Because new SQL Server has SP2.
After that we've got new message about COM server.
But dtsrun works on another client machine.
Any ideas what's going on?
Thank you
Lena
View 3 Replies
View Related
Aug 9, 2001
When user executing dtsrun command he is getting error message "Login failed domain name/user account".
What should be done in order to fix it.
I know it's a permission issue.
DTS packages are saved as local packages on the server.
Thank you
Lena
View 2 Replies
View Related
Jan 11, 2005
Hi again everybody!
Okay, so, here's what's happening. I'm using a DTS Package to transfer the contents of a table into TXT files. But, what I want to do is transfer them into dynamic folders. The information is an Item that belongs to an Order.
Now, I've actually gotten it to write the files w/ the information I've passed to the DTS package using the /A switch in dtsrun. But, the problem I'm having is that the files aren't named right. They're short about 10 characters w/o an extension.
How I achieve this is by executing a stored procedure that loops through the open items and calls the DTS package for each item, thusly:
set @cmd = 'dtsrun /S SQL1 /E /N WEB_WRITE_TXT /A Item_ID ="' + cast(@item_id as VarChar(4)) + '" /A File_Path =' + @RootPath + cast(@order_ID as VarChar(4)) + '' + @File_Name
EXEC master..xp_cmdshell @cmd
I have File_Path bound to the DataSource property of the TextFile DTS Connection. File_Path ends up looking something like this:
\(Server Name)(Share)(Folder)(Sub-F)(Sub-F)(Sub-F)(Order_ID)(Item Code)-(Qty)-(Item_ID).txt
But all I end up with is a file with the first 5 characters of the file name. If I put the File_Path in quotes when passed to the DTS package, I get the first 4 characters.
Please help!
-Me
View 1 Replies
View Related
Oct 29, 2004
Hi all,
I am currently using a series of dts packages to extract and export data. To run the packages, I have a table (TW_DTS) which lists each dts package name, I then use a stored procedure to loop through each and 'dtsrun' it. If a package fails then the error is stored in another table from within the individual dts.
This solution works in principle, however when the stored procedure runs some of the dts packages fail for an unknown reason. Unfortunately the problem is not consistent - it is not always the same package, or even same number of packages that fail. Each package will work when run individually.
I have listed the stored procedure below, any advice may save me from throwing my laptop through the window.
Cheers.
-----------
CREATE PROCEDURE [spTWDTS] AS
DECLARE @unique_idvarchar(50)
DECLARE @dts_namevarchar(50)
DECLARE @start_dttmdatetime
DECLARE @end_dttmdatetime
DECLARE @CMDvarchar(1000)
DECLARE @ERRORvarchar(1000)
DECLARE
dts_cur CURSOR FOR SELECT unique_id, dts_name, start_dttm, end_dttm from TW_DTS where status = 'A'
open dts_cur
FETCH dts_cur INTO @unique_id, @dts_name, @start_dttm, @end_dttm
while @@fetch_status = 0
BEGIN
-- Set as No Error
SET @ERROR = 0
--update the start date
UPDATE TW_DTS set start_dttm = getdate() where unique_id = @unique_id
--run the package
SET @CMD = 'dtsrun /S myserver /U myusername /P mypassword/N '+@dts_name
EXECUTE @ERROR = master..xp_cmdshell @CMD
--update the end date
UPDATE TW_DTS set end_dttm = getdate() where unique_id = @unique_id
--move to next dts package
FETCH dts_cur INTO @unique_id, @dts_name, @start_dttm, @end_dttm
END
CLOSE dts_cur
DEALLOCATE dts_cur
RETURN @ERROR
GO
View 3 Replies
View Related
Jan 1, 2005
Hi,
i wrote a VB function that runs DTS by DTSRUN command, its working fine but when i copy the same code in COM and run it from ASP page and VB it fails to execute.
Function ExeDTSRun(DTSName, mKey As String)
Dim mDTS, spServerName, spUid, spPwd As String
spUid = "sa"
spPwd = "test"
spServerName = "server"
mDTS = "DTSRun /S " & spServerName & " /U " & spUid & " /P " & spPwd & " /N " & DTSName & " /G " & mKey & " /W ""0"""
Shell mDTS, vbNormalFocus
ExeDTSRun = "Successfully Run DTS : " & DTSName
End Function
Regards
Adi
View 2 Replies
View Related
Jul 20, 2005
Hi,I'm writing a stored procedure to run a dts package and I've successfulygot this working using my sotred proc and the syntax of dtsrun iscorrect.However, I'm trying to pass a variable to the DTSrun command and this iswhere I'm having the problemthe code for the proc is:Declare @partcode nvarchar(255)EXEC master..xp_cmdshell 'DTSRun /S "server" /U "user" /P "password" /N"XMLStockCheck" /A "oPartCode":"8"="' + @partcode + '" /W "0" 'Everytime I run it I get this error:Server: Msg 170, Level 15, State 1, Line 3Line 3: Incorrect syntax near '+'.can someone help me with this please?M3ckon*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 1 Replies
View Related
May 18, 2006
Somehow I'm not getting dtsrun to work.
The server is local
The name of the package is ImportHosttrncs. It is saved under Local Packages.
There is no password.
Is this syntax correct?
dtsrun /Slocalhost /PImportHosttrncs
View 1 Replies
View Related