15,892,005 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by RickiB (Top 4 by date)
RickiB
20-Aug-13 18:50pm
View
Tiaan,
You all right. Yeah, I agree with you about using the registry. It's just not reliable. I found 2 other ways to get it. ServiceController and WMI
Thank You for your help!
RickiB
20-Aug-13 15:40pm
View
Tiaan,
Thanks for your reply. I also tried EnumSqlServersAvailable which I should have mentioned. I commented out the code with the reasons I didn't use it. It is also dependent on the "SQL Server Browser" service to be running. The section below is from MS EnumSqlServerAvailable description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The computer that is running the instance SQL Server might not receive responses to the EnumAvailableSqlServers method in a timely manner. The returned list might not show all the available instances of SQL Server on the network. When you call the EnumAvailableSqlServers method in subsequent tries, more servers might become visible on the network.
This method fails to list the local instance if a firewall is operating on the server. The firewall blocks any broadcast traffic issued when the method is called, even if the sender is from local machine.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This still doesn't help with tying the Server Instance with Services. I also tried using MSSQL$.contains, which only works on Express releases, but the MSSQLEXPRESS service isn't showing up when I extract the Services even though it's running. I chose to use ManagedComputer because it looked like the best option to tie the Instance to the Service.
Thanks,
Rick
RickiB
3-Jan-13 18:54pm
View
Thanks rahkan, that's the ticket! I still must be in vacation mode...
RickiB
21-Dec-12 16:51pm
View
Christian, Thanks for your reply. You're right. Even if I disconnect in Management Studio, it still doesn't log out even after closing Management Studio; I still need to restart the SQL Server Services before starting the VS app. And I couldn't find a log out or disconnect in sqlcmd either without sp_detach_db which causes additional problems.
Thanks again,
Rick