Generate INSERT statements from SQL Server table data
The really low cost solution though is to use this stored procedure:
http://vyaskn.tripod.com/code.htm#inserts
...
SQL Server jobs can be started from T-SQL using msdb.dbo.sp_start_job:
EXEC msdb.dbo.sp_start_job @job_name = 'My job name'
This call however will return immediately (i.e. the job executes asynchronously). Sometimes it is desirable for the job to be executed synchronously. The following procedure accomplishes this.
EXEC common.dbo.execute_job_synchronously '2696980E-1E38-43C4-8350-29DBFC56974D', null, 30
EXEC common.dbo.execute_job_synchronously null, ‘My cool job’
EXEC common.dbo.execute_job_synchronously null, ‘My cool job’, 3600
Also:
DBCC CHECKIDENT ('table_name', NORESEED)
To reseed the identity value:
DBCC CHECKIDENT ('table_name', RESEED, 10000)