Sample Header Ad - 728x90

Database Administrators

Q&A for database professionals who wish to improve their database skills

Latest Questions

0 votes
0 answers
28 views
Oracle Accessing Data from Two Databases Transparently
Our Oracle version is 19c We have a need to split our data into two separate databases. Most recent data will go into DB_1. Older data will go into DB_2. We do have Webserver tier. One options is to have views as follows CREATE VIEW all_cust as SELECT * FROM customer@DB_1 where ( date within 1 month...
Our Oracle version is 19c We have a need to split our data into two separate databases. Most recent data will go into DB_1. Older data will go into DB_2. We do have Webserver tier. One options is to have views as follows CREATE VIEW all_cust as SELECT * FROM customer@DB_1 where ( date within 1 months ) union SELECT * from customer@DB_2 where ( date > 1 months ) But this will require massive changes to application - because all accesses to CUSTOMER will need to be changed to ALL_CUST. Can the above setup be configured so that it is completely transparent to application ? Can VPD be a solution to this ?
oradbanj (141 rep)
Sep 30, 2022, 02:11 PM • Last activity: Sep 30, 2022, 02:21 PM
4 votes
4 answers
23012 views
Oracle - abort within a "before insert" trigger without throwing an exception
I know that this is an awful thing to do for many reasons, but I am in Get Things Done mode and we have a piece of software, which we can't modify, that writes records to a table. Some of these records, for business reasons, we don't want in this table. I was thinking I could write a trigger that "a...
I know that this is an awful thing to do for many reasons, but I am in Get Things Done mode and we have a piece of software, which we can't modify, that writes records to a table. Some of these records, for business reasons, we don't want in this table. I was thinking I could write a trigger that "aborts" any of these rows without throwing an error (so that the application doesn't fail in the front end, we want it to think it did its thing). I am intimately familiar with this application and know it won't cause any ugly side effects, we just can't modify it to behave the way we need it to. So, is this possible, and if not, what would be another way to go about it? I thought about having some sort of Job that routinely cleans the table for records that we don't want, but I would rather for these records to never be there to begin with so there's no degree of "dirtiness" at any one time in the table.
Paolo Bergantino (143 rep)
Sep 10, 2012, 04:47 PM • Last activity: Aug 15, 2022, 06:11 PM
0 votes
3 answers
336 views
Replacing the results of a row
I'm working with Microsoft Reporting Services 2008. In our database, we have a small group of confidential students that need to be taken into account for several queries. If they are a confidential student, the database needs to essentially return nothing. Currently, we do something along the lines...
I'm working with Microsoft Reporting Services 2008. In our database, we have a small group of confidential students that need to be taken into account for several queries. If they are a confidential student, the database needs to essentially return nothing. Currently, we do something along the lines of: select case when CONFIDENTIALITY_IND = 'Y' or :EmployeeClass = 'XA' then 'CONFIDENTIAL' else db.table.name end as name from db.student This isn't a big deal for such a small query, but most of them return many fields (often 20+) and I'm not a fan of so many case statements for obvious reasons. Because of how Reporting Services work, I can't do a general replacement either, it must be done on each and every field. Is there a more efficient method where I could replace every value in the row with 'Confidential' in a single case statement, or at least something more elegant? **Edit:** To clarify, that there isn't just this one field in the select. I only wrote one for the example, but in production, some reports are looking at displaying a huge amount of columns. I'm trying to avoid making two comparisons on every column for reports that could return rather large sets of data.
Jacobm001 (329 rep)
Sep 18, 2014, 11:01 PM • Last activity: May 26, 2016, 03:53 AM
2 votes
1 answers
499 views
Imposing column level security on a view for different user
> **Possible Duplicate:** > [Column level security](https://dba.stackexchange.com/questions/24292/column-level-security) I have a view which can be viewed by multiple users, and I would like to restrict some columns to specific users. e.g I have a view with fields `A`, `B`... `F`, and I have users `...
> **Possible Duplicate:** > [Column level security](https://dba.stackexchange.com/questions/24292/column-level-security) I have a view which can be viewed by multiple users, and I would like to restrict some columns to specific users. e.g I have a view with fields A, B... F, and I have users P, Q, R, S. Here's what I am trying to implement: * when user P browses the view, he will see data in A, B, C and F, and columns D and E as NULL * when user Q browses the view, he will see data in all fields * when user R browses the view, he will see data in A, D, E and F, and columns B and C as NULL
dibakar paul (21 rep)
Nov 20, 2012, 09:29 PM • Last activity: Mar 12, 2015, 12:36 PM
3 votes
3 answers
1849 views
Can Oracle row-level security work with user session credentials?
Can row-level security in Oracle be controlled by a user's session credentials or user context? Here's an example to illustrate what I'm looking for: Our database contains a bunch of sensitive company information, including salaries. HR administrators should be able to see salaries in their search r...
Can row-level security in Oracle be controlled by a user's session credentials or user context? Here's an example to illustrate what I'm looking for: Our database contains a bunch of sensitive company information, including salaries. HR administrators should be able to see salaries in their search results, but facilities management staff shouldn't, even if they use the same search parameters. The catch is that our app only has a single database user, and all requests go through it, so the security can't be set up to simply check the database user's ID. We'd have to pass the info in as, say, a user context. We're considering moving to Oracle Access Manager/WebLogic, if it makes a difference.
Pops (133 rep)
Apr 20, 2011, 04:16 PM • Last activity: Mar 12, 2015, 12:35 PM
9 votes
1 answers
2001 views
Column level security
I am in need of a solution to hide specific columns in a table. We have people who need to build reports against this database and specifically some of these tables with confidential information but aren't allowed to see items like salary or ssn. Is it possible to filter specific columns for users?
I am in need of a solution to hide specific columns in a table. We have people who need to build reports against this database and specifically some of these tables with confidential information but aren't allowed to see items like salary or ssn. Is it possible to filter specific columns for users?
Robert (91 rep)
Sep 13, 2012, 07:00 PM • Last activity: Mar 12, 2015, 12:35 PM
4 votes
2 answers
7687 views
Does Oracle support table-level & column-level permissions?
If there is a customer table, and some extra-private/secure information like SSN is there, should I create another table to store such information and lock that table so only certain people can view it even though it's strictly one-to-one? or can columns be locked too from unauthorized viewing based...
If there is a customer table, and some extra-private/secure information like SSN is there, should I create another table to store such information and lock that table so only certain people can view it even though it's strictly one-to-one? or can columns be locked too from unauthorized viewing based on rights? Even if both types of security mechanism do exist, is one preferred over the another? I might have said something very vague but I've used SQL Server more often.
progtick
Apr 26, 2012, 03:18 AM • Last activity: Mar 12, 2015, 12:35 PM
3 votes
2 answers
4871 views
Is to possible to forbid access to tables in own schema - Oracle?
Lets assume that we have the following situation: We have an Oracle schema/user: USER_TEST (with the "create session" privilege). SYS as SYSDBA creates couple Tables on schema USER_TEST. Is it possible to forbid access for the user USER_TEST to tables on his schema?
Lets assume that we have the following situation: We have an Oracle schema/user: USER_TEST (with the "create session" privilege). SYS as SYSDBA creates couple Tables on schema USER_TEST. Is it possible to forbid access for the user USER_TEST to tables on his schema?
xiatus (133 rep)
Feb 17, 2012, 05:42 PM • Last activity: Mar 12, 2015, 12:34 PM
Showing page 1 of 8 total questions