Тёмный

How to Set Up the Oracle HR Schema 

Database Star
Подписаться 62 тыс.
Просмотров 25 тыс.
50% 1

Опубликовано:

 

11 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 83   
@teannataylor1542
@teannataylor1542 2 года назад
Thank you so much for this. I am studying for a job interview and I hadn't been able to find one resource that doesn't seem to overlook a step/step(s). Your video was extremely concise and helpful after 2 hours of trying to get my feet off the ground in Oracle.
@DatabaseStar
@DatabaseStar 2 года назад
Awesome! Glad it was helpful for you!
@2armn
@2armn 3 года назад
Sweet lord all mighty i deleted all the tables on the hr db by accident and you just saved my life with your video, plus your voice relaxed the shit out of me.
@DatabaseStar
@DatabaseStar 3 года назад
Aah thanks, glad to hear it helped! This comment made my day!
@guilderw
@guilderw 3 года назад
He definaly has a relaxing voice, comes very useful when one is at thre wits’ end
@jackmason7943
@jackmason7943 2 года назад
Excellent video that ended my Oracle suffering for this weekend. I'm running Oracle Express, so the key for me was using SERVICE NAME: XEPDB1 in SQL Developer when trying to make a connection with the newly created user HR after running script one. The connection issues information in the description pointed me in the right direction there. Thank you so much!
@DatabaseStar
@DatabaseStar 2 года назад
Awesome, glad it was helpful for you! Yeah the service name and connection details can be hard to get right in recent versions.
@juleshairston7115
@juleshairston7115 2 года назад
I found this very useful after I struggled for hours. everything you said was spot on. Most other instructions were vague or assumed I knew things I didn't. I really appreciate this.
@DatabaseStar
@DatabaseStar 2 года назад
Glad it helped!
@imranshaikh-gt4tg
@imranshaikh-gt4tg 3 года назад
Thanks Ben, you solved my problem in 5 mins for which I was exploring from last 3 hrs. I was using 10g xe but unfortunately my hard disk got corrupted and I lost all the files, when I again installed it (10g) I was not able to connect to HR as it was asking password which I was not remembering some how I created system account with the new installation and from there I followed your video and got HR schema loaded into my 10g, it was quite challenging also as I was using older version of sql developer where I was not getting docker option. from system itself i created HR user and then created schema, MANY THANKS AND KEEP MAKING LEARING MORE EASY, KUDOS TO YOU!!!
@DatabaseStar
@DatabaseStar 3 года назад
Awesome, glad you solved the problem and got it working!
@robertomirelman6295
@robertomirelman6295 2 года назад
Good tutorial, but I got stuck. First, in script nº1, you must edit ALTER SESSION SET CONTAINER = ORCLPDB1; to the correct container. Oracle21 ships with XEPDB1, so the correct comnmand should be ALTER SESSION SET CONTAINER = XEPDB1; In script 2, you should mention that when you create conection HR, you must change from SID to the name of the PDB, in our case XEPDB1 , at the bottom of the "create connection" window. Thnak you for your time: it really helped me!
@DatabaseStar
@DatabaseStar 2 года назад
Awesome, thanks for the corrections! Yes, recent versions of Oracle include a PDB (Pluggable Database) which makes the connection process a little more confusing.
@gilapal
@gilapal 2 года назад
THANKS YOU SAVED MY DAY,MONTH ....
@deepakravi5272
@deepakravi5272 2 года назад
thanks mirelman u just saved my day!!!
@gracejohnson2857
@gracejohnson2857 2 года назад
hi i please im stuck at the part where I load the sql scripts. The files appear as txt instead of sql in the IDE. Can you assist with where Im going wrong? might you be able to assist?thanks
@tnza2k19
@tnza2k19 2 года назад
I'm new to the world of DB's after transitioning from another field, thank you for this useful content.
@DatabaseStar
@DatabaseStar 2 года назад
No problem, glad you like it!
@gracejohnson2857
@gracejohnson2857 2 года назад
hi i please im stuck at the part where I load the sql scripts. The files appear as txt instead of sql in the IDE. Can you assist with where Im going wrong? might you be able to assist?thanks
@gilapal
@gilapal 2 года назад
Thanks for this great video. I now have the HR sample database installed.
@DatabaseStar
@DatabaseStar 2 года назад
Glad it was helpful!
@mjverdugo
@mjverdugo 2 года назад
Congrats for this channel, Ben.
@DatabaseStar
@DatabaseStar 2 года назад
Thanks Marcelo!
@rahulgupta-zq3bk
@rahulgupta-zq3bk Год назад
Thanks a lot!! Saved my day.
@DatabaseStar
@DatabaseStar Год назад
Glad it helped!
@ajsawant4u
@ajsawant4u 2 года назад
That Helped create schema quickly !! thanks (y)
@DatabaseStar
@DatabaseStar 2 года назад
Thanks, glad it was helpful!
@basheerraad5570
@basheerraad5570 Год назад
I'm using Oracle 21C XE on my machine. by running the command "Show con_name;" I see that my pluggable DB is called 'XEPDB1' instead of 'orclpdb' so I had to change the first query in the first file . from "Alter session set container=orclpdb" to "Alter session set container=XEPDB1"
@DatabaseStar
@DatabaseStar Год назад
Ah good tip. Thanks for sharing!
@miitter
@miitter 3 года назад
Thank you so much, only edit i did was on the container.
@DatabaseStar
@DatabaseStar 3 года назад
Glad it was helpful!
@martinvuchkov9834
@martinvuchkov9834 Год назад
Okay. Perfect.. at the part "Create HR Connection" you make new connection, eazy peazy,, but your SID is different. When I try to make this conneciton i get ORA-12514. Awesome man.. I went after you turorials because all of the others are crap. And now how do you soppose we connect to this DB when we dont have this connection in our tnsnames file? How some newbie who wants to connect to Oracle will manage to do it by following these steps? Why there is no video on that.. Anyway, you are better than the others
@DatabaseStar
@DatabaseStar Год назад
Thanks for the feedback! I agree that connecting to Oracle can be tricky - it's actually the number one problem that I get asked about by those who are learning Oracle. And as you can probably tell, the connection process is not easy. I've written about some common errors and possible solutions here: www.databasestar.com/oracle-connection-issues/ I also plan on enhancing that page, and making a video, to include more about connecting to Oracle. So, that page doesn't include all issues that could come up, but it may help. If it doesn't help, then hopefully some other results in Google or Stack Overflow could help you.
@minhjavapc3057
@minhjavapc3057 Год назад
Great video! Thanks you so much!
@DatabaseStar
@DatabaseStar Год назад
Glad it was helpful!
@ashrafabdo5461
@ashrafabdo5461 2 года назад
I am from yemen, thank you very much ❤
@DatabaseStar
@DatabaseStar 2 года назад
You’re welcome!
@maatalamyriem
@maatalamyriem 2 года назад
thank you so much for this video,it really help me
@DatabaseStar
@DatabaseStar 2 года назад
Thanks, glad you like it!
@shanshanxu9978
@shanshanxu9978 3 года назад
thank you! solved my doubt!
@DatabaseStar
@DatabaseStar 3 года назад
Happy to help!
@gracejohnson2857
@gracejohnson2857 2 года назад
hi please im stuck at the part where I load the sql scripts. The files appear as txt instead of sql in the IDE. Can you assist with where Im going wrong? thanks
@DatabaseStar
@DatabaseStar 2 года назад
Could you check the files are saved with an sql extension? Otherwise you should just be able to run them in the ide
@basheerraad5570
@basheerraad5570 Год назад
very useful video
@DatabaseStar
@DatabaseStar Год назад
Thanks!
@TallesDiCunto
@TallesDiCunto Год назад
Just two things I thought useful after running the entire process: 1) If you need to make your PDB modifiable, just go to sqplus (in my case, using Windows command prompt) and write: sqlplus / as sysdba 1.1) Optional step, that might help or do nothing (in my case, my user of interest was SYSTEM): grant all privileges to USER_OF_INTEREST grant dba to USER_OF_INTEREST container=all; grant sysdba to USER_OF_INTEREST container=all; 1.2) Check your current PDB: select name,open_mode from v$pdbs; 1.3) Now having the PDB name and it properly in the "MOUNTED" state*, write: *1.3.0) If it is not mounted, you might just Google how to write the MOUNT statement and execute it in this step. Only then write the following: alter pluggable database YOUR_PDB_HERE open; alter pluggable database YOUR_PDB_HERE save state; From now on, your PDB will be readable/writeable. 2) If you do not use Docker, your service name will be only your PDB name, without the ".localdomain" part. Thank you for sharing!!
@DatabaseStar
@DatabaseStar Год назад
Thanks Talles for sharing, this is very helpful!
@ajithvenkatachalam5335
@ajithvenkatachalam5335 8 месяцев назад
Hi , first of all thank you for the instructions. Can you help me how to grant all privileges to hr?
@DatabaseStar
@DatabaseStar 8 месяцев назад
You can probably use the GRANT command in Oracle to grant privileges to the HR user.
@akankshathakur1032
@akankshathakur1032 2 года назад
Am not the option to connect script file to database. How could I?
@DatabaseStar
@DatabaseStar 2 года назад
What are you trying to do? What issue are you having?
@Gabonidaz
@Gabonidaz Год назад
Sir I would love if you could translate the other oracle sample schemas (sales history, order entry, product media, information exchange) into sql commands as well, I'm trying to learn sql from a docker oracle database but i cant install the sample schemas in any other way besides yours.
@DatabaseStar
@DatabaseStar Год назад
Yeah they can be hard to set up from the Oracle repository. Sure I can translate the other sample schemas.
@basheerraad5570
@basheerraad5570 Год назад
Thanks for your video. can you add OE schema as well ))
@DatabaseStar
@DatabaseStar Год назад
Sure, I can create some scripts and a video for the OE schema.
@harshitsati
@harshitsati 3 года назад
henlo, should I follow the same instructions for mySQL workbench?
@DatabaseStar
@DatabaseStar 3 года назад
It could work for MySQL but the scrips are designed for Oracle.
@harshitsati
@harshitsati 3 года назад
@@DatabaseStar aw, my professor is making us use oracle 10g :/ I wanted to continue using mySql, but I guess I'll have to switch
@DatabaseStar
@DatabaseStar 3 года назад
Oracle 10g!? That came out over fifteen years ago! Why not use 18c or 19c?
@harshitsati
@harshitsati 3 года назад
@@DatabaseStar explain that to my professor :(
@1Diana2ful
@1Diana2ful 3 месяца назад
Hello and TY... I got as far as loading 01 Create Account.sql --- my problem is running it. Please help
@1Diana2ful
@1Diana2ful 3 месяца назад
I made it work.... yay
@DatabaseStar
@DatabaseStar 3 месяца назад
Glad you got it working!
@abhishektripathi27
@abhishektripathi27 2 года назад
Is there any sample web application which can be used to connec to HR schema to play around?
@DatabaseStar
@DatabaseStar 2 года назад
Not that I know of. There may be an Oracle Apex application but I haven't used it.
@praishsewthal1681
@praishsewthal1681 6 месяцев назад
I am getting the following error for every line of the first script: Error report - ORA-01917: user or role HR does not exist 01917. 00000 - user or role %s does not exist *Cause: There is not a user or role by that name. *Action: Re-specify the nam Can anybody please assist?
@DatabaseStar
@DatabaseStar 6 месяцев назад
I assume this is happening on the command "DROP USER HR CASCADE"? If so, that's OK, because the user does not exist. You can skip this and run the next line which is "CREATE USER HR..."
@heinthantoo2224
@heinthantoo2224 2 года назад
Do we need to mount volume for permanent data?
@DatabaseStar
@DatabaseStar 2 года назад
Yes, if you're using this on Docker, you'll need to use a mount volume. I'm not sure how to set that up, but I'll look into it and create a video on it soon.
@danielj.3326
@danielj.3326 2 года назад
Hi. I ran your first script and everything was successful, but now when i try to connect to the hr database i get that error message: Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied. EDIT: I am using oracle xe 21c.
@DatabaseStar
@DatabaseStar 2 года назад
Hmm, it could be that you're connecting to the wrong database or the user is not set up correctly. I haven't used 21c XE yet, so maybe something has changed there too. I've got this post on resolving connection issues, hopefully it can help: www.databasestar.com/oracle-connection-issues/
@mohan.nagaraj
@mohan.nagaraj 2 года назад
I had same issue in 21c. When you run this CREATE USER HR IDENTIFIED BY hrpass; it creates password in uppercase. If you want to have it case sensitive include within ". Or try with HRPASS as password.
@abhi3088
@abhi3088 2 года назад
@@mohan.nagaraj not working for me..any idea
@gonzalomartinez453
@gonzalomartinez453 2 года назад
@@abhi3088 in database conection, inside details select 'service name' and enter XEPDB1.
@abhi3088
@abhi3088 2 года назад
@@gonzalomartinez453 yeah figured out..but thnx for reply
@MrStece
@MrStece Год назад
nuh.. dont work!
@DatabaseStar
@DatabaseStar Год назад
What issue are you having?
@carlosmanuelalvaradoandrad3801
@carlosmanuelalvaradoandrad3801 2 года назад
I have a problem with the first script, I am using the oracle connection in docker but the new image, this image I got for your video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-56dSXI2PbCQ.html I got the first problem in de command: alter session, I think it was the container, en your video, you use OraDoc in DB_SID. Plissss help me sorry for my English.
@DatabaseStar
@DatabaseStar 2 года назад
Which error are you getting? If you are using the Docker container from the other video you should use the connection details mentioned there.
@carlosmanuelalvarado7733
@carlosmanuelalvarado7733 2 года назад
@@DatabaseStar Hi ! I change the software of my Mac, because I was in the beta program, so I changed and it works 👌thanks for responded !
Далее
20 Tips for Oracle SQL Developer (To Save You Time)
16:59
Авто уровни Happy Glass level 604 - 606
00:49
99% Cost Improvement in This SQL - See How It’s Done
19:12
Oracle CDBs and PDBs Explained (With Connections)
9:14
7 Database Design Mistakes to Avoid (With Solutions)
11:29