> My freetds.conf file points to SQL Server instance running on VMWare
> using the IP address of the VMware instance:
>
> [MACBOOKPRO_MSSQL]
> host = 172.16.27.10
> instance = MACBOOKPRO
> tds version = 8.0
Interesting, I never knew the conf file took an instance setting.
> Before making any other changes, I started console and tried the
> following statement (after some trial and error)
> client = TinyTds::Client.new(:username => 'user', :password =>
> 'password', :dataserver => 'WIN-MR6B172QT2R\MACBOOKPRO', :adapter =>
> 'sqlserver', :database => 'ISAAC')
Good, your going to want to make sure you can get a connection with a basic TinyTds::Client first before moving on to the adapter. What you find out here will have to translate down to your database.yml file. FYI, there is no :adapter option for a TinyTds::Client. It would just be ignored.
If you provide an instance to dataserver like that, I believe it will look for a DNS entry for the first part, in this case "WIN-MR6B172QT2R". I have no idea what that is. Why not use either one of these. Remember, :host is only used if :dataserver is blank.
:host => 172.16.27.10
:host => 'somednsname'
:dataserver => "MACBOOKPRO_MSSQL"
All three of those should work in isolation.
> I would be grateful for some insight into how I need to properly
> configure TinyTDS to get it to work with Rails 3.0 and ruby 1.9.2.
It should be dead simple. The only thing that could throw you off is that named instance parsing, but the right settings should negate that.
- Ken
- Ken
> --
> You received this message because you are subscribed to the Google Groups "Rails SQLServer Adapter" group.
> To post to this group, send email to rails-sqlse...@googlegroups.com.
> To unsubscribe from this group, send email to rails-sqlserver-a...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rails-sqlserver-adapter?hl=en.
>
Just to make sure, you do not have a freetds.conf file right, nor have you specified a path for one using the FREETDS environment variable?
Can you tell me a little more why or how I can setup a named instance? I just have one VM for each DB, 2000, 2005, and 2008. That you know if, is there a way I can download something and setup up another "instance". I tried googling around to download express, but it seems that it would only want to upgrade my old install on my 2005 machine to 2008. Also, when you have a named instance like that, what IPs are each instance running under?
Lastly, can you set a TDSDUMP environment variable to a path, could be C:\freetds.log and show me what that looks like when trying to connect?
- Ken
I googled around using some hints in that log file and came upon this thread.
http://lists.ibiblio.org/pipermail/freetds/2008q4/023972.html
Can you try verifying that your instance name is correct? Alternately, can you lookup the IP for that instance and just use the :host and :port options with those values to see if that works?
- Ken
- Ken
Thanks for the instructions Joe, I'll follow them sometime this week to get a second instance up on one of my VMs. Jim is on Windows and would be leveraging the latest configuration options in FreeTDS. That means no freetds.conf file. One can be set, but we are moving away from "needing" such a file and allowing all configurations to be passed down at the time the client is initialized.
It is good to know that named instances are just an easy way to not worry about ports. It means we should always be able to be explicit if needed. But I do want to test the latest FreeTDS to make sure configurations like that do indeed work as advertised and then ultimately document the details on our wiki. Will reply back later this week when I have an new installed SQL Server Browser Serviceinstance.