473,394 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

dtsrun to start a package - cannot find xp_cmdshell

Newbie here.

In my database I'm needing to automate some data imports. I have the
import set up as a DTS package and it works wonderfully. But I'm
having trouble kicking it off as a stored procedure, or even from the
Query Analyzer. I used dtsrunui to get a proper connection string, but
when I enter

EXEC 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, Extended
Procedures. 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 the
SP, but I have no idea how to do that. Anyone willing to shed a little
light would get my eternal gratitude. :)

Thanks in Advance, maddman

Jul 23 '05 #1
2 2450
use master first or add master. to the procedure name. xp's don't operate
like sp's where you can call them from any database.
kevin Ruggles

"Maddman" <ma********@yahoo.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Newbie here.

In my database I'm needing to automate some data imports. I have the
import set up as a DTS package and it works wonderfully. But I'm
having trouble kicking it off as a stored procedure, or even from the
Query Analyzer. I used dtsrunui to get a proper connection string, but
when I enter

EXEC 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, Extended
Procedures. 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 the
SP, but I have no idea how to do that. Anyone willing to shed a little
light would get my eternal gratitude. :)

Thanks in Advance, maddman

Jul 23 '05 #2
That did the trick. Thanks!

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Adam Augusta | last post by:
In a Multi Server Job under SQL Server Agent (MSX), we have a series of steps like: DTSRun /~Z0x8E8635E6BBA... The ~Z means it's an encrypted hexidecimal string. The person who created this...
1
by: Andy | last post by:
We are running a DTS package with the dtsrun utility and would like to pass a variable through it. Inside our package we have a VB script that references a table that contains the information...
1
by: m3ckon | last post by:
Hi, I'm writing a stored procedure to run a dts package and I've successfuly got this working using my sotred proc and the syntax of dtsrun is correct. However, I'm trying to pass a variable...
0
by: Daniel Reber | last post by:
I am trying to run a DTS package using C#. When I try to execute DTSRun it runs hidden, I do not see the command window anywhere. Here is my code: System.Diagnostics.ProcessStartInfo info =...
1
by: Kevin | last post by:
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 1 Line 1: Incorrect syntax near '/'....
1
by: TaeHo Yoo | last post by:
Hi all, to run a DTS package you run dtsrun in the command prompt. It worked fine. But how to run dtsrun in c# console application? Thanks a lot *** Sent via Developersdex...
5
by: mike | last post by:
I have a question. I am doing some work for someone and I have a batch file that they can run that will execute an OSQL line and a DTSRUN line. In both lines I run them using the /S /U /P...
5
by: Brian Peasland | last post by:
I am trying to get a DTS package to be run from the command line with the dtsrun utility. The DTS package is stored in the database. The user I supply is a user in the database. I get an error...
0
by: dutdut | last post by:
Hello, With MS SQL Server 2000, to run a DTS package called « test » through a stored proc, I use : exec master..xp_cmdshell 'DTSRun /S (local) /E /N "test" /L "C:\Temp\log.txt"' When I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.