Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is pure tcp/ip connection to SQL Server available ?

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
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
 
I don't think so, SQL Server uses a proprietary protocol I think. Wikipedia says:

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.
 
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)
 
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
 
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
 
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
 
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:


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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top