Solved

VB.Net - Create SQL Server Alias

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now