Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
imarchenko
Yak Posting Veteran
57 Posts |
Posted - 2007-11-12 : 19:32:03
|
Hello!I have noticed that on one of SQL Servers (SQL 2000 SP4) after I run following script SQLDMO connections are not destroyed:declare @objDMO intdeclare @objDatabase intdeclare @resultCode intdeclare @dbname varchar(200)declare @tablename varchar(200)declare @cmd varchar(300)declare @temp varchar(8000)Set @dbname = 'PUBS'Set @tablename = 'Authors'EXEC @resultcode = sp_OACreate 'SQLDMO.SQLServer', @objDMO OUTif @resultcode = 0print 'Created Object'Exec @resultcode = sp_OASetProperty @objDMO, 'loginsecure', 'true'EXEC @resultcode = sp_OAMethod @objDMO, 'Connect', NULL, '(local)'if @resultcode = 0print 'connected'Set @cmd = 'databases("' + @dbname + '").tables("' + @tablename + '").script'Exec @resultcode = sp_OAMethod @objDMO, @cmd , @temp OUTPUT, 4print @tempEXEC @resultcode = sp_OADestroy @objDMOif @resultcode = 0Print 'destroyed object'I do see 'destroyed object' message. But if I run following query I can see connections piling up:select * from master..sysprocesses where spid>50 and program_name like 'SQLDMO%' As a result, at some point SQL server is accumulating hundreds of SQLDMo connections. This is only happening on one server. I ran tests on others and everything was fine.Any help is greately appreciated,Igor |
|
|
|
|