You are on page 1of 8

Oracle Installation Common Errors:

----------------------------------

Error 1: ORA-65096: invalid common user or role name in oracle

solution:

Before creating the user run :

alter session set "_ORACLE_SCRIPT"=true;

Error 2: Account is Locked?

Solution:

alter user <username> account unlock;

alter user <username> account lock;

How to get a list of locked accounts / check that account is locked?

SELECT username, account_status FROM dba_users;

Error 3 : TNS Protocol error /listner error

solution:

start-> run -> services.msc -> right click on the oracle services -> start

Error 4 : Network Adapter Error /IO Error:

start -> run -> command

c:\>lsnrctl status
c:\>lsnrctl stop
c:\>lsnrctl start

Error 5: Invalid username/password

alter user <username> identified by <newpassword>;

File:
-----
* A file is a collection of data stored in one unit, identified by a filename.

* It can be a document, picture, audio or video stream, data library, application,


or other collection of data.

File System:
------------
* A filesystem is the methods and data structures that an operating system uses to
keep track of files on a disk or partition;
* This is the way the files are organized on the disk.

Disadvantages of the file system:


---------------------------------
1. Data Redundancy

2. Difficulty in Accessing Data

3. Limited Data Sharing

4. Integrity Problems

5. Concurrent Access problem

6. Security Problems

Database :

* A database is an collection of data that is organized to be easily accessed,


managed and updated to relational databases.

Database Model:
----------------

* A database model is a type of data model that determines the logical structure of
a database and fundamentally determines in which manner data can be stored,
organized and manipulated.

The most popular example of a database model is the relational model, which uses a
table-based format.

Types of database models:


------------------------

1.Hierarchical database model. (operating system level)

2.Relational model. (SQL DEVELOPER,PLSQL DEVELOPER)

3.Network model. (LAN,WAN,MAN...)

4.Object-oriented database model.(.NET DEVELOPER,JAVA Developer) -MVC

Hierarchical Database Model:


----------------------------
* A Hierarchical database model is a data model in which the data are organized
into a tree-like structure.

* The data are stored as records which are connected to one another through links.
A record is a collection of fields, with each field containing only one value.

ex: hierarchical databases is Windows Registry in the Microsoft Windows operating


systems.
Network Database Model:
-----------------------
Network database model is a model for modeling the entities in such a way that one
child entity can have more than one parent entities.

Characteristics of network model:


----------------------------------

* More better than hierarchical model.

* Supports many to many relationships.

* Many parent can have many child.

* Many child can have many parents.

* Complex structure.

* Not very flexible to reorganize the model.

* Query facility is not available in network model.

Object Oriented Database Model: (MVC)


-------------------------------
* Object Oriented Database (OODB) provides all the facilities associated with
object oriented paradigm.

* It enables us to create classes, organize objects, structure an inheritance


hierarchy and call methods of other classes.

Relational model:
-----------------
oracle -> sqldeveloper

Basic Sql Operators:


--------------------
1.Arithmetical operators:
-------------------------
+ addition
- subtract
* multiply
/ division (quotient)
Mathematical function
--------------------
mod(10,3) => Division => remainder => 1

Relational operators:
--------------------
< less than
> greater than
<= less than or equal to
= equal to
!= not equal to
>= Greater than or equal to
Logical operators:
------------------
and
or
not

and
a b c=a*b
0 0 0
0 1 0
1 0 0
1 1 1

Note : if all input values are true then output is true else false.

or
a b c=a+b
0 0 0
0 1 1
1 0 1
1 1 1

Note : if any one input values are true then output is true else false.

not
a c
0 1
1 0

Special operators:
-----------------
in
not in
between
not between
like
not like
is null
is not null

Set operators:
-------------
union
union all
intersect
minus

Assignment operators:
----------------------
:=

a:=100;
b:=200;
c:=a+b;

Concatenation operators:
------------------------
|| - pipeline char
10 + 20 => 30

'sql'||'school' => sqlschool

Basic Sql datatypes or Fieldtypes:


---------------------------------
Character Datatypes ( a to z and o to 9)
---------------------------------------
char(2000) - fixed length char - 1 byte - Ascii - Static memory allocation -

Ansi syntax

varchar(2000) - Variant length char - 1 byte - Ascii - Dynamic memory allocation

- Ansi syntax

varchar2(4000) - variant length char - 1 byte - Ascii - Dynamic memory allocation

- oracle syntax

nchar(40) - fixed length char - 2 bytes - Unicode -fixed length char - ansi syntax

nvarchar(40) - Variant length char -2 bytes - Unicode - Dynamic memory allocation -

Ansi syntax

Number datatypes: (0 to 9)
----------------------------

number(10)
number(10,2) => 9999999.99

int =4 bytes => 32 bits

or
INTEGER = 4 bytes => 32 bits

Decimal point datatypes


----------------------
float - 4 bytes => 32 bits => (approx. 7 decimal digits)

Date and time datatypes:


--------------------------
date - 8 bytes -> by defaulat format -> 'dd-mm-yy'
timestamp - 14 bytes -> 'dd-mm-yy hh:mi:ss am/pm'

Raw Datatypes( Rowid => Hexadecimal format)


-------------------------------------------
raw - 4 bytes
long raw - 8 bytes

LOB (Large objects)


------------------
BLOB - Binary Large object - images,picture,songs,videos... - Internal

Bfile - Binary File - images,pictures,songs,.... - External


Clob - Character Large objects - documents,textfile,data file...- internal

Boolean Datatypes:
----------------
Boolean - True /false

You might also like