Groups | Blog | Home
all groups > sql server (alternate) > june 2005 >

sql server (alternate) : MSDASQL to NOTESSQL (odbc)


Don
6/30/2005 9:32:18 AM

Within an SQL Script is it possible to send a SQLDisconnect
command? (server is MSDE)

I have used sp_dropserver, sp_droplinkedsrvlogin
and do not get a SQLDisconnect.

Each time I run the script a new nsql32.exe process loads up and they
accumulate.


use Sales
Go
sp_dropserver 'M', 'Droplogins'
go
Exec sp_addlinkedserver 'M', ' ', 'MSDASQL', NULL, NULL,
'DRIVER=Lotus NotesSQL DRIVER
(*.nsf);Database=C:\eUROPE\Instrument_Base.nsf;Server=Local;UserName=XXXXXXXXXXXXX;EncryptPWD=XXXXXXX;'
go
select * from M...MainForm where description= 'Described Here'


Would like disconnect when this is done.......
Don
6/30/2005 7:20:37 PM


Thanks for the link!

I still wish there was a way to do a solid/controlled disconnect.

Thanks for the feedback.....
Erland Sommarskog
6/30/2005 9:43:21 PM
Don (dmorgan@rocketmail.com) writes:
[quoted text, click to view]

That only drops the linked server from the system catalog, and will
not affect any connections use.

[quoted text, click to view]
(*.nsf);Database=C:\eUROPE\Instrument_Base.nsf;Server=Local;UserName=XXXXXXX
XXXXXX;EncryptPWD=XXXXXXX;'
[quoted text, click to view]

If you stop fiddling with sp_addlinkedserver and sp_dropserver, SQL
Server may use an existing connection instead of opening a new one. I
believe the connections are kept around as a means of pooling to avoid
expensive connection sequences.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
AddThis Social Bookmark Button