Our Database is being created by a batch file, where each script is fired off separately via osql each time.
There are 940 tables plus all the stored procs and triggers and views.
Example:
set @osqlcommand = 'osql -d ASCEND -USA -P'+ @SAPASSWORD + ' -i ' + '"'
set @instatement = @RUNDIR + '\Init\MSSQL\MSSQLInit.sql'
set @instatement = @osqlcommand + @instatement + '"'
select @instatement
exec master..xp_cmdshell @instatement,no_output
This is very slow is there a better way to do this?
how can I do this without going to the shell and running osql each time?
Thanks,
Matt Minnis
There are 940 tables plus all the stored procs and triggers and views.
Example:
set @osqlcommand = 'osql -d ASCEND -USA -P'+ @SAPASSWORD + ' -i ' + '"'
set @instatement = @RUNDIR + '\Init\MSSQL\MSSQLInit.sql'
set @instatement = @osqlcommand + @instatement + '"'
select @instatement
exec master..xp_cmdshell @instatement,no_output
This is very slow is there a better way to do this?
how can I do this without going to the shell and running osql each time?
Thanks,
Matt Minnis