How to activate the hr schema in Oracle 11g

I am learning PL/SQL and am using SQL Developer cause I created many users with hr schema. But when a user logs in to SQL Developer give an error like the users is invalid. but When I use the system user, it works perfectly but without hr schema.

So:

  • How can I activate the hr schema in system user or
  • How can I make a user for use in SQL developer.

I am using Oracle 11g express

Answers


Not sure this should even be an answer since the question is kind of light on concrete details, but you need to grant the appropriate privileges on the database to the new users for them to be usable.

For example you need to grant "create session" for the user to be able to connect and appropriate access to the tables the users should have access to.

Then the users have the correct privileges, you should be fine using SQL developer.

You can find a sample that may help you setting up a user correctly over here but setting up permissions on the database is a bit dependent on how you want the security to work (ie read-only, stored procedures, access to certain tables restricted...)


ALTER USER hr IDENTIFIED BY hr ACCOUNT UNLOCK;

Then, enter this command

CONNECT HR/HR


This may help

ALTER USER hr IDENTIFIED BY hr ACCOUNT UNLOCK;

GRANT CONNECT, RESOURCE to hr;

ALTER USER oe IDENTIFIED BY OE ACCOUNT UNLOCK;

GRANT CONNECT, RESOURCE to OE;


Need Your Help

PHP: Using APC as general cache, XCache as opcache, possible?

php apc xcache

I'm really intreagued by the general cache aspects of APC and want to use it in my code (this I know how to do, this is not the problem).

Adding new class in framework via SDK-Addon: NoClassDefFoundError

android frameworks sdk add-on

I am trying to introduce a new API on the custom android 4.0.3 image.