Pages

Friday 11 February 2022

Working With SCOTT & TIGER in Oracle Database 21c Express Edition on your local system

We are working with Multitenant Architecture. The multitenant architecture enables an Oracle database to function as a multitenant container database (CDB). A CDB includes zero, one, or many customer-created pluggable databases (PDBs).

Once we install XE we always log in to cdb if you login with sys now we need to switch to pdb in cdb you are not allowed to create Scott we have to use some c##username we not going to talk about that, we are coming straight at the point.

once you login in sqlplus using sys as sysdba

C:\Users\ambi>sqlplus sys as sysdba
SQL*Plus: Release 21.0.0.0.0 - Production on Sat Feb 12 11:10:21 2022 Version 21.3.0.0.0 Copyright (c) 1982, 2021, Oracle.  All rights reserved.
Enter password:
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production Version 21.3.0.0.0
SQL> select username from dba_users where username='SCOTT';
no rows selected 
 
SQL> create user SCOTT identified by tiger;
create user SCOTT identified by tiger
            *
ERROR at line 1:
ORA-65096: invalid common user or role name

Where is the problem?

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 XEPDB1                         READ WRITE NO

once we got connected with sys We have to connect with a pluggable database like XEPDB1

SQL> alter session set container = XEPDB1;
Session altered.

SQL> show con_name

CON_NAME
------------------------------
XEPDB1

SQL> select username from dba_users where username='SCOTT';

no rows selected
we don't have scott in pdb now we will create
SQL> create user SCOTT identified by tiger;

User created.

grant permissions
SQL> grant create session to scott;

Grant succeeded.
SQL> grant connect, resource to scott;

Grant succeeded.
SQL> grant create any view to scott;

Grant succeeded.

checking for user exits or not in pdb
SQL> select username from dba_users where username='SCOTT';

USERNAME
----------------------------------------
SCOTT
now going to connect with scott

SQL> conn scott/tiger@192.168.0.198:1521/XEPDB1
Connected.

If you don't know what is your address you can check in your oracle net manager just see the address write it down and close the window without saving anything.

now going to create demo tables
if you don't know how to create demo tables you can read my article on this blog click me please.

SQL> @C:\DEMOBLD7.SQL
Building Oracle demonstration tables.  Please wait.

SQL> SELECT Tname FROM TAB;

TNAME
--------------------------------------------------------------------------------
DEPT
EMP
BONUS
SALGRADE
DUMMY
CUSTOMER
ORD
ITEM
PRODUCT
PRICE
SALES

11 rows selected.

Happy Learning.
This line is very important conn scott/tiger@192.168.0.198:1521/XEPDB1 otherwise you can't connect.

Please comment with your suggestions I will try to improve this article.
Disclaimer: These suggestions are only for local database installation in your own pc/laptop to learn and practice new concepts. don't try this in your production environment.



Saturday 16 August 2014

Free Suggestion For Sathish Yellanki Students(Ameerpet, Hyderabad)

If you want a solid knowledge of oracle then you have to follow every step of Yellanki Sir. If you succeeded in it, then nobody can stop you to achieve whatever you want in your life. Oracle gives you everything because the clients are very rich and the major market is covered by oracle only.

So how to be a successful database application developer
if you choose oracle you have to first learn two products of oracle

  1. SQL
  2. PL/SQL
and the good thing is no one can teach like Sathish Yellanki if you don't agree then I will consider maybe you have some communication problem or you are not able to understand because of English.

The First 10 Days In Class
  • first, try to listen to him carefully
  • catch the words and note down whatever words you don't know
  • within a few days, you will acquire the environment 
  • record his voice and listen to it again again, make notes
  • don't miss any single class
  • in the class, he will tell you I will give you 0 to 3 years of experience and if you don't miss any class you will get it definitely
  • he has 3 sessions of walking, jogging, and sprinting
  • he always warns you, to do your practice otherwise you have a problem in coming sessions

Introduction To SQL Function
  • too much crowd in class mostly java, .net, and other people also want to learn oracle but after joins and sub query they feel that things are useless according to their friends or their own analysis they start skipping the classes but a real passionate oracle application developer never drop a single class
SUB-QUERY
  • after subquery people start running away from classes because they don't have a single desire they want to be master of java, .net, c, c++ and they learn SQL server, dba so many things because Ameerpet has all the courses with lollypop price so be aware of these lollypops always clear your goal and ask yourself what do you want to be in your life? and stick with it.

After Hierarchical Till OLAP
  • suppose 1000 join the oracle class  then 400 will be remaining in the class

"But a real passionate oracle application developer never drops a single class"


Object-oriented database concept 
  • only real passionate oracle application developers understand the oodb, very few

PL/SQL Starts
  • people start coming again crowd comes but after the cursor people start skipping it doesn't mean Sathish sir has a problem here people have problems because of no clear goal, without practice they want to understand everything.
  • some times after completion of one course they got new pom-plate about new courses and they join that course too but they are not practicing whatever they learn earlier.

In The Last Class
  • that triggers very few real oracle lovers are there and hats off to you guys who have completed successfully
  • only 100 heads will be the last people who really want a career in oracle

Now You Have Many Options In Oracle
you can go for data-warehousing, remain as PL/SQL Developer or D2K(Forms and Report), or Go for the DBA side or APEX side more than 2500 products are there and the base is only SQL and PLSQL if you know core java that's good but not mandatory ( I don't know java)

if you want to be in touch with Sathish sir he has his own company see it here Skyess Techno Solution and you can learn many things from him.

because of Sathish sir, many people are working in big MNC. 

Thursday 15 May 2014

Oracle sql plsql spool file for practice from Sathish Yellanki morning 7am batch

Hi friends
i have unlocked all the oracle sql, plsql files and it is in the same order no files are missing.
so enjoy practicing sql and plsql.

You can even take print out also because i unlocked all the files.

click this link for sql, plsql files :ORACLE_SQL_PLSQL

 
one of the most respected and unique faculty for oracle


Sunday 11 May 2014

how to crack protected pdf or how to copy and edit from protected pdf

Often its tough to crack protected pdf, here protected pdf means pdf that is not allow you to edit or copy or it is a password protected pdf.

so how to crack??
follow these simple steps
download this tool and extract the folder and install it.
tool.rar

after that open any pdf and unlock.

Friday 2 May 2014

HOW TO CREATE DEMO TABLES IN ORACLE OR HOW TO CREATE TABLES THAT ARE PRESENTED IN SATHISH YELLANKI SIR SYSTEM

How to create demo tables.
actually its a script that is save as .sql extension just use the @(special character for running script from specific location in your system using sqlplus).

First what you need is the demo script.
Download it from this below link........

demobld.sql

after downloading save it in your drive.
ok now we will execute this script using oracle.
first copy this script in a folder and always care the folder name or path name don't have any space otherwise oracle will not read your script from your specific location.
now open sqlplus or on cmd prompt type sqlplus
give username and password
now write like this
SQL >@path_of_file_with_name
for example
SQL >@D:\oracle\sql\demobld.sql and hit Enter key
if every thing goes well your database is ready with these tables.

SQL> SELECT Tname FROM TAB;

TNAME
----------------
DUMMY
DEPT
EMP
BONUS
SALGRADE
CUSTOMER
ORD
ITEM
PRODUCT
PRICE