Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Disconnecting from SQL server

Reply
 
Old 08-08-2007   #1 (permalink)
Sandiyan


 
 

Disconnecting from SQL server

I do the following to connect to a remote SQL server:

$Server = new-object ("Microsoft.SqlServer.Management.Smo.Server")
$RemoteMachine

Whats the method to disconnect from this server - or can we reset/delete
object..?

thanks,
Sandiyan.

My System SpecsSystem Spec
Old 08-08-2007   #2 (permalink)
Oisin Grehan


 
 

Re: Disconnecting from SQL server

On Aug 8, 8:38 am, Sandiyan <sandi...@yahoo.co.uk> wrote:
> I do the following to connect to a remote SQL server:
>
> $Server = new-object ("Microsoft.SqlServer.Management.Smo.Server")
> $RemoteMachine
>
> Whats the method to disconnect from this server - or can we reset/delete
> object..?
>
> thanks,
> Sandiyan.


Hi Sandiyan,

Your post is too incomplete and vague to understand. Please be more
specific with your request, and post more of your script. The two
lines you wrote demonstrate very little of your problem.

Regards

- Oisin

My System SpecsSystem Spec
Old 08-08-2007   #3 (permalink)
urkec


 
 

RE: Disconnecting from SQL server

"Sandiyan" wrote:

> I do the following to connect to a remote SQL server:
>
> $Server = new-object ("Microsoft.SqlServer.Management.Smo.Server")
> $RemoteMachine
>
> Whats the method to disconnect from this server - or can we reset/delete
> object..?
>
> thanks,
> Sandiyan.


SMO will automatically release the connection unless you explicitly use
ServerConnection.Connect method. See these links for some information:

http://technet.microsoft.com/en-us/l.../ms162216.aspx

http://technet.microsoft.com/en-us/l.../ms162132.aspx


--
urkec
My System SpecsSystem Spec
Old 08-08-2007   #4 (permalink)
Oisin Grehan


 
 

Re: Disconnecting from SQL server

On Aug 8, 1:36 pm, urkec <ur...@discussions.microsoft.com> wrote:
> "Sandiyan" wrote:
> > I do the following to connect to a remote SQL server:

>
> > $Server = new-object ("Microsoft.SqlServer.Management.Smo.Server")
> > $RemoteMachine

>
> > Whats the method to disconnect from this server - or can we reset/delete
> > object..?

>
> > thanks,
> > Sandiyan.

>
> SMO will automatically release the connection unless you explicitly use
> ServerConnection.Connect method. See these links for some information:
>
> http://technet.microsoft.com/en-us/l.../ms162216.aspx
>
> http://technet.microsoft.com/en-us/l.../ms162132.aspx
>
> --
> urkec


hah, maybe I should rewrite my post as:

"*my* understanding of SMO is too vague and incomplete to understand
the problem."

;-)

- Oisin

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
IMAP server disconnecting due to timeout Live Mail
Disconnecting .. and other Vista General
disconnecting Vista General
Disconnecting Vista General
Ad-hoc keeps disconnecting Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46