# Open / Close Connection

**URL:** <https://www.ruby-forum.com/t/open-close-connection/147009>\
**Category:** Rails\
**Created:** [August 27, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/open-close-connection/147009 "2008-08-27T15:11:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CreativeEmbassy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e99b99/32.png) [@CreativeEmbassy](https://www.ruby-forum.com/u/CreativeEmbassy)\
**Post date:** [August 27, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/open-close-connection/147009/1 "2008-08-27T15:11:35Z")

</div>

So I’m introducing Rails to my workplace (enterprise! woo woo), and  
I’m nearly finished with my first application. Because we’re using SQL  
Server, I’m now getting zombie state errors.

Then I saw this post:  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/220840](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/220840)

Here’s my confession, I’m developing on Vista using SQL Server to  
deploy to Windows Server 2008 using IIS. So I know I’m already totally  
off the Rails way. It seem like any other application using SQL  
Server (not including Rails) opens and closes the connection for  
individual transactions. The post I linked to earlier is a guy who  
does exactly that. My question is, what’s the easiest and/or most  
correct way to open and close the connection manually?
