Solved

VB.Net - Create SQL Server Alias

Posted on 2003-11-04
3
2,679 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 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