Executing MSSQL-Queries on linux fedora 8.0
Hi there,
I have two machines.
One running linux and another running windows.
I am running my web site on linux with xampp server and i want to use the database thatis mssql-2005 installed on windows.I have no option of shifting to mysql bcz fromer company database is on mssql.
So please suggest me some solution....
I hav tried connecting with FreeTDS 0.61.2.
Initially, I install FreTDS on my Fedora machine as follows:
1) unzip file by issuing the following commands:
tar xvfz FreeTDS-0.61.2.tar.gz
2)From the /public folder, issue:
cd FreeTDS-0.61.2
3) This is what I used for the installation of FreeTDS:
./configure --prefix=/usr/local/freetds --sysconfdir=/usr/local/freetds --with-tdsver=7.0 --enable-msdblib --enable-threadsafe --enable-sybase-compat
4) Next, we compile the module tree, issue the following:
make
And install FreeTDS by issuing:
make install
5) change directory to this folder, and issue:
cd /usr/local/freetds
6) Edit freetds.conf:
gedit freetds.conf
7) I have a windows box running MS SQL Server 2005 on it. The machine name is LAB6-16 with IP address 192.168.x.xxx. Append the following part to FreeTDS.conf, and save it:
[LAB6-16]
host = 192.168.x.xxx
port =1433
tds version = 7.0
Change to the bin folder under /usr/local/freetds, and issue:
tsql -S 'LAB6-16' -H '192.168.x.xxx' -p '1433' -U 'sa' –P '123456'
BUT instead of prompting 1> it returns ERROR as follows:
locale is "en_US.UTF-8"
charset is "UTF-8"
src/tds/login.c: tds_connect: 192.168.x.xxx:1433: Network is unreachable
Msg 20009, Level 9, State 0, Server OpenClient, Line 0
Server is unavailable or does not exist.
There was a problem connecting to the server
Can any body solve this problem or is there any other way to connect MSQL 2005 with Linux.
Please reply to amanjain17@gmail.com
Trending Topics
| You Need A Budget | Feb 10, 2012 |
| The Linux powered LAN Gaming House | Feb 08, 2012 |
| Creating a vDSO: the Colonel's Other Chicken | Feb 06, 2012 |
| Your CMS Is Not Your Web Site | Feb 01, 2012 |
| Casper, the Friendly (and Persistent) Ghost | Jan 31, 2012 |
| Razor-qt 0.4 - Qt based Desktop Environment | Jan 30, 2012 |
- Fun with ethtool
- Parallel Programming with NVIDIA CUDA
- Readers' Choice Awards 2011
- 100% disappointed with the decision to go all digital.
- Linux-Based X Terminals with XDMCP
- Validate an E-Mail Address with PHP, the Right Way
- You Need A Budget
- The Linux powered LAN Gaming House
- Why Python?
- Python for Android
- Employment Posters
3 hours 43 min ago - Sure the best distro is
5 hours 4 min ago - BeOS was the best
7 hours 47 min ago - I use Wireshark on a daily
12 hours 18 min ago - buena información
17 hours 24 min ago - One important "bucket" that I didn't note (désolé si qqun deja d
18 hours 25 min ago - Gnome3 is such a POS. No one
1 day 3 hours ago - Gnome 3 is the biggest POS
1 day 4 hours ago - I didn't knew this thing by
1 day 10 hours ago - Author's reply
1 day 13 hours ago





Hi, About your problem with
Hi,
About your problem with Freetds, amanjain17.
I can only give you a guess based on the "error messages" and crossed with my own experience.
1st.) There is no need to configure "/etc/freetds.conf" in order to use
tsql.
I can say that since I was able to make up successfulls connections
on MSSQL 7.xx and nexts from fedora 8 and 10 with the conf file
resume at its strict minimum.
This is meaning in the [global] section there was only the
"text size = 64512" pair enabled and the ALL the rest ;REMed.
This first pair is NOTHING about your problem and only have use about
some case of "out-of-memory"
The others section [egServer50] and [egServer70] are examples for
typically a Sybase server and a Microsoft server and are ONLY provided
as EXAMPLE !
2nd) In My case... The machine hosting the MSSQL db is "ws-21-winxp".
My command line is:
- tsql -S ws-21-winxp -U admintest4 -P "password"
and the answer is :
locale is "en_US.UTF-8"
locale charset is "UTF-8"
1>
1> use MyDBinsteadofTheMasterOne
2> go
1>
The following queries work to perfection.
If I connect giving the IP I MUST to specify the port too.
- tsql -H 10.55.10.21 -p 1433 -U admintest4 -P "password"
If the port is not specified it does NOT connect.
That's for the LINUX side.
In the Windows side:
I had to do a couple of things too.
a) open the 1433 port on the firewall
b) run the SQL Server Network Utility
"C:\Programs Files\Microsoft SQL Server\80\Tools\binn\SVRNETCN.exe"
and make sure that :
- TCP/IP is enabled as protocol,
- Server is visible (check box)
c) the name of workstation is foundable on the LAN.
This done, it HAVE to work !
My advice is, since You use a Fedora box, install Freetds from YUM or SMART.
In the yum case:
- yum -y install freetds
In the smart case:
- smart install freetds
If smart is not installed : yum -y install smart smart-gui fedora-package-config-smart (but I believe the last package is installed auto from dependencies. ...but it cost nothing to put it too on the command line)
I close with the most important, the interpretation of the error message.
THE SERVER WAS NOT REACHED
it is not an authentication problem but HOW communication could or could not be done!
found the rpm in : for (F10)
http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everythin...
and the doc in
http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everythin...
Gone to send you this ingo by mail too.
Hope give some help.