Hot answers tagged

4 votes
Accepted

How to terminate user's sessions in Oracle DB exactly 8 hours after user connected?

CREATE PROFILE To specify resource limits for a user, you must: Enable resource limits dynamically with the ALTER SYSTEM statement or with the initialization parameter RESOURCE_LIMIT. This parameter ...
user avatar
  • 38.1k
1 vote

oracle - Calculate sum or avg in one query based on the their value

See if this (conditional aggregate) helps. Sample data: SQL> with test (datum, customer, amount, percentage, category) as 2 (select 20220330, 'customer1', 10, 93, '01' from dual union all 3 ...
user avatar
1 vote

Manually change datafile size or let oracle do the job during schema duplication

it depends. If you absolutely want to make sure your import does not fail on space problems -> pre-alloc the space. If your import is part of a reorganisation job where you would try to win back ...
user avatar
  • 6,552
1 vote

Remove third ordinate from string of 3 ordinates

There is a far easier way of doing this than the answer here suggests. A single regular expression (regex) can do it all and replace ~ 20 lines of complicated non-standard SQL in a single line with a (...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible