Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

is pure tcp/ip connection to SQL Server available ?

BuilderSpec (Programmer)
31 Dec 11 7:49
Hi

I am wondering if it is possible to connect to an instance of SQL Server and query/amend/insert data purely by using TCP/IP socket code ?

The client would be an old OpenVMS system so no SQL tools can be loaded etc it has to be pure socket code. I know SQL Server can communicate over sockets but all examples I see use "sqlcmd" etc which I can't use .

If it is possible can anyone point me in the right direction please ?

I know I could write a listening program on a Windows platform to interface to the database and return my results to OpenVMS application. I just wondered if SQL would let me do that directly some how.


Cheers

 

Hope this helps!

Regards

BuilderSpec

OlafDoschke (Programmer)
31 Dec 11 7:56
I don't think so, SQL Server uses a proprietary protocol I think. Wikipedia says:
http://en.wikipedia.org/wiki/Microsoft_SQL_Server#Protocol_layer

You might check, if you can get any details about the TDS protocol, but I think it would be easier to mae use of the SQL Server API exposed via web services.

I have no expereience on both and think it would be easier, if you would take your own idea of creating a component server side, that does normal communications with MSSQL and forwards results to your legacy system.

Bye, Olaf.
  
OlafDoschke (Programmer)
31 Dec 11 7:59
A starting point for the web service API:

http://blogs.msdn.com/b/mds/archive/2010/02/09/getting-started-with-the-web-services-api-in-sql-server-2008-r2-master-data-services.aspx

It's possible to program that on the socket level, although web services are also surely easier consumed via a .NET client or something else on a higher level than socket programming.

Bye, Olaf.  
TheBugSlayer (Programmer)
3 Jan 12 16:56
Hey BuilderSpec,

I believe CLR stored procedures will give you what you want. You can read on CLR Stored Procedures in SQL Server Books Online (BOL).

Good luck!

MCP SQL Server 2000, MCTS SQL Server 2005, MCTS SQL Server 2008 (DBD, DBA)

BuilderSpec (Programmer)
4 Jan 12 3:44
TheBugSlayer

Thanks for your post. Had a quick look but the CLR stuff still requires some libraries etc to be installed on client system I am guessing.

I am not in a position to install anything , and not due to security more due to the operating system being so old.
I am a very good socket programmer, this is why I wondered if a connection could be established using pure socket code and maybe passing XML strings or something like that and getting XML results back that I can parse on my client side.

It looks like i can't though... thanks for trying

Hope this helps!

Regards

BuilderSpec

gmmastros (Programmer)
4 Jan 12 8:11

Quote:

I am a very good socket programmer

Why not write 2 socket programs?  One could be on the client side, and the other could be on the DB server.  You could use whatever available port you wanted.  The client could pass a query to the socket program on the DB server and that socket program could execute the query and return the results in XML to the client.

It would take extra work, but I see no reason why this wouldn't work.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

BuilderSpec (Programmer)
4 Jan 12 9:19
Hi gmmastros

You are right , i did mention this in my original post. The question more was whether I could do this directly.

Thanks

 

Hope this helps!

Regards

BuilderSpec

gmmastros (Programmer)
4 Jan 12 10:14
Looks like it may be possible to communicate directly with SQL Server, but working at such a low level would be (for me) prohibitively difficult.  It would (in my opinion) be a lot simpler to write a listener on the SQL Server with your own protocol sitting on top of it.

The low level documentation you are looking for can be found here:

http://msdn.microsoft.com/en-us/library/dd304523%28v=prot.13%29.aspx

There are a couple links at the top of the screen allowing you to download the documentation in PDF format.

-George
Microsoft SQL Server MVP
My Blogs
SQLCop
twitter
"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close