Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 500799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:07:28+00:00 2026-05-13T06:07:28+00:00

i have a PL/SQL program which do a query to an AS400 database through

  • 0

i have a PL/SQL program which do a query to an AS400 database through Transparent Gateway. Sometimes the AS400 not responds to the query (may be network problems )and the PL/SQL program hangs.

Is there any method to set a timeout to the Oracle query so that when certain amount of time passes an exception is risen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:07:28+00:00Added an answer on May 13, 2026 at 6:07 am

    Have you tried setting the HS_FDS_CONNECT_PROPERTIES parameter in the AS400 Transparent Gateway initialisation file?

    For a timeout of 2 minutes:

    HS_FDS_CONNECT_PROPERTIES="timeout='120'"
    

    Another more general option for setting a query timeout is to create a profile and assign it to the user running your query.

    A resource profile can be used to set limits on all sorts of usage in any particular session – one resource limit available is connection time.

    For example, you could create a profile as400_tg_profile and assign it a maximum connection time of 2 minutes:

    create profile as400_tg_profile limit connect_time 2;
    

    … then you could assign this profile to the user running the query:

    alter user as400_tg_user profile as400_tg_profile;
    

    There are lots of options on creating a profile and there are many ways to assign a profile to a particular user so you should read through the documentation.

    You could also look into using Oracle Resource Manager creating resource groups and resource profiles if you need to dynamically assign particular resource limits – this gives you fine-grained control of resources for individual sessions.

    The Oracle documentation is really good on this – for starters, give this a read:

    http://www.oracle.com/technology/products/manageability/database/pdf/twp03/twp_oracle%20database%2010g%20resource%20manager.pdf

    For more detail:

    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/dbrm.htm#ADMIN027

    This is one of those bits of functionality that’s easier to use in Enterprise Manager, but a quick PL/SQL example is given in:

    http://www.dba-oracle.com/job_scheduling/resource_manager.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database file .mdf from MS SQL EXPRESS in folder: C:\Program Files\Microsoft
I have written a query in Sql server 2008. select select * from program
I have a program which gets a list of locations from an sql db
I have a web based program which chooses some records from a database using
I have a SQL database which i use to store some info and every
Suppose I have a SQL database in which a column could look something like
I am writing a program on python which interacts with MySQL database. For sql
I have a C# program I'm writing which interacts with SQL Server. I had
I have a SQL update statement I am running from inside a PHP program.
i have a problem. Some sql in my program could be written by the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.