Solved

VB.Net - Create SQL Server Alias

Posted on 2003-11-04
3
2,700 Views
Last Modified: 2009-08-28
I'm working on a distributed VB.Net application and I need to know how to create a SQL Server (actually MSDE) alias on the client's computer via code.

Basic process in place right now:

1) Along with application install, I also install a new MSDE instance on client computer.

2) The first time my app runs I create a new database within the instance by sending the "create database..." command through a SqlClient.SqlCommand.

3) Immediately after creating the database I use a SQLMERGXLib.SQLMerge object to create an anonymous internet pull subscription to the parent SQL Server database.

Without an alias, my replication doesn't work because of a combination of Novel communication protocols and our firewall.  I've resolved the issue so that it will work *IF* the Client Network Utility is used to create an alias with the internal network machine name for the parent database.

My problem is that many of the client computers won't have access to the Client Network Utility that comes with the full version of SQL Server and even if they do, I can't trust the end user to correctly configure it.

I'm open to a solution that works with vb.net code directly or by calling a stored procedure in sql-server.
0
Comment
Question by:frodoman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
NetPointer earned 500 total points
ID: 9683365
This Might help u...

http://support.microsoft.com/?kbid=815431

other thing is, i think this information is stored in registry by sql server...if that is the case, then u can use regmonitor tool and create one for testing, thus monitoring which values it is creating...then u can generate those reg keys while installation...

I have never done this, but just as a hint...i also dont know it is behaving that way or not.

Regards,
NetPointer
0
 
LVL 42

Author Comment

by:frodoman
ID: 9686329
NetPointer,

Thanks for the attempt, but I've already read this one.  It did help me in resolving my initial problem, but I can't count on my end-users to install properly configure the Client Network Utility so this solution won't work...

I'll check into the registry suggestion.

Thanks,

Frodoman
0
 
LVL 42

Author Comment

by:frodoman
ID: 9686704
NetPointer,

Registry was a success - thanks much!

For anyone reading this in the future, here's the registry key to set:

   HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

And a list of the protocols and settings can be found here:

   http://support.microsoft.com/default.aspx?scid=kb;en-us;250550
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question