Is it possible to obtain a DBA privelege at AWS Oracle? - oracle

I've created a Oracle DB instance in Amazon cloud. I need to be able to create programmatically a db schema and an owner for this schema. How this could be done?

If you have credentials of a user which has permissions to create schema and user; u should be able to do this.
Programmatically create a JDBC Connection using that user; and execute same SQL Query just like you would do on TOAD.

When you create a DB in Amazon RDS, you also have to specify the credentials of the DB administrator. You can then use those credentials to connect to the DB instance and perform any administration tasks. You may also connect using those credentials and create more users with dba privileges.
There are restrictions in AWS RDS that you would not be able to do (e.g. RMAN is not supported, or Java XA is disabled and you cannot enable it, etc.). But if all you need is to programmatically create DB schemas, there are no restrictions on that.

Related

Deploying multi-tenant on Amazon RDS (individual DB for each tenant)

I am currently conceptualizing a cloud application (SaaS) and I am looking to create a DB for every user (tenant) that is registering an account.
May I know if it is programmatically possible to create a new DB on Amazon RDS through API or anything?
Databases are created on RDS using standard SQL DDL statements -- not the API.
For example:
To create additional databases, connect to the DB instance and use the SQL command CREATE DATABASE.
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateInstance.html

Database Schema Privileges for ATG

I am setting up a new instance of ATG (version 10.0.3). I am using an Oracle database (Oracle SE ONE). I need to create the four basic database users - atg_pub, atg_prod, atg_cata, and atg_catb.
Which privileges should I assign to these users in the Oracle database?
I assume each user needs, at the minimum
CONNECT
CREATE/ALTER/DROP TABLE
CREATE/ALTER/DROP INDEX
Is there a definitive list?
P.S. I am using a shared Oracle instance and do not have the privileges to GRANT ALL to these users
As far as I remember granting CONNECT and RESOURCE roles plus some quota on the tablespace was sufficient

What is the significance of connect role in oracle

What is the purpose of connect role in oracle.
select * from role_sys_privs where role='CONNECT';
ROLE PRIVILEGE ADMIN_OPTION
CONNECT CREATE SESSION NO
So based on the above information it is used to create session.
But i can find users who don't have the role of CONNECT but can still access the database.
So what is this CREATE SESSION about? and what can it do? is it necessary for all the users?
According to the Database Security Guide, the CONNECT ROLE was changed in Oracle Database 10.2:
The CONNECT role was originally established a special set of privileges.
These privileges were as follows:
ALTER SESSION
CREATE SESSION
CREATE CLUSTER
CREATE SYNONYM
CREATE DATABASE LINK
CREATE TABLE
CREATE SEQUENCE
CREATE VIEW
Beginning in Oracle Database 10g Release 2, the CONNECT role has only the CREATE SESSION privilege, all other privileges are removed.

How to duplicate Oracle database without sysdba privilege

We have an oracle 11g installed on a linux machine. I want to duplicate the database on my local 64-bit windows machine. We have total 403 tables and a few of them have foreign key constraints. I am not a dba so I don't have the sysdba privilege. Also I cannot shutdown the remote database. Is there a quick way to do this rather than I copy the tables one by one? Thanks
Considering you do not have DBA role granted and not having access to server machine, you won't be able to do a cold backup and install in on your machine, because cold backup requires database getting shut downed.
Secondly, you can't use rman utility either.
You can use expdp utility to get database exported as files and import it to your db with impdp utility.But in order to get data exported you at least need CONNECT and RESOURCE roles granted to your user ( Assuming you already have CONNECT otherwise you won't be able to connect to db at all ) and with those roles you can only import objects you already have access to. Including objects you own.
On the other hand, if you need a full database export, then you need EXP_FULL_DATABASE granted. DBA, SYS and some other roles has this role included. So your best chance is to contact dba's asking for the role granted to your user, see how they react to that.

How to create a database in Oracle using JDBC?

I want to create a new database on an Oracle server via JDBC. I cannot seem to connect to the database without providing an SID: using a URL like jdbc:oracle:thin:#//[IP]:1521 results in an error of "ORA-12504, TNS:listener was not given the SID in CONNECT_DATA"
Alternatively, if I log into a specific SID, I can run most DDL commands except for CREATE DATABASE foo which fails with an error of "ORA-01100: database already mounted"
How am I supposed to create a database if I cannot connect to the server without specifying a specific database and cannot create a database if I am already logged into a specific database?
AFAIK creating a database needs an internal and direct connection which can only be done by logging in directly on the server (normally a user account called 'oracle').
One reason for that: users are stored in the database itself. No database = no user to connect to by an external client.
Please also note Justin's comment about oracles database schemas. This is probably what you are looking for
What you need are following commands:
CREATE TABLESPACE CREATE USER and few GRANT ... TO ... -- to have rights to connect and create objects, at least

Resources