problem when creating a new connection in SQL developer [closed] - oracle

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
when I created a new connection I find that it contains same content as the previous one, even I have not written anything to this new connection.

A SQL Developer connection is just a session. If you use the same username as an existing connection's user you will see the objects belonging to that schema.
If you want to create a new user you actually have to create a new user. Connect as SYS (using SYSDBA connection) and
create user new_user identified by some_password
default tablespace users;
grant create session, create table, create procedure to new_user;
grant quota 100M on users to new_user;
Obviously give the user an appropriate name for your needs. Grant it all the privileges it needs. Find out more.
Once you have created the user you can create a SQL Developer connection for it.

Related

Oracle: Can't find any tables in a schema that I know exists [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
First of all, I am almost totally ignorant when it comes to Oracle. I've dealt with SQL Server for many years, so I am familiar with SQL in general.
I have a Schema (which I think is the equivalent of a database in SQL Server?) and it has tables under it. I know the tables exist. I have a linked server connection to them from SQL Server and I see the tables and the data. I was able to get to these tables before in SQLPlus and SQL Developer using the ALTER SESSION SET CURRENT_SCHEMA MySchema command.
Now when I try to query those tables I get
ORA-00942: table or view does not exist
00942. 00000 - "table or view does not exist".
I'm logged in with the System account, which is the same account my Linked Server is using, and my understanding was that System should have access to all schemas and tables.
My fear is that I somehow messed up permissions to System and it can't see the schema anymore. Is that possible?
You need to consider name resolution as well as access privileges.
You are connected to an account with godlike powers (generally inadvisable, by the way, rather like logging in as root in Linux), but that on its own doesn't help to resolve a reference to EMPLOYEES when it's a table in the HR schema (for example). For that you would need to either
Refer to HR.EMPLOYEES, or
Create a private synonym belonging to the account you'll be using, defining EMPLOYEES (or whatever you want) as a reference to HR.EMPLOYEES, or
Create a public synonym, or
alter session set current_schema = HR.

Which oracle database user to use for creating tables, procedures, views, deleting those and insert into tables [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have to know which user have developer's roles and privileges, how to connect him to my pluggable database and allow him to create, delete, drop, insert into tables ,create and drop procedures/functions/views .
and in my connection in my app jdbc which user can i use.
Is this your database, and by that I mean, did YOU create it?
Then the answer is, you need to create at least one schema for your application, and maybe perhaps as many as three.
Is this someone else's database? If so, they should give you credentials for the account you are meant to use.
Assuming this is a database you yourself just created, it's very important that you do NOT use these default admin accounts for you to do your application work in:
SYSTEM
SYS
Instead, use these accounts to create a user for your application.
Note that this USER will be able to do anything it wants to any object it owns (the SCHEMA).
For this reason, you often find this sort of layout for applications in an Oracle Database:
a schema for the application data (tables, views, materialized views)
a schema for the application code (PL/SQL and maybe stored Java procedures)
a schema for the application user
NO ONE gets to login as the application schema.
The stored procedures in the second schema are only given the privs absolutely necessary to do their job - READ/SELECT on a table perhaps, but not INSERT or UPDATE if it's just a proc to get data back.
The 3rd schema is only given execute privs on the 2nd schema.
If you create a user, they can do any/all of the things you mention -
create, delete, drop, insert into tables ,create and drop
procedures/functions/views
But they won't be able to do anything to objects/data in another schema unless you grant them the ability to do so. And in most cases, you would NOT do so. You'd write a PL/SQL API that does this work, and then grant execute privs on this API to your APP user.

Oracle: Creating new database remove existing user [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I used Database Configuration Assistant to create new database but afterwards notice all exsiting database user disappeared. Please help!
how you are checking the users?
run > cmd
set ORACLE_sid=<database_name_here>
sqlplus / as sysdba
select username from dba_users;
I bet you've created the new database and are logged into it instead of the existing instance (maybe?)
Check which database you are in 1 of two ways:
echo $ORACLE_SID or select name from v$database;
If you find you are logged into the new instance find your old one and switch to it:
Find all SID's installed in your environment: cat /etc/oratab
Switch to it: . oraenv then enter in the appropriate SID you found in the oratab.

Why the oracle databse is so unsafe? about "connect as" without a password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I start a sqlplus session, and enter "connect / as sysdba". just it. then the oracle let me login, without any password and user information.
so, is this just a XE edition's feature. or all oracle version let me login without a password.
by the way, what the "connect / as sysbda" means.
I can understand this "connect user/password#db-sid". but it doesn't follow this pattern. the databse don't has a sysdba user, so what's the command mean?
From Oracle Forum Post
-- sqlplus "/as sysdba" it mean is you use OS authorization and your user must member of dba(ORA_DBA) OS group,else operation will fail.
-- sqlplus sys/pass#sid as sysdba it mean is you use passwordfile authorization .And in this case you need properly configure this file
also need set remote_login_passwordfile= EXCLUSIVE or SHARED.

Can I find the Oracle schema user name and password knowing just the SID? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have an application running on a Linux machine. The application is using Oracle as back end.
I do not know the user name and password or any schema which the oracle is using to run the application. All I know is the Oracle SID. Can I know the oracle user name and password with this that is required to run the application?
Not without a lot more information, no.
Imagine that you could get a username and a password only by knowing the SID and, presumably, the IP address of the server the database is running on. That would meam that it would be incredibly trivial to break in to any database in the world. A SID is a 12 character string that is case-insensitive on some platforms and is limited to letters and numbers. That would be a rather insensitive password. But a SID is also needed to connect to the database so it has to be widely distributed. If that was all that was necessary to break in to a database, no one would use Oracle for anything remotely important.
No, the only thing you can possibly do, remotely, with the SID and address of the machine is to connect to the TNS listener and query the services (depending on listener configuration).
Otherwise, I'd be selling my Oracle license for security concerns. :)
If you are on the machine itself, unless you have a user account on the database, or belong to the dba or osoper group or the like, you will not be able to connect to the database. Not in interest of hacking, but for information purposes, if you have an OS account, the only thing you might see is sqlplus, sqlldr or export sessions with credentials in the command string (which is why on a non-private machine you should always login to those utilities in prompt mode and not by passing the credentials on the command line).
The OP updated the question:
Login to Oracle as sysdba from the OS account, and query the v$session view while the app is active. If the app is logging in, it will show up in v$session. If you have trouble that way, but you happen to know a table name, query SYS.DBA_TABLES for the table name, and note the OWNER column. Or look at V$SQLAREA or one of the other dynamic views that shows current or recent SQL queries on the system.
Example:
root# su - oracle
oracle#linuxdb ~]$ sqlplus / as sysdba
SQL> select username, status, program from v$session where username is not null;
You can view or export the schema, once you know which one, without the app password. Once you reset the password, you will not be able to recover it. I would, instead, set the SYSTEM password, then run expdp (or exp) and export the schema. Something like:
oracle#linuxdb ~]$ expdp system/manager schemas=appschema <other parameters here...>

Resources