Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Reloading FTP Server

Author  Topic 

Sprinjee
Starting Member

42 Posts

Posted - 2006-03-12 : 18:07:05
I've created a solution through asp and sql that enables a login for a ftp-server. As soon as the login in created I would like to trigger a reload of the ftp server (using BPFTP) which is necessary to load the user into BPFTP. I've tried this:

Exec master..xp_cmdshell '"c:\Program Files\BPFTP Server\BPFTPServer.exe" -reload'


This does not work.

I've also tried:
-
Exec master..xp_cmdshell 'c:\Progra~1\BPFTPS~1\BPFTPServer.exe" -reload'

- Using a batch file f.i.
Exec master..xp_cmdshell 'c:\Progra~1\BPFTPS~1\reload.bat'

- tried using start and call command
- tried to put the actions above in a sql job

No results so far...

Needless to say that the command does work from start / run of when I double-click the batch file I created. If anyone has a clue I'd really appreciate it if you would share it!

nr
SQLTeam MVY

12543 Posts

Posted - 2006-03-12 : 19:07:29
What happens when you run it?
Do you get an error message? Does it hang?

Is the sql server your local machine - if not the c: will be on the server not on your workstation.
Does the sql server service have permission to do this?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Sprinjee
Starting Member

42 Posts

Posted - 2006-03-13 : 04:23:55
It does not hang when I run in f.i. the query analyser I get an output NULL. When I run it as a job it is completed succesfully. No error however no reload either. Everything is local for now...

The SQL server executes other command just fine. Are special permissions needed for this actions (running an .exe)?
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2006-03-13 : 05:26:15
Sounds like you are setting up the job with different permissions to that which is used in query analyser.

Try changing the command in the .bat file to just create a text file (echo hello > a.txt) to check that you are calling what you expect.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -