T-SQL:
Declare @db_name varchar(250)
Declare c_db_processing Cursor For
Select [name] from master.sys.databases order by name asc
Open c_db_processing
Fetch c_db_processing INTO @db_name
While @@Fetch_Status = 0 Begin Print('USE ['+ @db_name + '] Exec sp_updatestats' + '' + Char(10) + 'GO') Fetch c_db_processing Into @db_name End
Close c_db_processing Deallocate c_db_processing
|
|
|
|
|