0

The firewall setting at the server breaks the connection to an application I am using every 2 hours it sees it idle.

How to i write/configure a task from Windows Scheduler to Ping the database every 30 minutes so that the Firewall is not able to break the connection.

I know I need to use the query "select * from dual"

But I am beginner with zero experience on windows administrative tools.

Can someone please help me, how to do it.

Thanks.

2 Answers2

0

Download SQL*Plus from the Oracle website (http://www.oracle.com/technetwork/topics/winsoft-085727.html)

Then create a bat file with the select * from dual command. Create a scheduled task that runs the command, such as:

sqlplus user/password @query.sql

I would however get your firewall configured correctly.

Lock
  • 5,422
  • 14
  • 66
  • 113
  • thanks @Lock , does that mean I need to create a task in which the .bat (batch file) runs at fixed intervals (since it has the query to ping Database). – NewbieAtVBA Dec 30 '15 at 09:21
  • Correct. Place the script anywhere (such as c:\scripts) and simply schedule this task to run at whatever your required interval is. – Lock Dec 30 '15 at 21:35
0

This explains how to schedule a task: http://windows.microsoft.com/en-US/windows/schedule-task#1TC=windows-7

This explains how to connect to Oracle from the command line. How to connect to Oracle 11g database remotely

When configuring the action for the task, use sqlplus in the "Program/Script" field and username/password@hostA:1521 /XE for "Add arguments (optional)".

Community
  • 1
  • 1
MattTannahill
  • 606
  • 4
  • 11