Is it possible to call the DBREMOTE or an external batch file from within the Database (say inside a procedure for example)?
asked 20 Mar '18, 04:19
Baron 1.9k●122●133●159 accept rate: 46%
Could you be more explicit about what you're trying to achieve?
You can use xp_cmdshell system procedure.
If so, I would recommend to use an event to run DBREMOTE, because that would run within its own connection, whereas a procedure would be waiting until DBREMOTE has finished its run...
> a procedure would be waiting
You can also fire-and-forget with the Windows START command...
BEGIN DECLARE @return_code INTEGER; @return_code = CALL dbo.xp_cmdshell ( 'START "title" /B "command or program"', 'no_output' ); SELECT @return_code; END;
Once you sign in you will be able to subscribe for any updates here
Answers
Answers and Comments
Markdown Basics
learn more about Markdown
Question tags:
dbremote ×75 procedure ×34
question asked: 20 Mar '18, 04:19
question was seen: 901 times
last updated: 20 Mar '18, 08:25
incomplete messages SQL Remote
How to create procedure with DESCRIBE statement WITH VARIABLE RESULT clause
Mixed 6.0.x and 10.0.1.x replication
Order of passing parameters into a procedure
SQL Remote Rollback
Calling A Procedure For Every Row In A Select Statement Inside A Stored Proc
Mobilink together with SQLRemote
Check which remotes are out of sync
Procedure with multiple return values
How to modify the "Tutorial: Setting up a replication system using the HTTP message system"
First time here? Check out the FAQ!
Could you be more explicit about what you're trying to achieve?
You can use xp_cmdshell system procedure.
If so, I would recommend to use an event to run DBREMOTE, because that would run within its own connection, whereas a procedure would be waiting until DBREMOTE has finished its run...
> a procedure would be waiting
You can also fire-and-forget with the Windows START command...