Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VB.Net - Create SQL Server Alias

Posted on 2003-11-04
3
Medium Priority
?
2,715 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 2000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

926 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