Posts

Showing posts from January, 2012

Change Listener Port For Oracle RAC

I think its useful to document this since maybe i will need it too :)

Environment

2 Node , Linux  .....

RAC database name: ORCL
Node 1 vip: myhost1-vip
Node 2 vip: myhost2-vip
Instance 1: ORCL1
Instance 2: ORCL2
Version: 11.1.0.7
New port: 1522


STEPS :

1) First, use netca to adjust the the listener port from 1521 to 1522. It's a good idea to use netca to do this cluster-wide and keep the OCR in check.
NOTE: This will shutdown the listeners across both nodes.

2)

2) In the tnsnames.ora for ASM and RDBMS, ensure the following entry exists (they'll probably be there but with the 1521 port, so adjust accordingly):

LISTENERS_ORCL=
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost1-vip)(PORT = 1522))
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost2-vip)(PORT = 1522))
)

LISTENER_ORCL2=
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost2-vip)(PORT = 1522))

LISTENER_ORCL1=
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost1-vip)(PORT = 1522))


3)
Connect to each instance and set the local_liste…

Resize Redolog On RAC Instance

Before I Posted "How To Resize redo log " This was on Single Instance But Now I show you how to do it on Oracle Real Application Cluster




1.First Run this Query To check size, redo On your RAC :

select l.group#, l.thread#, f.member, l.archived, l.status, (bytes/1024/1024) fsize
from v$log l, v$logfile f
where f.group# = l.group#
order by 1,2


2. Now our purpose is increase redosize from 100Mb to 300 Mb

3. We are going to add our new redo file by below command:

4.
alter database add logfile group 5 ‘+ORADATA’ size 300M;    <<   node 2
alter database add logfile group 6 ‘+ORADATA’ size 300M;    <<   node 2
alter database add logfile group 7 ‘+ORADATA’ size 300M;    <<   node 1
alter database add logfile group 8 ‘+ORADATA’ size 300M;    <<   node 1


5. Switch until we are into log group 5,6,7,8 so we can drop log groups 1, 2,3 and 4 Until you see the new redo log used .

Thank you
Osama mustafa



Resize Redo Log

Here is a newly created database redo log information:

SQL> select * from v$log;

GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- -------------------
1 1 17 52428800 1 NO INACTIVE 996238 06/09/2007 22:01:59
2 1 18 52428800 1 NO INACTIVE 1006432 06/09/2007 22:13:32
3 1 19 52428800 1 NO CURRENT 1036439 07/09/2007 09:56:44

SQL> select * from v$logfile;

GROUP# STATUS TYPE MEMBER
---------- ------- ------- -------------------------------------------------
3 ONLINE /database/data/redo03.log
2 ONLINE /database/data/redo02.log
1 ONLINE /database/data/redo01.log

Here is how i changed this to five 200M redo logs:

SQL> alter database add logfile group 4 ('/database/data/redo04.log') size 200M;
SQL> alter database add logfile group 5 ('/database/data/redo05.log') size 200M;

while running following sql commands, if you hit an error like this:

ORA-01623: log 3 is current l…

Linux Command On Windows :)

Image
Install CygwinCygwin comes with a normal setup.exe to install in Windows, but there are a couple steps you will need to pay attention to, so we will walk you through the installation.





To keep the installation small while saving bandwidth for you and Cygwin, the default installer will download only the files you need from the internet.




The default install path is C:\Cygwin




Click next until you come to a download mirror selection. Unfortunately, the installer does not say where the mirrors are located so in most cases you might as well just guess which mirror works best.




After you have selected a mirror, the installer will download a list of available packages for you to install. Here is where things get a bit more intimidating.
There will be hundreds of packages available separated by multiple different categories. If you don’t know what the package is you can leave the default selection and install additional packages later by running the installer again.


If you know wha…
Lot Of people Asked About DDL,DML,DCL So i Post it as new topic



DDL
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples: CREATE - to create objects in the databaseALTER - alters the structure of the databaseDROP - delete objects from the databaseTRUNCATE - remove all records from a table, including all spaces allocated for the records are removedCOMMENT - add comments to the data dictionaryRENAME - rename an object DML
Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples: SELECT - retrieve data from the a databaseINSERT - insert data into a tableUPDATE - updates existing data within a tableDELETE - deletes all records from a table, the space for the records remainMERGE - UPSERT operation (insert or update)CALL - call a PL/SQL or Java subprogramEXPLAIN PLAN - explain access path to dataLOCK TABLE - control concurrency DCL
Data Control Language (DCL) statements. Some examples:…

Threats to Database Security Part Two

Image
There's lot kind of database threats but we going to talk about the top 10 popular threats today in database


Top Ten Database Security Threats:


1. Excessive Privilege Abuse.
2. Legitimate Privilege Abuse.
3. Privilege Elevation.
4. Database Platform Vulnerabilities.
5. SQL Injection.
6. Weak Audit Trail.
7. Denial of Service.
8. Database Communication Protocol Vulnerabilities.
9. Weak Authentication.
10. Backup Data Exposure.


Now let's talk about every one of these threats shortly since I take lot time talking about Database
Security , as we see the previously we can merge the ten point in only five point since they are
talking on the same subject so it going to be like this :


My Five Point for Database Threats:
1. Privilege abuse.
2. Operating System vulnerabilities.
3. Database root kits.
4. Weak authentication.
5. Weak audit trails


Types of threats to database security

1. Privilege abuse:

When database users are provided with privileges that exceed their day-to-day job requirement, these privileg…