Is schema equivalent to user in tibero db like it is for oracle? - tibero

We have to initialize our application by pointing it to the current catalog and schema. Would it be appropriate to initialize it by pointing it to the current DB and user (from the current JDBC connection) respectively?

Related

Oracle tables (for user SYSTEM) are not displayed in Azure Data Factory's Table names dropdown menu

I'm trying to copy data from Oracle database table to MS SQL database using Azure Data Factory pipeline.
I have installed oracle locally and using the SYSTEM user, I have created couple of tables in oracle as seen in the screenshot below:
After connecting this local oracle instance with Azure Data Factory via Self Hosted Runtime, I am unable to see the names of these tables in the dropdown of Table names list while creating a dataset for one of these tables. Below are the screenshots of what I am trying to achieve:
But when I search for these tables SPENDREPORT and SPENDREPORTDETAILS, they are not found in this dropdown, as shown in the screenshot below. Any clues as to how I can solve this?
As commented by Justin Cave and also as per Oracle official documentation You must not create any tables in the SYS schema.
•SYS
This account can perform all administrative functions. All base (underlying) tables and views for the database data dictionary are stored in the SYS schema. These base tables and views are critical for the operation of Oracle Database. To maintain the integrity of the data dictionary, tables in the SYS schema are manipulated only by the database. They should never be modified by any user or database administrator. You must not create any tables in the SYS schema.
The SYS user is granted the SYSDBA privilege, which enables a user to perform high-level administrative tasks such as backup and recovery.
• SYSTEM
This account can perform all administrative functions except the following:
• Backup and recovery
• Database upgrade
You should also try to clear Data factory cache and then refresh Table name field.

How can I set a JBOSS data source to an Oracle database use a different schema to the one used for authentication

I have a Java webapp (WAR) that is to be run in JBOSS.
That webapp is to create connections to an Oracle database using a username/password for a user that is given read-only permissions.
The webapp queries tables belonging to a different schema. I do this by qualifying each table name in my SQL queries.
However, I would like to parameterise this in my datasource, since the schema names can be different in different environments.
Is there a way to define a JBOSS data source which logs in as User A for each connection, but uses Schema B for all queries?
One way to do it is to use the new-connection-sql or check-valid-connection-sql datasource properties to execute ALTER SESSION SET CURRENT_SCHEMA=yourschema, which will change the default schema for each connection.
Recommended way is to create synonyms in Oracle for your User A to access tables in schema owned by User B. This way you can even grant specific privileges to user A to select, update, insert on tables owned by the other UserB.

How to create a database link to a local access db from oracle remote db

I have a requirement from my client to access a locally installed access database through a oracle remote database. These separate access databases are in their user's laptops. Is it possible to create a one database link in the remote oracle database to work in every laptop? How we can create this link?
this is not a step-by-step guide,
actions in database1
++++++++++++++++++++
create user dbuser1 identified by pass1
create public databaselink "dblinkname1" connect to dbuser2 using "entry in tnsnames.ora/connect string to database2"
select * from dual#dblinkname1 <- should returns X
actions in database2
++++++++++++++++++++
create user dbuser2 identified by pass2
create public databaselink "dblinkname2" connect to dbuser1 using "entry in tnsnames.ora/connect string to database1"
select * from dual#dblinkname2 <- should returns X
maybe you want to create synonyms for objects and give some grants.

Passing client userid to Oracle when using a pooled connection

Our company has an audit requirement to track individual user interaction with the application by user id. We use Tomcat 7 with the Tomcat connection pool and an Oracle 11.2 database (soon to be 12c). We connect using a Type 4 datasource managed by JNDI on the server which uses a system user id. Users log on using SSO to the web application. We want to make sure that whenever a user modifies a database record, their SSO signon id instead of the system id is used in an audit column to identify who made the modification.
My research shows that using getClientInfo and setClientInfo may be the way to go and I want to be clear on how I would implement this. Would I use the setClientInfo on the pooled datasource Connection to set the client user id, or run the Oracle stored procedure DBMS_APPLICATION_INFO.SET_CLIENT_INFO to pass the client user id? I know that in the Oracle virtual table v$session there is a column for OSUSER that holds this information. How do I get it there? Could I make a direct update to that column?
Since this is a multi-threaded application server, I don't want to end up with a concurrancy issue.

Oracle vocabulary, what is the mysql/SQL Server equivalent of a database

I need some help with vocabulary, I don't use Oracle that often but I am familiar with MySQL and SQL Server.
I have an application I need to upgrade and migrate, and part of the procedure to do that involves exporting to an XML file, allowing the installer to create new database tables, then import to the new database tables from the XML file.
In Oracle, my database connection specifies a username, password, and an SID.
Let's call the SID, "COMPANY-APPS". This SID contains tables belonging to several applications, each of which connects with a different user ( "WIKIUSER", "BUGUSER", "TIMETRACKERUSER" ).
My question is:
Can I re-use the same user to create the new tables ( with the same names ).
In MySQL or SQL Server, I would create a new database and grant my user privileges to create tables in it.
OR, do I need to create a new database user for my upgraded tables?
The word you are looking for is Schema in Oracle. When you create a user they have a schema associated with them, so if I created the user 'Tim' and a table called 'data' then it can be found globally (in that database) as Tim.data

Resources