Programmer's Corner Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Programmer's Corner - Forums


Using SQL Server Express as a real server

 
Post new topic   Reply to topic    Programmer's Corner Forum Index -> SQL Server 2005
Author Message
ModusPonens
if A then B, if B then C...


Joined: 22 Oct 2004
Posts: 368
Location: Baltimore

PostPosted: Mon Oct 16, 2006 9:36 am    Post subject: Using SQL Server Express as a real server Reply with quote

Can I set up SQL Server Express on a Windows Server and have multiple users access it just like the full SQL Server? If so, what are the limitations?
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Mon Oct 16, 2006 8:56 pm    Post subject: Reply with quote

No, you can only access SQL Server Express from the local machine. However, you could create a small server app that acts as your data access layer. You could then have your clients connect to it, and it could pass on requests to the server. Depending how many users you are planning on having, this might or might not be a good setup.
Back to top
xardoz
Ashigaru


Joined: 31 Dec 1969
Posts: 108
Location: Napavine, WA USA

PostPosted: Mon Oct 16, 2006 9:29 pm    Post subject: Reply with quote

Interesting...tell us more, how about a complete app Razz
Back to top
bdi
Nobody


Joined: 21 Oct 2004
Posts: 1646
Location: Chicago

PostPosted: Tue Oct 17, 2006 2:09 am    Post subject: Reply with quote

Not real well schooled on creating the complete app. I'd go something like this though as far as design:

Listener - This class is what holds your port open and listens for requests. I would guess you would want some sort of simple authentication to know that it is your app talking to it, and not a hacker (yes, even on a local network, although you could do simpler authentication if you know the environment is safe).

ConnectionManager - This is a detail about building a server I'm not sure about. I would imagine you need something to manage the connected clients and track them.

InputQueue - This would just be a FIFO queue for queueing up the messages from the listener. Not a lot going on here.

CommandInterpreter - This would get the messages from the input Queue and Interpret them into the sql commands.

Parser - This would have different functions for processing the actual SQL commands and running them against the server. I would make it take stored procedures rather than just running straight SQL. That way, even if someone hacks in, they can only run the stored procedures you have setup.

OutputQueue - The Parser could dump the results into the output Queue. From there the connectionmanager could watch for the data it's waiting on and send it back.

With .NET you can fairly easily turn your dataset into XML and stream it back to your clients.

Of course, all that said, it might be easier to just build an ASP.NET application. I was messing around with it and took the majority of the backend to my app and was accessing it. Just had to change the forms, and a few other minor issues that were coming up.

btw... that was just brainstorming and trying to think through the process, so if anyone wants to add to it or list a better way for something or even some catchphrases, feel free.
Back to top
ModusPonens
if A then B, if B then C...


Joined: 22 Oct 2004
Posts: 368
Location: Baltimore

PostPosted: Wed Oct 18, 2006 1:12 pm    Post subject: Reply with quote

It's a shame I can't use it as a server, but it makes sense (commercially) that it wouldn't be allowed.

Good idea about have an agent in between the sql server and the program.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Programmer's Corner Forum Index -> SQL Server 2005 All times are GMT - 5 Hours
Page 1 of 1

 


Powered by phpBB © 2001, 2002 phpBB Group