Exec in Background

Exec in Background

Post by Chris Schmid » Thu, 15 Mar 2001 08:34:51



I have a stored Procedure that will take a long time to run.
So I need a sql Statment that I can start The procedure and not wait for the
responce.  I don't care when the Process Finishes.  I just want to have
something start it and then return.
 
 
 

Exec in Background

Post by Kalen Delane » Thu, 15 Mar 2001 09:17:58


A job can run any TSQL statement, including executing a proc. You can
schedule the job to start whenever you like.

Read about JOBS in the Books Online.

HTH

--
-------------------------------------
Kalen Delaney
MCSE, SQL Server MCT, MVP
www.InsideSQLServer.com

Feed Someone for Free Today!
www.thehungersite.com


Quote:> I have a stored Procedure that will take a long time to run.
> So I need a sql Statment that I can start The procedure and not wait for
the
> responce.  I don't care when the Process Finishes.  I just want to have
> something start it and then return.


 
 
 

1. syntax problem: How to EXEC within EXEC

If someone can write an easier way, please let me know!!!.

What I would like to do is read particular table names from sysobjects
and using sp_spaceused, populate the table TmpTblSpaceUsed.
I'd rather not have to open a cursor and was wondering if I could do
this using only a couple of lines.

PS. Is there also an easy way to convert the varchar(18) eg '18 KB'
results from sp_spaceused to a numeric value ... eg 18

CREATE TABLE #TmpTblSpaceUsed
 (table_name    sysname,
  nrows         int default 0,
  reserved      varchar(18),
  data          varchar(18),
  index_size    varchar(18),
  unused        varchar(18)
 )



    sysobjects.id >  50099219 '


Thanks
TwoPlusTwo

Sent via Deja.com http://www.deja.com/
Before you buy.

2. HTML version of the FAQ v1.2

3. SQL Exec /Cmd Exec Fails

4. OMNIS7 not OMINIS7: sorry

5. running access adp program as a background service

6. Q: Oracle Forms over WAN? Performance? Speed?

7. Collecting a profile in the background?

8. hosts.allow in net8/sqlnet

9. Removing the lag from SQL 2000 backups in the background

10. Change Tracking and Background Update Performance

11. SQL 2000 background scripts.

12. MDX on current background selection

13. Background processing after incremental dimension processing