Skip to main content
Inspiring
Aug 5, 2008 8:58 PM UTC
Question

cfexcute

The following doesnt copy the data from csv into db table... why? Any help appreciated...My CF and SQL server are on my local machine.
This topic is closed to new replies. Start a new post to keep the conversation going.

23 replies

emmim44Author
Inspiring
Aug 8, 2008 5:16 PM UTC
None of the posted links help.. Any way thank you for the help
Translate
emmim44Author
Inspiring
Aug 8, 2008 3:56 PM UTC
Yes sir
Translate
emmim44Author
Inspiring
Aug 8, 2008 3:55 PM UTC
YES
Translate
Participating Frequently
Aug 8, 2008 4:09 PM UTC
Well then, it has nothing to do with Coldfusion. You need to get that command working in the DOS prompt first. Then, and only then (because you know it's working), you can move it into CF.

A quick google search yields:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2947781&SiteID=1
http://support.microsoft.com/kb/308801
http://www.mydatabasesupport.com/forums/sqlserver-faq/228365-help-dtsrun-dts-package.html
http://support.microsoft.com/kb/299354
http://www.dbforums.com/showthread.php?t=1622934
http://www.developmentnow.com/g/103_2006_9_0_0_827238/DTSrun-gives-Package-does-not-exist-error.htm

I'm not sure what will fix your problem at this point, but based on those links, you might want to just try changing /N to /F and seeing if that takes care of it.
Translate
emmim44Author
Inspiring
Aug 8, 2008 12:40 PM UTC
'scorecard_30_import_saves.dtsx' file name and location is same as above... Yes I am getting the error I am posting...
Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = ''C:/Documents and Settings
/vozturk/My Documents/scorecard_30_import_saves.dtsx''; ID.VersionID = {[not sp
ecified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0
Translate
Participating Frequently
Aug 8, 2008 2:55 PM UTC
Is that the output of running the command from the DOS prompt?
Translate
emmim44Author
Inspiring
Aug 7, 2008 9:05 PM UTC
Sorry this is run results:
Error: -2147217900 (80040E14); Provider Error: 14262 (37B6)
Error string: The specified DTS Package ('Name = ''C:/Documents and Settings
/vozturk/My Documents/scorecard_30_import_saves.dtsx''; ID.VersionID = {[not sp
ecified]}.{[not specified]}') does not exist.
Error source: Microsoft OLE DB Provider for SQL Server
Help file:
Help context: 0
Translate
Participating Frequently
Aug 7, 2008 9:41 PM UTC
This will take forever if I have to ask the same question multiple times:
Can you run this command from a DOS prompt?
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe /S NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008

What is the output of running that command, from the DOS prompt? If it's the same, DTS package does not exist, are you positive you are using the correct filename?
Translate
emmim44Author
Inspiring
Aug 7, 2008 8:59 PM UTC
The run results :
NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008
Translate
Participating Frequently
Aug 7, 2008 6:00 PM UTC
The error you're getting is still this?
DTSRun: Loading... Error: -2147217900 (80040E14); Provider Error: 14262 (37B6) Error string: The specified DTS Package ('Name = 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_Saves'; ID.VersionID = {[not specified]}.{[not specified]}') does not exist. Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0

Since there's a space in the path to that file, you might need to put quotes around it:
<cfset saves = "Saves">
<cfloop index="i" list="#saves#">
<cfscript>
targ = structNew();

targ.Exe = "c:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe";
targ.server = "NYCWSITSSALEEM";
targ.verBase= "30";
</cfscript>

<cfexecute name = "#targ.Exe#"
arguments = "/S #targ.server# /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=#DateFormat(now(), 'MM/DD/YYYY')#"
timeOut = "300"><!--- 5 minutes --->
</cfexecute>
</cfloop>

Can you run this command from a dos prompt?
C:\Program Files\Microsoft SQL Server\80\Tools\Binn\dtsrun.exe /S NYCWSITSSALEEM /N 'C:/Documents and Settings/vozturk/My Documents/scorecard_30_import_saves.dtsx' /U cf_user /P 1 /A DateToUse:8=08/07/2008
Translate
emmim44Author
Inspiring
Aug 7, 2008 5:50 PM UTC
I already checked that.. it runs on 'local system account'
Translate
emmim44Author
Inspiring
Aug 7, 2008 2:15 PM UTC
cf_user doesnt exist on windows environment, it is a SQL 05 power user. As I mention, CF and SQL 05 are located on my local machine...

I still dont understand how this thing will work !
I looked at the security of that dtsx file ...That user doesnt exist in the list
Translate
Participating Frequently
Aug 7, 2008 3:31 PM UTC
OK, I guess I need to make myself clearer.

When Coldfusion runs a command via cfexecute, it runs as the user that the Coldfusion service is running as.

To find that out, open up Task Manager and find the coldfusion process. What username is that process running as? Hint: it can't be a SQL Server user.
Translate
emmim44Author
Inspiring
Aug 6, 2008 9:35 PM UTC
cf_user is a SQL 05 admin user....
Translate
Participating Frequently
Aug 6, 2008 10:34 PM UTC
....right....
but can that user access the file?
Translate