Retrieve available server names for MS SQL server
hello
Can somebody tell me how I can retrieve available server names for MS SQL server.
When MS SQL server loads it asks for server name to connect but on the same time has a combobox with the available server names(instace+database name). How can I provide the same functionality in my application?
Thank you in advance.
It isn't going to be as simple as just the name.
There are also different ways to connect and probably other parameters as well.
SQL Server Enterprise Manager probably uses a discovery protocol. It probably sends one or more messages requesting information and those servers that want to respond.
Note that none of that has anything to do with JDBC and discovering how it does that probably isn't easy. A packet sniffer might help.
Similar Messages
-
How to retrieve available (server)-IP addresses on a LAN
Is there a method to get all/the available (server)-IP-address(es) on a LAN from the host program?
As far as I understood the samples (e.g. in tcpex.llb) the host (or it's operator) has to know the IP-address of the server to start communication. However it would ease the usage of a host-program if all/the available server(s) could be selected e.g. from a list-box.
I posted this question already yesterday with some additional explanations however couldn't find it in my "posted questions"-list. So I try again.You don't tell us enought about the type of "servers" you mean. Are these all LabVIEW programs? In this case it should be relatively easy for them to keep each other updated at regular interval, e.g. via UDP multicasts.
Alternatively, your servers can announce themselves via a UDP packet to the subnet broadcast address and to a specific port.
If these are servers with code not under your control, you need to probe them. This is not such a big deal on your private LAN and I don't think it will trigger IDS systems. Keep a short list of all possible server IPs, then try to connect at the specified port at regular intervals using a short timeout.
Are you communicating with TCP or UDP?
In the absence of firewall code, you can have 3 possible responses for TCP:
(1) No response --> The server computer is down (or there is a stealth personal firewall running). You get a TCP timeout error.
(2) Active rejections (TCP RST packet) --> The server computer is up, but the server program is not running. Nothing is listening on the target port. You'll get an error.
(3) Accepted connection (SYN-ACK) packet. --> The server is up and listening for connections. The threeway handshake can be completed. No error.
UDP is a bit trickier, because it is connectionless. Many UDP services are one-way. For example a syslog server just receives packets, it never acknowledges anything.
It is easy to tell if the server computer is up, but the service is not listening. In this case you get an ICMP(3,3) response and an immediate error.
If the service is listening, you either get nothing or a specific response, depending on the type of server. If you are waiting for return traffic, you'll get a timeout error in UDP read either way.
(If you just want to check if the server computer is actually up, probe it on a unlikely high port that virtually guarantees an ICMP(3,3) response in the absence of a personal firewall program.)
LabVIEW Champion . Do more with less code and in less time . -
How retrieving the product key for a SQL Server 2005 installation
Hi,
is it possible to retrieve the product key associated to a SQL Server 2005 installation?
If yes, how?
Many thanksHello,
The following tool may provide you the product key for SQL Server 2005 and SQL Server 2008 instances.
http://www.nirsoft.net/utils/product_cd_key_viewer.html
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Non-Geeky name for "Oracle SQL Developer"
At my work place people (mostly non-developers) are using MS-Query to access Oracle database to query and analyses data.
I asked them to use "Oracle SQL Developer", then their response is "It may be complicated, and we are not Developer".
Current name implies user need to be developer, and need to know SQL etc.
Cant we have a non-geeky name?
"SQL Server Management Studio", "MS-Query", "DBDesigner", "TOAD" all sounds non-geeky.
May be "Oracle Data Studio" is better.It has been named "Raptor" before it became SQL-Developer. Just rename the link for your co-workers if they think they cannot use a tool because of its name.
Regards
Marcus -
Retrieving Source Column name for a target
Hi
I have a requirement where in if an interface errors out because of some constraint violation in the target column, the error message should contain the following details
a. One lined Error message (Not with the ORA codes and complete details)
b. The source column mapped to the tarteg column that has violated the constraint.
c. The exact row where the error has occured while transferring the data.
I am using IKM SQL Control Append and as per the requirement the Flow Control is set to 'No'
Kindly help me resolve this issue.
ThanksHi Nidhish,
You can configurate all those information using a ODI constraint (type "User Constraint") at target datastore.
Did you already try it? -
Hi All,
I need to retrieve the folder name for where the item is stored to generate a report in following format in csv
File Name Full Path Parent Folder Created By Last Modified By Number of Versions Total Size
My code which gets all other info.
function Get-DocInventory() {
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site=Get-SPSite -Identity "siteURL"
foreach ($web in $site.AllWebs) {
foreach ($list in $web.Lists) {
if ($list.BaseType -ne "DocumentLibrary") {continue}
foreach ($item in $list.Items) {
$data = @{
# "Web Application" = $webApp.ToString();
#"Web" = $web.Url
"Site" = $site.Url
"list" = $list.Title
"Item ID" = $item.ID
"Item URL" = $site.Url+"/"+$item.Url
"Item Name"= $item.File.Name
“Item Versions” = $item.Versions.Count
"Item Created" = $item["Created"]
"Extensions" = $item.name.split(".")[1]
"Item Modified" = $item["Modified"]
"Item Created By" = $item["Author"]
"Last Updated by" = $item["Editor"]
"File Size" = $item.File.Length/1KB
New-Object PSObject -Property $data
$web.Dispose();
$site.Dispose()
#Get-DocInventory | Out-GridView
Get-DocInventory | Export-Csv -NoTypeInformation -Path D:\Scripts\Hemant\inventory.csv
Coukld you please help me get folder name
Thanks BasvaTo get the full Folder URL you could use:
$item.File.ParentFolder.Url
And just for the Folder Name use:
$item.File.ParentFolder.Name -
Hi,
I am trying to retrieve the WSDL file for Funnel & Forecast- however the when I download the Funnel & Forecast "Download Custom WSDL", none of the fields from Funnel & Forecast can be found in that document.
Is there any other place I can retrieve the WSDL names for Funnel & Forecast?
Thanks,
TasmiHI,
The following function module is responsible to generate proxy in back ground,
i.e SPRX_BCKG_CREATE_OR_CHANGE.
plese check the source code u get the functional of SPROXY.
warm regards
mahesh. -
Retrieve item-descriptor name from SKU id ...?
Hi All,
i want to retrieve item-descriptor name for the given SKU id..? Could you pls tell..?
Thanks,
VishnuHi,
With ATG 10, this method is replaced by getItem(String,String). If the second argument, i.e. the descriptor name is unknown, then use getItem(String,getDefaultViewName()).
So you can use,
repository.getItem(skuId,repository.getDefaultView()).getItemDescriptor().getItemDescriptorName();
Hope this helps.
Thanks,
Gopinath Ramasamy -
JDBC Url for connecting SQL Server Alias name
Hi All,
I am having a SqlServer Databse Instance for that we have created "alias name".
i am unable to connect to that particular alias name.
please can any one though light on this plz.
Edited by: mahesh512 on Jun 17, 2009 6:48 PMIf i am geussing right, you mean that you have created a TNS Name for your Database Server.
If you are accessing it from your DB Client via the TNS name, maybe the CLient is configured to contact a TNS Server to retrieve the IP if the server.
Your JDBC Driver does not do that. Either use the IP of the DB Server or provide a Source for the Driver to look up the IP via the TNS Name.
How this is accomplished deplends on your Database. -
Are all features available in Power BI for office 365 available in On-Premise Excel, SQL server etc
Thanks
NateNo. The tools used to create Power BI reports are available in the on premises versions:
Power Query
Power Pivot
Power Map
Power View
To take advantage of these in a PowerBI site, or to use Q&A you need a subscription to Office365 with a PowerBI license. -
How to Retrieve Server Name for creating connection pool during startup!
Hi All,
I am going thru the edocs documentation of weblogic for creating the connection pool and the datasource dynamically. The URL I referred to was as under
http://edocs.bea.com/wls/docs81/jdbc/programming.html
There is a sample given in the above-mentioned URL. The Server MBean is created by passing the server name.
The code below mentioned was have placed in my dblib.java
svrAdminMBean = (ServerMBean)adminMBeanHome.getAdminMBean("myserver", "Server");
I am creating the connection pool from the servlet by invoking the dblib.java
I cannot hard-code the server name in the dblib.java since the same code was shared across multiple servlets.
Each Servlet will create its own connection pool during application server startup.
Is there a way to retrieve the server name in which the dblib.java is invoked.
Any pointers to info source will be REALLY appreciated.
Many Thanks in Advance,
C R BaradwajYou can get it from the Java system property weblogic.Name, i.e. System.getProperty("weblogic.Name");
Cheers
Feargal -
JDBC Connection String for MS Sql Server 2000 with Instance Name
Hi All,
I am having problems connecting to a MS Sql Server 2000 database using MSSqlServer4
driver when the database server has an Instance Name. If the database server has
no instance name then I am able to connect using the connection string
connection=jdbc:weblogic:mssqlserver4:hansa:1433
But when I have the MS Sql Server DB with an instance name such as "TestInstance",
then I am unable to connect with any of the connection strings given below
connection=jdbc:weblogic:mssqlserver4:hansa\TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa\\TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa:TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa:1433:TestInstance
Can anybody help me in resolving this issue. Appreciate your help.
Thanks in advance.
VikramVikram wrote:
Hi All,
I am having problems connecting to a MS Sql Server 2000 database using MSSqlServer4
driver when the database server has an Instance Name. If the database server has
no instance name then I am able to connect using the connection string
connection=jdbc:weblogic:mssqlserver4:hansa:1433
But when I have the MS Sql Server DB with an instance name such as "TestInstance",
then I am unable to connect with any of the connection strings given below
connection=jdbc:weblogic:mssqlserver4:hansa\TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa\\TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa:TestInstance:1433 or
connection=jdbc:weblogic:mssqlserver4:hansa:1433:TestInstance
Can anybody help me in resolving this issue. Appreciate your help.Hi. No type-4 jdbc driver is going to be able to use a name for a DBMS instance.
Let's assume you have two DBMS instances running on the machine hansa. One
of them may be listening for tcp connections on port 1433, but the other must not.
The other most be listening on some other port number you have chosen.
Therefore, to choose which DBMS instance you want to connect to, use the
working URL you have, and switch the port number as desired.
Joe Weinstein
>
>
Thanks in advance.
Vikram -
Best driver available for MicroSoft SQL server?
Hi,
I am using MS-SQL server for my application server.
Which driver should i use for it?
Right now I am using ODBC driver.
Please suggest me a few links where i could get the best driver(thin driver) for SQL server.
regards
suriHi,
best driver available for MicroSoft SQL server?i-net software has written a solid JDBC driver based on TDS. The trial version is limited to a single connection. http://www.inetsoftware.de/English/Produkte/JDBC_Overview/ms.htm
jTurbo provides jdbc driver for MS SQL Server (www.jTurbo.com).
Merant technologies also provides jdbc driver for MS SQL Server. Find more details at http://www.microsoft.com/sql/downloads/2000/jdbc.asp.Microsoft licenses MERANT's JDBC driver for SQL Server 2000.
I cannot comment which one is the best driver. It depends on your project requirements and the buget alloted.
Hope this helps.
Good Luck.
Gayam.Srinivasa Reddy
Developer Technical Support
Sun Micro Sysytems
http://www.sun.com/developers/support/ -
Cant create connection Pool for MS SQL Server 2000 with Microsoft Driver
i am using bea weblogic server 6.1, i cant create connection pool while using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft website. when
i give the following class name for JDBC driver and the connection url and click
apply while selecting the available server, a number of exception appears in default
server (that is the connection pool cannot be created..... cannot load the driver
class).
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple application in Jbuilder
7.0 the application runs successfully and fetches the data deom MS SQL database
but in at Bea connection Pool is not created with these settings. i do give appropriate
username and password in properties field in connection pool. Thankx for any help!khabbab wrote:
That was the original code part from "startweblogic" :
:runWebLogic
echo on
set PATH=.\bin;%PATH%
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;
echo off
and i changed it to :
:runWebLogic
echo on
set PATH=.\bin;%PATH%
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;D:\Program Files\Microsoft
SQL Server 2000 Driver for JDBC\lib\msbase.jar;D:\Program Files\Microsoft SQL
Server 2000 Driver for JDBC\lib\msutil.jar;D:\Program Files\Microsoft SQL Server
2000 Driver for JDBC\lib\mssqlserver.jar;I suggest moving or copying the three ms driver jars to a directory that has no blanks
in it so the classpath doesn't have blanks in it. Ie:
go to the "D:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib"
directory and do this:
mkdir D:\microsoft_jdbc_driver
cp *.jar D:\microsoft_jdbc_driver
Then make the classpath include D:\microsoft_jdbc_driver\msbase.jar etc.
Joe
>
>
echo off
when i save and run the bat file, server appears then disappears.
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
The class path which is echoed at server startup does not include thepaths to
driver jar files. when i edited the "startweblogic.bat" file and includedthe
driver class paths to jar files, now the server doesnot even run. tellme what
to do now???Show me what change you made to the startweblogic file.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
kindly tell me how can i check that the class paths for driver jarfiles are included
in that string? thanks. also tell me can not i use the jdriver forsql server
2000?.The startup script will echo what it's doing, including printing out
the classpath
it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
for
basic JDBC, but the MS drivfer is preferable in some ways.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
i am using bea weblogic server 6.1, i cant create connection
pool
while
using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
website.
when
i give the following class name for JDBC driver and the connectionurl and click
apply while selecting the available server, a number of exception
appears
in default
server (that is the connection pool cannot be created..... cannot
load
the driver
class).The server startup script creates a string that will become the
classpath
for the server.
This string is part of the java call to start the server with a-classpath
argument. You need to
make sure the MS driver jars are part of that classpath string.
Joe
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple applicationin Jbuilder
7.0 the application runs successfully and fetches the data deom
MS
SQL database
but in at Bea connection Pool is not created with these settings.
i
do give appropriate
username and password in properties field in connection pool.
Thankx
for any help!
khabbab wrote:
The class path which is echoed at server startup does not include thepaths to
driver jar files. when i edited the "startweblogic.bat" file and includedthe
driver class paths to jar files, now the server doesnot even run. tellme what
to do now???
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
kindly tell me how can i check that the class paths for driver jarfiles are included
in that string? thanks. also tell me can not i use the jdriver forsql server
2000?.The startup script will echo what it's doing, including printing out
the classpath
it will use. Yes you can use the jDriver for MS SQL2000. It is sufficient
for
basic JDBC, but the MS drivfer is preferable in some ways.
Joe
Joseph Weinstein <[email protected]_this> wrote:
khabbab wrote:
i am using bea weblogic server 6.1, i cant create connection
pool
while
using MS
SQL Server 2000. i have installed JDBC Driver SAP1 from microsoft
website.
when
i give the following class name for JDBC driver and the connectionurl and click
apply while selecting the available server, a number of exception
appears
in default
server (that is the connection pool cannot be created..... cannot
load
the driver
class).The server startup script creates a string that will become the
classpath
for the server.
This string is part of the java call to start the server with a-classpath
argument. You need to
make sure the MS driver jars are part of that classpath string.
Joe
URL= jdbc:Microsoft:sqlserver://127.0.0.1:1433;DatabaseName=MyDB
Driver= com.microsoft.jdbc.sqlserver.SQLServerDriver
when i use the above setting in a JDBC simple applicationin Jbuilder
7.0 the application runs successfully and fetches the data deom
MS
SQL database
but in at Bea connection Pool is not created with these settings.
i
do give appropriate
username and password in properties field in connection pool.
Thankx
for any help! -
Is there a forum or additional documentation for Adobe Flex Connector for MS SQL Server?
Is there a forum or additional documentation for Adobe Flex Connector for MS SQL Server? I am having problems getting it to work. Also it states that it is Flash Builder 4 certified but the code is all in halo (<mx:Application ...). I followed the documentation in the included PDF to no avail. I am looking for additional documentation - e.g.: a) where exactly (which directory on the SQL Server) to store the "fas_mssql_connector.asp" file; b) how to code the URL to the "fas_mssql_connector.asp"; c) wondering if the product is really Flex 4 certified. Thanks for any help (especially pointers to additional documenation).
I do have exactly the same questions. SO far the fas_mssql_connector.asp file is placed at the 'wwwroot' folder of the 'inetpub' folder of the IIS server. As hostname I use '[MyServer]' since it should run on the same machine and username and password are correct.
The fas_MSsql_Clean file is setup in a way that the name of the database is specified and the url to the asp file is set as: http://[MyServer]/fas_mssql_connector.asp
My SQL query looks like this:
private function getDbData():void
mssqlQuery("Select * from Tomat", "getDataO3");
And the MXML document like this:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600">
<mx:Script source="Actionscript/MSsql.as"/>
<mx:Script source="Actionscript/SqlQueries.as"/>
<mx:DataGrid x="148" y="95" id="dgData">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="col1"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
<mx:Button x="148" y="264" label="Get data" id="btnGet" click="getDbData()"/>
</mx:Application>
However the application is busy for a long time and I do not receive a single piece of data. Any help with this?
Thanks in advance.
Maybe you are looking for
-
Benefits of using SAP CAR compared to SAP BW on HANA
Hi I' like to understand the benefits of using SAP Customer Activity Repository. How is it better than SAP BW on HANA? What extra functions does the customer get?
-
Advantages and Disadvantages of Client Object Model in sharepoint 2013
I need Advantages and Disadvantages of Client Object Model in sharepoint 2013 like below in javascript. Users will have read/edit and approve access to the list. var clientContext = new SP.ClientContext.get_current(); var oList = clientConte
-
Hide components in the PLD for BOM
Hi I have created a sales BOM and on the print layout i do not want to have the individual components displayed. I just need only the parent item to be displayed with the price In doing this in the bill of material screen i have checked the box "hide
-
Cool way to remove 'X' from Splash Screens
I just found a way to remove the 'X' in the window for creating splash screens. Here is the code: // Make sure you have an image file (splash.jpg) in your dir. import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.borde
-
Xcelsius 2008 - Known Issues (Security)
AA: Area Affected PD: Problem Description WA: Work Around AA: Access across network domains using a crossdomain.xml file for the Flash Player PD: For security reasons, an Adobe flash player is not allowed to access data that resides outside the exact