programmatically allow tcp/ip to msde

M

Matt Fielder

Posting this here as MS has informed me that
microsoft.public.dotnet.languages.vb.data is not a supported group, but this
one is. (seems odd since it's on their server and is a sub of this group,
but I do need an answer)

My application deploys with MSDE (2000). Currently it's strictly single
user, but I'm working on a multi-user version now. In order for one machine
to connect to the other, I must run the svrnetcn.exe utility and enable
tcp/ip on the host. Obviously asking my users to do this isn't an option.
How do I enable tcp/ip access programmatically at the host?
 
M

Matt Fielder

I'm using Visual Studeio 2005 Professional ---

I'm guessing you may be asking because your wondering why MSDE instead of
SQL Express (2005) - the problem is this is for a downloadable application,
, so the size of the install matters. Unfortunately, the install for SQL
2005 is almost triple the size of MSDE.
 
G

Guest

I'm guessing you may be asking because your wondering why MSDE instead
of SQL Express (2005) - the problem is this is for a downloadable
application, , so the size of the install matters. Unfortunately, the
install for SQL 2005 is almost triple the size of MSDE.

If you want a small database, have you taken a look at Embedded Firebird?
Works quite well with .NET. MySQL is pretty small too :)
 
C

Charles Wang[MSFT]

Hi,
Thanks for using Microsoft Online Managed Newsgroup.

From your description, I understand that:
You wanted to enable TCP/IP protocol of your MSDE instance programmatically.
If I have misunderstood, please let me know.

I believe this article is your want:
How to configure the SQL Server Network Libraries by using SQL-DMO
http://support.microsoft.com/default.aspx?scid=kb;EN-US;822642

If your SQL Server instance were SQL Server 2005 Express, you can use SQL
SMO to manage the protocol and it seems easier:
Dim mc As New ManagedComputer()
mc.ServerInstances("SQLEXPRESS").ServerProtocols("Tcp").IsEnabled = true;
mc.Services("MSSQL$SQLEXPRESS").Stop()
mc.Services("MSSQL$SQLEXPRESS").Start()

For using SQL Server Smo, you need to add the references:
Microsoft.SqlServer.Smo
Microsoft.SqlServer.SmoEnum
Microsoft.SqlServer.SqlEnum
Microsoft.SqlServer.ConnectionInfo

Hope this helpful!

Please feel free to let me know if you have any other questions or
concerns. It is my pleasure to be of assistance.

Charles Wang
Microsoft Online Community Support

======================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top