Home > Archive > Microsoft SQL Server forum > July 2005 > MSDASQL to NOTESSQL (odbc)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author MSDASQL to NOTESSQL (odbc)
Don

2005-06-30, 11:23 am


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

I have used sp_dropserver, sp_droplinkedsrvlogi
n
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:\eUR
OPE\Instrument_Base. nsf;Server=Local;Use
rName=XXXXXXXXXXXXX;
EncryptPWD=XXXXXXX;'

go
select * from M...MainForm where description= 'Described Here'


Would like disconnect when this is done.......

Erland Sommarskog

2005-06-30, 8:23 pm

Don (dmorgan@rocketmail.com) writes:
> Within an SQL Script is it possible to send a SQLDisconnect
> command? (server is MSDE)
>
> I have used sp_dropserver, sp_droplinkedsrvlogi
n
> and do not get a SQLDisconnect.


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

> 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:\eUR
OPE\Instrument_Base. nsf;Server=Local;Use
rName=XXXXXXX
XXXXXX;EncryptPWD=XX
XXXXX;'
> go
> select * from M...MainForm where description= 'Described Here'
>
>
> Would like disconnect when this is done.......


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
http://www.microsoft.com/sql/techin.../2000/books.asp
Don

2005-07-01, 3:23 am



Thanks for the link!

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

Thanks for the feedback.....

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com