Determine connection status of multiple database servers

We have mutliple database servers that MAY/MAY NOT be connected to the network at any time. I need to determine which DB servers are available to connect to. I have a stored procedure that does a HOST TNSPING command and checking the results through the FORM_SUCCESS function. That works but the response time is too slow, due to taking too long to timeout. What we attempted to do was to issue a HOST PING command, but because of the 16 bit factor, the FORM_SUCCESS did not recognize the results of the PING. I tried to capture the results of a PING into a variable, but had no success. Bottom line, we don't care how it gets done, we just need to be able to determine, as quickly as possible, what database servers are connected.

Microsoft SQL allows for clustering of SQL databases, so for
instance two servers connected to a fileshare and a virtual address
shared across the two physical boxes. Database connections are made
to the virtual addres which will then be handled by the active
node. Becuase a database is ultimately a file(s) on a disk it can
only be attached to one node at a time so you end up with an
active/inactive cluster.

Similar Messages

  • Multiple Database Servers Question

    Hi,
    Please forgive this ignorant question, but can someone tell
    me how one would go about using multiple database servers?
    Just as there comes a time where one would need more than
    one web server and would need to use a load balancing
    solution, what happens when one would need more than one
    Database Server?
    How does one go about implementing that solution?
    Is there some way to have two database servers carrying the
    same information with some kind of load balancing solution
    in front of it(?) or does one place some tables on one
    Database
    server, and other tables on the other database server?
    (I have no clue as to how things would work.)
    Thanks in advance,
    Joe

    Microsoft SQL allows for clustering of SQL databases, so for
    instance two servers connected to a fileshare and a virtual address
    shared across the two physical boxes. Database connections are made
    to the virtual addres which will then be handled by the active
    node. Becuase a database is ultimately a file(s) on a disk it can
    only be attached to one node at a time so you end up with an
    active/inactive cluster.

  • Backup Status for Multiple SQl Servers.

    Hi All,
    What changes are required in the below script - so that it displays the backup result for
    multiple SQL SERVERS.
    --Databases with data backup over 24 hours old
    SELECT
       CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server,
       msdb.dbo.backupset.database_name,
       MAX(msdb.dbo.backupset.backup_finish_date) AS last_db_backup_date,
       DATEDIFF(hh, MAX(msdb.dbo.backupset.backup_finish_date), GETDATE()) AS [Backup Age (Hours)]
    FROM    msdb.dbo.backupset
    WHERE     msdb.dbo.backupset.type = 'D' 
    GROUP BY msdb.dbo.backupset.database_name
    HAVING      (MAX(msdb.dbo.backupset.backup_finish_date) < DATEADD(hh, - 24, GETDATE())) 
    UNION 
    --Databases without any backup history
    SELECT     
       CONVERT(CHAR(100), SERVERPROPERTY('Servername')) AS Server, 
       master.dbo.sysdatabases.NAME AS database_name, 
       NULL AS [Last Data Backup Date], 
       9999 AS [Backup Age (Hours)] 
    FROM
       master.dbo.sysdatabases LEFT JOIN msdb.dbo.backupset
           ON master.dbo.sysdatabases.name  = msdb.dbo.backupset.database_name
    WHERE msdb.dbo.backupset.database_name IS NULL AND master.dbo.sysdatabases.name <> 'tempdb'
    ORDER BY 
       msdb.dbo.backupset.database_name
    Thanks..!!

    Hi Prashanth,
    what location do I need to provide for SQL Server for link: http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/02/use-powershell-to-report-sql-server-backup-status.aspx
    { $location = "SQLSERVER:\SQL\$SQLInstance\Databases" }
    else
    { $location = "SQLSERVER:\SQL\$SQLInstance\DEFAULT\Databases" }    ??

  • Installing one APEX for multiple databases servers.

    Hello, everyone.
    I'm new on this world of Oracle solutions, and I would like
    very much your help.
    Here in my company I have five database servers, and I want to install
    the Oracle Apex in a way that I only need access one webpage and have
    the possibility to edit all the database.
    For instance:
    Imagine that I have five machines and each one has a instance of one database.
    I would instal the Apex on each machine. But I would like to open the Apex on
    my browser only once, and have the capability to work with all databases.
    It would be like the Apex had a scrollbar and I could choose wich database to work.
    Is that possible? If it is, could be done with XML DB server? What is the best HTTP server to use in this case?
    Thanks for your attention.
    Sorry if I wasn't clear, I'm new and I'm learning.
    Regards, Leandro R. de Freitas.

    Hi,
    as you describe this, it is not possible. An Apex instance is installed in an Oracle instance and is as a result is tied very closely to that instance.
    That being said, it is still possible to access data in different database instances from a seperate database by the use of database links, though this is can be a little complicated and not always desirable from a performance point of view. Whether this is desirable in your instance depends on the architecture of your applications.
    For example, if your 5 different instances are part of one distributed application, it may be desirable to install Apex in one instance that may be termed the master instance and have it access data from the other instances via database links, which should already exist in a distributed application.
    On the other hand, if your applications are quite distinct, then I would see it as desirable to have seperate installations of Apex in each instance. This would enable different release cycles and versioning if required, lead towards better performance and avoid single point of failure. If you need a united front end to these applications then you could maybe create a gateway application on one of the Apex instances, though how you deal with sign on would depend on your architecture eg Single Sign on vs LDAP etc. You could simply create an HTML page somewhere on your intranet that points to these applications and then let each application deal with sign on.
    I hope this helps.
    Andre

  • Is it possible to connect to Mysql multiple databases?

    Hi all,
    Is it possible to connect to 2 or more Mysql databases from a single report using Crystal report and if yes, then how can I do that ??
    Thanks,
    Prashant

    Hi Prashant,
    you can user Business view manager to connect to more than one datasource using Dynamic data connection.
    here is the link for a PDF which contains all the details
    [BVM|http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_bv_admin_en.pdf]
    hope this helps
    Regards
    Aditya Joshi

  • Generic Reports accessing Multiple Database Servers

    <p>Hi,</p><p>I have a report which is accessing a table present within SQL Server. This is done by creating a system DSN which points to SQL Server at report design time through the database expert from the Crystal Reports Developer. The same table is also present in another database server ie ORACLE. The requirement is that I should be able to execute the report against ORACLE database at runtime. I have seen a lot of examples to do this using ODBC and OLEDB ie changing datasources at runtime but all of these have to specify the database username and password at runtime. </p><p>Is there any way for me to achieve this without passing the username and password at runtime? If so it would be great if i could get all possible approaches to achieve this. </p><p>Thanks in advance</p><p>Joseph Samuel</p><p>&#160;</p>

    I am doing the samething.
    I found that if the report is created under OS Auth mode of Oracle, then it is OK in integrated security mode in runtime, you don't need to set any logon information in runtime, but sure, please follow the OS Auth requirement of Oracle.
    But if the report is created using stand security mode and wish it to be run under integrated security mode in runtime, then a logon error would occurs, but if the crystal report view control set to enable the database logon promot, then we can still enter something in username textbox and check the "use integrated security" checkbox, then the report is still OK.
    I wish to have the database logon prompt disable and override the logon information in program in runtime and let the report shown without any problem, but up to now, i still have no any idea.  I will come back after I got any solution for this.

  • Best way to connect java app to multiple databases?

    I'm working on my first commercial application, and I want it to be as flexible as possible, meaning I want it to be able to connect to a wide range of databases, as the customer chooses. I'm wondering what the best way is to accomplish this, I don't really want to have to buy a commercial license for third party ODBC drivers, any one have some good comments on this?

    You have two fundamental options:
    Use an O/R mapping tool like: Hibernate, EJB BMP, JDO, etc.
    Develop your own using JDBCIf you opt for the former, you should ask youself, "What value do i add? Or should I simply use these technologies?" The advantages are that dozens of other developers, going down similar routes, have faced the obstracles you will face and more. The disadvantage is that none of these developers has actually faced your specific problem. This is not to say that the solution does not already exist. The efficacy of this methodology will be how closely the general solution fits with your own (and since many problems have the same challenges, this will often be true).
    If you opt for the latter, you will have both an opportunity and a pitfall. The precise, business issue your current project addresses has many things both in common with other projects and also a handful of unique challenges. The hard part is determining whether this challenge actually differs in some fundamental way, or whether you have discerned some fault or opportunity in your methodology compared to standard (or even cutting-edge) practices.
    In reality, the challenge of "connecting to numerous, heterogenous (and probably vaprous) database systems" has long been addressed. Addressed, but perhaps not solved. If your goal is to develop a class library, for personal or consulting use, or to increase your understanding of the O/R boundary and best practices to obviate it, then my best advice is to read existing literature, and give it your all. There is no right answer here, and building on an existing experience of failure and success is indispensible.
    If your aim is to solve the O/R mapping challenge, or to suppant JDBC BMP, Hibernate or JDO, then my hat is off to you. We are all eagerly awaiting that day. (Sadly, after much effort, it has not yet arrived).
    So, can you connect Java to multiple databases, and even a diverse array of RDBMS vendors? Of course! But what will you do with those conections?
    - Saish

  • Does BO 4.1 enable universe to connect to multiple database?

    Using BO 3.1, we can only connect an universe to single database. However, with BO 4.1 will it be possible to connect a single universe to multiple database?
    Regards
    Vinay

    Vinay, You can connect Universe to multiple databases using IDT (Information Design Tool). Find the below link for reference.
    SAP Business Objects Multi Source Universe - Information Design Tool - YouTube
    Regards,
    Sujitha

  • Multiple HTML DB connecting to the same database, in error

    I am having a problem getting the HTML DB application in instance TMSQA to connect to the TMSQA database; it connects to the TMSDEV database. I have tried setting the connect_string under DAD_HTMLDB in wdbsvr.app in both TMSDEV and TMSQA to their corresponding IP addresses and hostnames. But when I connect to HTML DB via my browser using either IP address:7777/pls/htmldb or hostname:777/pls/htmldb in the URL, I always connect to TMSDEV.
    I have one physical server called ORATEST3 at IP address 172.31.243.33. It is divided into 2 virtual servers:
    TMSDEV:
    IP address - 172.31.243.53
    ORACLE_HOME - /db/tmsdev/u01/app/oracle/product/9.2.0.5/
    HTTP Server - /db/tmsdev/u01/app/oracle/product/9.2.0.5/Apache
    TMSQA:
    IP address - 172.31.243.72
    ORACLE_HOME - /db/tmsqa/u01/app/oracle/product/9.2.0.5/
    HTTP Server - /db/tmsqa/u01/app/oracle/product/9.2.0.5/Apache
    Does anybody have any idea as to how to setup the HTML DB in each instance to connect to it’s corresponding database?

    Hi all,
    Sorry for replying late.
    Thanks @Dude, Nelson Calero, indeed it helped me!
    I could recover database multiple times from a same snapshot and thus I would like to share my findings.
    Found that when we recover database with RESETLOGS option it actually starts a new database version called Incarnation of the database. Once this new branch is started we can recover database from old backup only till the SCN point where we performed DBPITR. After that point, snapshot/backup becomes orphaned backup.
    [http://docs.oracle.com/cd/B19306_01/backup.102/b14192/flashptr006.htm]
    If you want to recover database from the same old backup we have to reset the database to the incarnation number when snapshot/backup was taken using following command:
    RMAN> RESET DATABASE TO INCARNATION 2; (considering backup was taken at Incarnation 2)
    Also, If current controlfile is missing you need at least one backup of current controlfile. It is mandatory as after resetlogs, sequence number of log file changes and you cannot recover database from any available backup.
    To make sure that latest control backup is always available please enable the AUTOBACKUP feature of the database which backs up the controlfile and spfile on any database change event.
    Again this is the lesson for those who don't know much about AUTOBACKUP.
    Regards,
    Shrirang

  • Multiple DataBase Connection in a Single Form

    hi all
    Is it Possible to have Multiple Database Connection With a Single Form
    Block a : Retriving data from a database Service a/Schema A.
    Block b : Retriving data from a Remote Database Service b / Schema B.
    If yes how to do this.
    regards
    jai
    email:[email protected]

    Sure you can access a database this way,
    but can you base a block on this database connect? No you can't.
    Frank

  • How to connect multiple databases

    Hi all,
    This is my situation , i need to set the max number of connections to one database , if the connection exceeds then i need to connect to another database , is there any way to solve it? please help me

    Sounds like you want to write your own load balancer. Sweet!!
    As was already stated, this would be best handled by clustering your database servers.
    If it's not done at that level, what's the next best option? How are your users currently connecting to the database? Is it through a web server or from stand-alone clients? If it's a web server, the server should have some facility for creating datasources and pooling connections. If you are dead set on switching to a different database when the number of connections in the pool has been maxed out, then you might have to write your own singleton class to manage the connection pool(s).
    If your users are connecting through stand-alone clients, you have to force the client applications to connect through a single server that controls the connections.
    There's one major problem with switching databases...if a user saves some data there is no guarantee that they will connect to the same database when they want to read the data at some later point. Maybe if there is replication between the two databases in the cluster, they might be able to do that.
    Edited by: user9221846 on Feb 11, 2011 8:04 AM
    Edited by: user9221846 on Feb 11, 2011 8:05 AM

  • Connection to multiple databases using a single EJB

    How can I connect to multiple Databases (using @PersistenceContext) using an EJB?
    Did I need to connect various Entity Managers corresponding to the each database and simply send my Queries?
    I am using Glassfish Application Server
    Netbeans IDE
    Java Derby Database
    Oracle Database
    Java Persistence API
    Thanks in Advance

    Yes, you need a persistence context and thus entity manager per database. Depending on what you want to achieve you may also need to go to the next level in your skill set and learn all about distributed transactions.

  • SQL Agent jobs status for multiple servers using Powershell.

    Hi All,
    I am following website link:
    http://www.toadworld.com/platforms/sql-server/b/weblog/archive/2013/09/17/powershell-script-to-monitor-a-service-on-a-group-of-servers-html-formatted-email-output.aspx
    I require to gather status details about all the SQL Agent jobs in the environment on multiple SQL Servers.
    I tried to edit the script using:
    [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO")
    $sqlServerName = 'localhost\developer'
    $sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($sqlServerName)
    foreach($job in $sqlServer.JobServer.Jobs)
        $job | select Name, OwnerLoginName, IsEnabled, LastRunDate, LastRunOutcome, DateCReated, DateLastModified
    but SQL Agent jobs are not reflecting in the mail output...
    requesting help...!!
    Thanks in Advance.
    Hunt

    I've created a new script for you.  Let me know if you've any questions
    Create the function
    Function Get-SQLJobHTMLReport
    param(
    [String]$ComputerList,[string]$Outputfile,[String]$To,[String]$From,[string]$SMTPMail
    New-Item -ItemType file $Outputfile -Force
    # Function to write the HTML Header to the file
    Function writeHtmlHeader
    param($fileName)
    $date = ( get-date ).ToString(‘yyyy/MM/dd’)
    Add-Content $fileName “<html>”
    Add-Content $fileName “<head>”
    Add-Content $fileName “<meta http-equiv=’Content-Type’ content=’text/html; charset=iso-8859-1′>”
    Add-Content $fileName ‘<title>Service Status Report </title>’
    add-content $fileName ‘<STYLE TYPE=”text/css”>’
    add-content $fileName “<!–”
    add-content $fileName “td {“
    add-content $fileName “font-family: Tahoma;”
    add-content $fileName “font-size: 11px;”
    add-content $fileName “border-top: 1px solid #999999;”
    add-content $fileName “border-right: 1px solid #999999;”
    add-content $fileName “border-bottom: 1px solid #999999;”
    add-content $fileName “border-left: 1px solid #999999;”
    add-content $fileName “padding-top: 0px;”
    add-content $fileName “padding-right: 0px;”
    add-content $fileName “padding-bottom: 0px;”
    add-content $fileName “padding-left: 0px;”
    add-content $fileName “}”
    add-content $fileName “body {“
    add-content $fileName “margin-left: 5px;”
    add-content $fileName “margin-top: 5px;”
    add-content $fileName “margin-right: 0px;”
    add-content $fileName “margin-bottom: 10px;”
    add-content $fileName “”
    add-content $fileName “table {“
    add-content $fileName “border: thin solid #000000;”
    add-content $fileName “}”
    add-content $fileName “–>”
    add-content $fileName “</style>”
    Add-Content $fileName “</head>”
    Add-Content $fileName “<body>”
    add-content $fileName “<table width=’100%’>”
    add-content $fileName “<tr bgcolor=’#CCCCCC’>”
    add-content $fileName “<td colspan=’4′ height=’25′ align=’center’>”
    add-content $fileName “</td>”
    add-content $fileName “</tr>”
    add-content $fileName “</table>”
    # Function to write the HTML Header to the file
    Function writeTableHeader
    param($fileName)
    Add-Content $fileName “<tr bgcolor=#CCCCCC>”
    Add-Content $fileName “<td width=’10%’ align=’center’>ServerName</td>”
    Add-Content $fileName “<td width=’50%’ align=’center’>Name</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>OwnerLoginName</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>IsEnabled</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>LastRunDate</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>LastRunOutcome</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>DateCReated</td>”
    Add-Content $fileName “<td width=’10%’ align=’center’>DateLastModified</td>”
    Add-Content $fileName “</tr>”
    Function writeHtmlFooter
    param($fileName)
    Add-Content $fileName “</body>”
    Add-Content $fileName “</html>”
    Function writeDiskInfo
    param($filename,$Servername,$name,$OwnerLoginName,$IsEnabled,$LastRunDate,$LastRunOutcome,$DateCReated,$DateLastModified)
    Add-Content $fileName “<tr>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$servername</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$name</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$OwnerLoginName</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$IsEnabled</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunDate</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$LastRunOutcome</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateCReated</td>”
    Add-Content $fileName “<td bgcolor=’#FF0000′ align=left ><b>$DateLastModified</td>”
    Add-Content $fileName “</tr>”
    writeHtmlHeader $Outputfile
    Add-Content $Outputfile “<table width=’100%’><tbody>”
    Add-Content $Outputfile “<tr bgcolor=’#CCCCCC’>”
    Add-Content $Outputfile “<td width=’100%’ align=’center’ colSpan=8><font face=’tahoma’ color=’#003399′ size=’2′><center><strong> SQL Server Agent Job Details</strong></font></td>”
    Add-Content $Outputfile “</tr>”
    writeTableHeader $Outputfile
    #Change value of the following parameter as needed
    Foreach($ServerName in (Get-Content $ComputerList))
    $sqlServer = New-Object Microsoft.SqlServer.Management.Smo.Server($ServerName)
    foreach($item in $sqlServer.JobServer.Jobs)
    Write-Host $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
    writeDiskInfo $Outputfile $sqlServer $item.name $item.OwnerLoginName $item.IsEnabled $item.LastRunDate $item.LastRunOutcome $item.DateCReated $item.DateLastModified
    Add-Content $Outputfile “</table>”
    writeHtmlFooter $Outputfile
    Function sendEmail
    param($from,$to,$subject,$smtphost,$htmlFileName)
    [string]$receipients=”$to”
    $body = Get-Content $htmlFileName
    $body = New-Object System.Net.Mail.MailMessage $from, $receipients, $subject, $body
    $body.isBodyhtml = $true
    $smtpServer = $smtphost
    $smtp = new-object Net.Mail.SmtpClient($smtphost)
    $smtp.Send($body)
    write-output “Email Sent!!”
    $date = ( get-date ).ToString(‘yyyy/MM/dd’)
    sendEmail -from $From -to $to -subject “Service Status – $Date” -smtphost $SMTPMail -htmlfilename $Outputfile
    Get-SQLJobHTMLReport -ComputerList f:\powersql\server.txt -SMTPMail hq.abc.com -To [email protected] -From [email protected] -Outputfile F:\Powersql\jobs.htm
    --Prashanth

  • Application that connects to multiple databases.

    I am developing an application that performs many task, but one in particular is connecting to multiple databases and creating user accounts in each all with the push of a single button. I have tried putting connect statements in the trigger code but I don't get the desired results.
    How would I get my application to switch database connections while in execution?
    Please reply to the forum, or email me @ [email protected]
    Thank you.
    Travis

    Hi
    The only possible way which I could find for your requirement is that of DB Links. Establish DataBase Links among the multible databases, with which you want to work in one session. Peform all your actions through the DB Links.

  • Multiple Database Connections in ADF?

    Hi,
    For school we have a project. The goal of this project is to create an application that can generate business rules in PL/SQL. The application must be build using JDeveloper 11g 11.1.1.3.0 with ADF and must be a swing application. We didn't have very much experience with ADF swing.
    Within this swing application you must enter the data which is needed to connect to the specific database. When you connect, it will get all the metadata of the connecting database/schema, because we can create a user friendly UI which shows the tables and when saving this it must be stored into another database (repository). So we only need the first connection to get all the data, then the connection could be broken. The second connection is more important, because we nee to save the data to the repository.
    Both databases are Oracle databases.
    I have been looking how we can achieve this, but with no result (I saw a solution like this: How do I use dynamic credentials in a J-Client App? but don't now how to implement it.)
    Thanks in advance

    The ADF model layer usually takes care of handling instances of you Application Modules, and here, you are doing it manually. This brings some risk, and be careful to release the Application Module after use.
    More Information:
    Link: http://jdeveloperandadf.blogspot.com/2011/02/adf-application-with-multiple-data.html
    Edited by: user12968134 on Feb 27, 2011 7:32 AM

Maybe you are looking for

  • Re: Forte and Dialup PPP connections

    Subject: Forte and Dialup PPP connections Priority: normal Reply-to: "Dexel Durban" <[email protected]> We want to run Win 95 on our client forte machines. Currently we're using Forte v2.0E and MS TCP/IP. Everything works fine in the LAN enviroment,

  • My Notes are not syncing - how do I get them to?

    I have a new iPhone 6 and have upgraded my iPad mini to the new operating system. Both of them, and my iMac and MacBookAir, are set to sync Notes. But I have notes on my phone that aren't on my other devices. How do I get them to sync?

  • Displaying wrong date & time

    I work in the 29th floor or a building in downtown Chicago. For the last few days, everyone who has verizon phones have been experiencing their phones displaying the wrong date and time. Co-workers who have another carrier are not experiencing this p

  • Using windows based photoshop as editor in iPhoto

    Hi all!  Long time Windows user just made the switch.  Trying to save some money on software, total newby to Mac.  If I use Parallels and install a windows version of Photoshop, can I use that as the photo editor in iPhoto?  I know that you can do th

  • New Condition Value

    Dear All Experts, I have come across something strange Service PO condition value. User Requirement Is:- We need Excise Duty to be calculated not on basic price total, but on 33% of basic price total. Example:- Y = Total Amount of PO x 33% now Servic