Home » SQL & PL/SQL » SQL & PL/SQL » HR Schema
HR Schema [message #220801] Thu, 22 February 2007 03:25 Go to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

hi...

can someone tell me how can i unlock the HR schema..??

thanks

cooler2005
Re: HR Schema [message #220803 is a reply to message #220801] Thu, 22 February 2007 03:28 Go to previous messageGo to next message
pmaupoil
Messages: 40
Registered: February 2007
Location: France
Member
alter user hr account unlock;
Re: HR Schema [message #220804 is a reply to message #220803] Thu, 22 February 2007 03:30 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

ok did that...i am logged in as hr now...but how can i unlock the tables within this schema???

[Updated on: Thu, 22 February 2007 03:49]

Report message to a moderator

Re: HR Schema [message #220829 is a reply to message #220804] Thu, 22 February 2007 05:19 Go to previous messageGo to next message
dhananjay
Messages: 635
Registered: March 2002
Location: Mumbai
Senior Member
hi,

unlock the tables ????????.can u elobrate




regards,
Re: HR Schema [message #220831 is a reply to message #220804] Thu, 22 February 2007 05:22 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
I think you misunderstood concept.

When new database create by default all user account is lock except (sys,system,dbsnmp,sysman).

before 10g scott a/c is also unlock but in 10g it is lock.

and tables in schema is not lock.

regards
Taj

[Updated on: Thu, 22 February 2007 05:23]

Report message to a moderator

Re: HR Schema [message #220893 is a reply to message #220831] Thu, 22 February 2007 11:37 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

Mohammad Taj wrote on Thu, 22 February 2007 16:52
Hi,
I think you misunderstood concept.

When new database create by default all user account is lock except (sys,system,dbsnmp,sysman).

before 10g scott a/c is also unlock but in 10g it is lock.

and tables in schema is not lock.

regards
Taj



well , initially when i was trying to log in as hr it kept showing the the hr schema is locked...then after using the code that pmaupoil gave me.....i was able to log in through hr...

and now when i do

select table_name from user_tables;


it gives me no rows returned.....

i have read it that hr schema has employees,departments,job_history...etc tables within it....

Re: HR Schema [message #220897 is a reply to message #220893] Thu, 22 February 2007 11:56 Go to previous messageGo to next message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Looks to me like there are no tables. I believe during an install, you are asked if you want sample tables installed. Maybe whoever installed select no.
Re: HR Schema [message #221109 is a reply to message #220893] Fri, 23 February 2007 22:34 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
First connect with HR schema.
select table_name from user_tables;

Can you cut and paste your sql output.

HR schema create during database creation if your select SAMPLE SCHEMAS OPTION if you select SAMPLE SCHEMA OPTION then below users are created.
1.HR
2.OE
3.OC
4.PM
5.QS
6.SH

and it will also create a tablespace called EXAMPLE.and tablespace size is 130MB.


according your above post if HR schema exists in your database then sure all HR schema tables is exists.

one more thing about HR schema.
after database creation ONLY SCOTT schema is LOCK.
then you have to just unlock SCOTT schema but HR schema is LOCK & EXPIRE then you have to unlock and alter user password through below command
"alter user HR identified by HR"

Re: HR Schema [message #221113 is a reply to message #220801] Fri, 23 February 2007 23:09 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

ok..did it...
i found this script on some website...

=========================================

hey another thing...

what is the code to see what privileges are given to a certain schema...???
Re: HR Schema [message #221114 is a reply to message #221113] Fri, 23 February 2007 23:35 Go to previous message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
what is the code to see what privileges are given to a certain schema...???


For Role.
SQL> select GRANTED_ROLE from dba_role_privs where grantee = 'T';

For Privs.
SQL> select PRIVILEGE from dba_sys_privs where grantee = 'T';


regards
Taj

[Updated on: Fri, 23 February 2007 23:36]

Report message to a moderator

Previous Topic: ORA-00600: [17012],
Next Topic: Appending blobs
Goto Forum:
  


Current Time: Fri Dec 02 23:22:36 CST 2016

Total time taken to generate the page: 0.08731 seconds