How do i get a list of SQL Servers from network?

Hi everyone,
I'm trying to get a list of SQL Servers from the network and put them into a drop-down combo box. I try to search on Google and i can only find some C# source codes which doesn't help me at all. I'm wondering if JAVA has the similar method to do so.
btw, I'm using MSSQL Server 2005, JDBC 1.2, JDK 1.6.0_24
thanks

jschell wrote:
flyto9 wrote:
I'd been told to create a user friendly no brainer user interface In typical business scenarios involving databases that is ridiculous.
A company that has multiple database servers must ALREADY understand the complexities of managing and using those databases.
true, but you know as well as I do that requirements documents are usually not written by people with the least understanding on those complexities...
And if a company assigns such a project to someone like OP who clearly doesn't know how to deal with such requirements documents, that only shows their morosity all the more clearly :)
Assuming that I'm able to find a list of TCP connections on network, how do I know which of them are sqlserver?That isn't what I said. A "protocol" is a description of a methodology involving functionality and communication which solves a particular problem.
There is a "protocol" which describes how to find MS SQL Servers. You don't make it up yourself. You find the description, read what it says and implement it.Or more likely (like Oracle) there's no such security problem in MS SQL Server and instead it relies on the client knowing the connection details or it'll never find them.

Similar Messages

  • How can I get a list of database names from environment

    Hi,
    How can I get a list of database names from environment.
    I had found a method in JE API Docs named Environment.getDatabaseNames(), and i couldn't found the same method in Berkeley DB.
    I use java interface, is it supported?
    Thanks.

    Hello,
    I don't know if it would work for you, but have you checked the db_archive utility at:
    http://download.oracle.com/docs/cd/E17076_01/html/api_reference/C/db_archive.html
    Check the -s option.
    Thanks,
    Sandra

  • List all SQL servers on network

    Hello,
    I'm trying to find a way to produce a list of all the SQL servers running on a network and have been looking at the SQLDataSourceEnumerator GetDataSources method. However there is a note saying this may not show all the SQL servers and may return a different list each time it is called. I would be grateful if anyone has anymore information on why this will not always return a complete list and may be different each time or if anyone knows if there is a way I can get a list of SQL servers that is more consistent?
    Thanks,
    Caroline

    u can execute this code
    Set NoCount On
    Declare @CurrID int,@ExistValue int, @MaxID int, @SQL nvarchar(1000)
    Declare @TCPPorts Table (PortType nvarchar(180), Port int)
    Declare @SQLInstances Table (InstanceID int identity(1, 1) not null primary key,
                                              InstName nvarchar(180),
                                              Folder nvarchar(50),
                                              StaticPort int null,
                                              DynamicPort int null,
                                              Platform int null);
    Declare @Plat Table (Id int,Name varchar(180),InternalValue varchar(50), Charactervalue varchar (50))
    Declare @Platform varchar(100)
    Insert into @Plat exec xp_msver platform
    select @Platform = (select 1 from @plat where charactervalue like '%86%')
    If @Platform is NULL
    Begin
    Insert Into @SQLInstances (InstName, Folder)
    Exec xp_regenumvalues N'HKEY_LOCAL_MACHINE',
                                 N'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL';
    Update @SQLInstances set Platform=64
    End
    else
    Begin
    Insert Into @SQLInstances (InstName, Folder)
    Exec xp_regenumvalues N'HKEY_LOCAL_MACHINE',
                                 N'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL';
    Update @SQLInstances Set Platform=32
    End  
    Declare @Keyexist Table (Keyexist int)
    Insert into @Keyexist
    Exec xp_regread'HKEY_LOCAL_MACHINE',
                                  N'SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\Instance Names\SQL';
    select @ExistValue= Keyexist from @Keyexist
    If @ExistValue=1
    Insert Into @SQLInstances (InstName, Folder)
    Exec xp_regenumvalues N'HKEY_LOCAL_MACHINE',
                                  N'SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server\Instance Names\SQL';
    Update @SQLInstances Set Platform =32 where Platform is NULL
    Select @MaxID = MAX(InstanceID), @CurrID = 1
    From @SQLInstances
    While @CurrID <= @MaxID
      Begin
          Delete From @TCPPorts
          Select @SQL = 'Exec xp_instance_regread N''HKEY_LOCAL_MACHINE'',
                                  N''SOFTWARE\Microsoft\\Microsoft SQL Server\' + Folder + '\MSSQLServer\SuperSocketNetLib\Tcp\IPAll'',
                                  N''TCPDynamicPorts'''
          From @SQLInstances
          Where InstanceID = @CurrID
          Insert Into @TCPPorts
          Exec sp_executesql @SQL
          Select @SQL = 'Exec xp_instance_regread N''HKEY_LOCAL_MACHINE'',
                                  N''SOFTWARE\Microsoft\\Microsoft SQL Server\' + Folder + '\MSSQLServer\SuperSocketNetLib\Tcp\IPAll'',
                                  N''TCPPort'''
          From @SQLInstances
          Where InstanceID = @CurrID
          Insert Into @TCPPorts
          Exec sp_executesql @SQL
          Select @SQL = 'Exec xp_instance_regread N''HKEY_LOCAL_MACHINE'',
                                  N''SOFTWARE\Wow6432Node\Microsoft\\Microsoft SQL Server\' + Folder + '\MSSQLServer\SuperSocketNetLib\Tcp\IPAll'',
                                  N''TCPDynamicPorts'''
          From @SQLInstances
          Where InstanceID = @CurrID
          Insert Into @TCPPorts
          Exec sp_executesql @SQL
          Select @SQL = 'Exec xp_instance_regread N''HKEY_LOCAL_MACHINE'',
                                  N''SOFTWARE\Wow6432Node\Microsoft\\Microsoft SQL Server\' + Folder + '\MSSQLServer\SuperSocketNetLib\Tcp\IPAll'',
                                  N''TCPPort'''
          From @SQLInstances
          Where InstanceID = @CurrID
          Insert Into @TCPPorts
          Exec sp_executesql @SQL
          Update SI
          Set StaticPort = P.Port,
                DynamicPort = DP.Port
          From @SQLInstances SI
          Inner Join @TCPPorts DP On DP.PortType = 'TCPDynamicPorts'
          Inner Join @TCPPorts P On P.PortType = 'TCPPort'
          Where InstanceID = @CurrID;
          Set @CurrID = @CurrID + 1
      End
    Select serverproperty('ComputerNamePhysicalNetBIOS') as ServerName, InstName, StaticPort, DynamicPort,Platform
    From @SQLInstances
    Set NoCount Off

  • How do I get a list of assets (AssetIDList) from a library?

    I've been looking through the SDK documentation and samples for a way to delete all the assets in a libary. I've got a pointer to the library (ILibrary *) and the command ILibraryCmdUtils::ProcessLibraryDeleteItemsCmd() which takes an asset list and the library pointer.
    The part I can't work out is how to get the asset list (AssetIDList) from the library to pass to the above command.
    Some ideas are:
    ILibraryScrapData - but I don't know how I can get a pointer to this and if I could is it simply a case of calling SetLibrary() followed by GetAssetList()?
    AssetLibUtils.h - not documented, so no idea how to use the classes or functions.
    I expected this to be a trivial task, but so far finding solutions to this and other seemingly simple tasks is proving very frustrating! Could someone point me in the right direction?
    Thanks in advance.
    APMABC

    Solved it at last! It turns out that the 2nd idea is the way to go.
    There is some sample code in source\open\components\buttonui\utils\FormFieldUIUtils.cpp FormFieldUIUtils::AdjustStylePresetMenu() that shows how you can get an ILibraryAsset pointer for each asset in the library. So I just use AssetIDList::push_back( ptrAsset->GetID() ) to build up an AssetIDList that can be passed to ILibraryCmdUtils::ProcessLibraryDeleteItemsCmd().
    Why Adobe can't just have a GetAssetList() function for ILibrary I've no idea! I'm also troubled by the fact that as AssetLibUtils.h is undocumented, Adobe might decide to remove it in future SDK builds.
    void MyLibraryClass::DeleteAssets()
        class LibraryAssets : public AssetEnumerator
        public:
            AssetIDList m_AssetList;
            LibraryAssets() {}
            virtual bool operator()(ILibraryAsset *ptrAsset)
                m_AssetList.push_back( ptrAsset->GetID() );
                return true;
        LibraryAssets LibraryAssetsToDelete;
        AssetLibUtils::EnumerateAssets( m_ptrLibrary, &LibraryAssetsToDelete );
        if (LibraryAssetsToDelete.m_AssetList.size() > 0)
            // Create and process command to delete items from library...

  • How do I get a list of cameras names from MAX to use in a CVI app?

    I wish to avoid any confusion in selecting cameras to use in my CVI application, so I'm looking for a way, from within my app, to get the list of camera names as set up in MAX. Then I can populate a listbox and the user can choose their camera without having to guess or refer to an external listing for the MAX name. The selected name will then be passed to IMAQdxOpenCamera.
    Thanks!

    Found it! (Should have looked in the hardware boards first, but it seemed to be a software question.) Anyway, use IMAQdxEnumerateCameras.

  • How can I get a list of OOB Site from a SharePoint WebApplication using Powershell Script

    Hi,
    Could anybody help on this?
    Thanks,
    Srabon
    srabon

    You can include the WebTemplate parameter in the select, from that you will get the template ID for all sites.
    I am sure you know the custom template IDs then just filter / use if else to get the desired results.
    check this blog, track inventory session.
    http://sharepointpromag.com/sharepoint-2010/inventorying-sharepoint-using-powershell
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • How can I get a list of active savepoints for the current session?

    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"
    So how can I get a list of active savepoints for the current session?
    Could you please also let me know if there is any better way to debug this issue.
    Appreciate any quick response as the issue is very critical.
    Thanks,
    Soma

    user776523 wrote:
    Hi,
    In Oracle Applications, we are getting the following error while performing ROLLBACK to a Savepoint.
    "Unexpected Error: ORA-01086: savepoint 'PTNR_BULK_CALC_TAX_PVT' never establishe d ORA-06510: PL/SQL: unhandled user-defined exception"It sounds like there's an execution path in the code where the SAVEPOINT is never issued.
    There is no way to get a list of active savepoints. Is this your code or a "canned" procedure? If it is your code you can go through the code looking for answers, possibly tracing execution using DBMS_OUTPUT.PUT_LINE or writing messages to a log table. If its a "canned" procedure you may need to open an SR with Oracle

  • How can I get a list of apps which are supported on ipod touch model ma623zo?

    How can I get a list of apps which are supported on ipod touch model ma623zo?
    It's about 6 years old I think.
    I have put the latest IOS on there (currently 3.1.3 (7E18)).
    I download apps from the app store but they often fail to launch. I assume they're incompatible.
    Is there a way to check which apps will work and which won't before I buy them?
    Thanks!

    I have no idea how my reply could be "misleading". I stated the exact situation: there are millions of apps in the iTunes Store, and providing a comprehensive, accurate list of which apps support which version(s) of iOS would be highly impractical. You can perhaps help with your search by going to AppShopper:
    http://appshopper.com/search/?search=iOS+3
    That will give you at least some starting points, but AppShopper is neither comprehensive nor completely accurate. I've found a number of apps listed there over the time the site has existed that either are no longer offered or which have been updated beyond the iOS version indicated. But it might help.
    Regards.

  • How do i get a list of all the apps i have purchased this year

    how do i get a list of all the apps  have purchased this year and how much each app was

    Check your iTunes purchase history (click your email address in the upper right corner in the iTunes App Store-> log in -> click Purchase History).  This gives you a comprehensive list of apps you've purchased.
     Cheers, Tom

  • How do I get a list of current activations for my license?

    We have a company license which we use for multiple installs.  Over time, we have replaced and/or reimaged PCs and reinstalled and activated the software.  We just started getting a warning that license have been exceeded.  We were unaware it needed to be deactivated on decommissioned machines.  How do we get a list of activated machines and reconcile that with the machines which have had it removed or been reimaged and activated again?

    Hi,
    There is not tool available for external use to keep check of your activations.
    You have to manually keep track or you may contact customer service to check activation count on product.
    Regards,
    Ajlan Huda.

  • How do i get a list of all Roles defubed under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?

     

    Sorry for the typographical mistake.
    Please read the question as:"How do i get a list of all Roles defined under a particular OrganizationalUnit? How can i use LDAPConnection.search method for this?"

  • HT1420 how can I get a list of the computers that are currently authorized?

    I need to authorize my home computer after switching from PC to Mac. How can I get a list of which devices are currently authorized?

    There is no list.

  • Hi ,How can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm or poerwshell . i have struggled for a week.

    Hi ,how can I get a list of all laptops or users with folder direction enabled or offline files enabled, be it sccm
    or poerwshell . i have struggled for a week
    tchocr

    Hi,
    There is no such PowerShell command can achiev this. Maybe you can use a script to get the user name with folder redirection enabled. However, I am not familiar with writing script, and it would be better for you to ask in script forum below for professional
    assistance:
    http://social.technet.microsoft.com/Forums/en-US/home?forum=ITCG&filter=alltypes&sort=lastpostdesc
    Best Regards,
    Mandy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How can I get a list of active users on an AS Java platform on a cluster?

    Hello Experts,
    I have an AS Java NetWeaver CE v7.1 EhP1 SP3 system and it's running in a cluster.  Do you know how I can get a list of all users that are currently logged in or whom have active sessions on each application server instance?
    Thanks,
    Sam

    > I don't know how to get classes used by VA for this tab.
    I wouldn't make any development investments based on classes for the VA anymore...
    Considering that not only Salvatore himself, but also the JControl might decide for itself that the system needs a hard shutdown and restart.. a possibly better solution would be to use a redirect. If the message server does does not respond or does not find any DIs or not the one which your previous session state was for, then redirect to a page with a meaningfulll message (and apology on it.
    Just a thought,
    Cheers,
    Julius

  • How can I get a list of purchased apps?

    Recently restored my iPhone from backup, and I need to download my apps.  How can I get a list of apps that I've downloaded/purchased?
    If I search for an app via the app store that I had previously installed, the Install icon turns into a Cloud with a down arrow symbol on it - there must be a way to get a list of all of these right?
    Anyone clever enough to solve this riddle?

    Open the App Store app, go to the Updates pane and tap Purchased.

Maybe you are looking for

  • Got a new Mac, my iTunes is whack, (No Play Count or Date Added)

    Hello, everybody. It's been a rough night. I currently own a G4 iMac and I just got a brand new Macbook. The Macbook is very nice, it's extremely speedy and I am sure I will grow to love it. We've got just one hurdle to get through together: the orga

  • How to fix an ipod shuffle that won't turn on or charge?

    I have an ipod shuffle 4th generation.  Plugged it in but took it out without ejecting.  Now, it won't recognize in itunes and won't charge or turn on.  What can i do to fix this?  I have the latest itunes and I have reset the shuffle several times.

  • Print with manual duplexing?

    I have a HP Photosmart C6180 connected to my home network wirelessly. Under Windows, I have the option to perform a manual duplex whenever I print. What this does is it prints one side of all the pages, then a message pops up on the screen to flip th

  • Tag files cannot display in Tags

    I tagged five files, but in tags it only display three. Why

  • Do you plan support SAP BO XI Mobile for Unix!?

    Hello! Could you help to know answers to following questions please? 1. Does  SAP plan support SAP BO XI Mobile for Unix!? 2. Can I install SAP BO XI Enterprise server on Unix machine and  SAP BO XI Mobile install Windows machine? Is it correct confi