Perhaps,you want to create a user whom priveleges will be the same as someone's privileges but you do not know this someone's privileges on database.Here's an helpfull code which will show you the way.
set heading off
set pages 0
set long 9999999
select dbms_metadata.get_granted_ddl('ROLE_GRANT', user)
from dual;
select dbms_metadata.get_granted_ddl('SYSTEM_GRANT',user)
from dual;
select dbms_metadata.get_granted_ddl('OBJECT_GRANT', user)
from dual;
Just after writing the code above,press F5 button to see magic.
23 Temmuz 2014 Çarşamba
21 Temmuz 2014 Pazartesi
ORA-20000 Oracle text error DRG-10599 column is indexed
I was trying to compare LIKE operator and CONTAINS function inside a query to analyse their speed to retrieve data.
I used HR Sample Schema table EMPLOYEE.
What i had to do is to create an index on the column which i tried to retrieve data from.
Then the problem was solved.
But the speed differed at each time that i compiled the queries one to another.I could not come up with an overall idea about using CONTAINS function.
I did the same operation with a table which has million datas in it.
Contest won by CONTAINS function by multiplying five times earlier the operator LIKE.
Index is significant. Speed is important. Experience of database you are using considerably makes difference.
I used HR Sample Schema table EMPLOYEE.
What i had to do is to create an index on the column which i tried to retrieve data from.
Then the problem was solved.
But the speed differed at each time that i compiled the queries one to another.I could not come up with an overall idea about using CONTAINS function.
I did the same operation with a table which has million datas in it.
Contest won by CONTAINS function by multiplying five times earlier the operator LIKE.
Index is significant. Speed is important. Experience of database you are using considerably makes difference.
<----LEFT JOIN ----------------------- RIGHT JOIN-----> VARIATIONS
I simply used HR tables DEPARTMENTS AND EMPLOYEES
What does left join do?
Simple.
It takes all datas from the left table even not matching with the datas joined table's joined datas..
What is from the left table? The table at the left side when joining operation is operated.
LEFT JOIN
ANOTHER VARIATIONS
LEFT JOIN
LEFT JOIN
What does left join do?
Simple.
It takes all datas from the left table even not matching with the datas joined table's joined datas..
What is from the left table? The table at the left side when joining operation is operated.
LEFT JOIN
RIGHT JOIN
ANOTHER VARIATIONS
LEFT JOIN
RIGHT JOIN
LEFT JOIN
RIGHT JOIN
Oracle SQL Developer Unable to Find Java Virtual Machine
When i try to open sqldeveloper interface,it has shown me a prompt to browse java jdk path. I had java jdk installed on my computer which was 64 bit. I browsed the 64 bit java jdk path but it displayed me an error as in picture.
Notice that
sqldeveloper does not accept 64 bit installed java jdk.It has to be 32 bit.
STEPS THAT I HAVE TAKEN
1-)Downloaded jdk_1.6.0_45
2-)Set Java Home in sqldeveloper.conf file path of jdk_1.6.0_45 as shown below.
There you go!
17 Temmuz 2014 Perşembe
What is the difference between varchar2 and char?
We have same datatype which is string but can be defined with different names.
These two names are defined whilst writing in pl-sql codes in format just like i showed down here;
varchar2(size)
char(size)
They might contain same string value for instance my name 'HAMDI' but why their definitions are different.
Let's have a look this issue with an example.
Let's imagine i declared them as they are below;
my_name varchar2(30);
my_name char(30);
i assigned them 'HAMDI'
string value 'HAMDI' has 5 characters. H-A-M-D-I
when char with my_name definition hold this data,it creates 30 character space in storage even it has 5 characters in it and it keeps rest 25 characters space still empty on storage.
In short,it tells storage that whatever i have as a value inside me, give me an area or space for 30 characters.
when varchar2 with my_name definition hold this data,it just request until 30 character space but takes a space for 5 characters in storage.
Shortly, I have a limit until 30 characters but i have 5 characters now so i am taking a space for 5 characters now.
if you are seeking for performance,char is better than varchar2
for example,if you want to update and make longer the size of content data,it will easily use fixed-space for character specified under char but if you do the same operation with varchar2,it will try to find a space in storage.
These two names are defined whilst writing in pl-sql codes in format just like i showed down here;
varchar2(size)
char(size)
They might contain same string value for instance my name 'HAMDI' but why their definitions are different.
Let's have a look this issue with an example.
Let's imagine i declared them as they are below;
my_name varchar2(30);
my_name char(30);
i assigned them 'HAMDI'
string value 'HAMDI' has 5 characters. H-A-M-D-I
when char with my_name definition hold this data,it creates 30 character space in storage even it has 5 characters in it and it keeps rest 25 characters space still empty on storage.
In short,it tells storage that whatever i have as a value inside me, give me an area or space for 30 characters.
when varchar2 with my_name definition hold this data,it just request until 30 character space but takes a space for 5 characters in storage.
Shortly, I have a limit until 30 characters but i have 5 characters now so i am taking a space for 5 characters now.
if you are seeking for performance,char is better than varchar2
for example,if you want to update and make longer the size of content data,it will easily use fixed-space for character specified under char but if you do the same operation with varchar2,it will try to find a space in storage.
LOCK,UNLOCK HR SAMPLE SCHEMAS
I will show how to lock and unlock HR sample schemas from different ways
1-)Command Prompt;Locking,Unlocking HR
1-)Command Prompt;Locking,Unlocking HR
2-)Sql Developer (Locking HR)
3-)Error after trying to log in with locked HR
4-)Unlocking HRDatabase Configuration Assistant
Here I have database configuration step by step;
When i configure a database, i used instrunctions written on a book which is written in Turkish Language. I want to advertise this book at end of all pictures because it is worth to do it. It is a good one for beginners. Simple,Readable,Understandable
When the subject comes to set up and configurations issues,it is significant. You need to do each step correctly and you need to be aware of what each step means.
1-)Click on the next button
2-)Click on the next button
3-)Here we are choosing what kind of reason we are creating this database for.The choosen option is for Online Transaction Processing.
4-)We write the global name of database,we can write also SID(System Identifier) name with global name but in RAC (Real Application Clusters) it has to be given differently. But with single instance configuration these names might be same.
5-)We set Oracle Enterprise Manager console in here. OEM(Oracle Enterprise Manager) can be load and configured later too. We do not do any action on Automatic Maintenance Task.
6-)Here we have the most administrative users. Instead writing password for each user,we defined same password for all of them.
7-)Here we might have an error telling us that password does not match Oracle recommended password complexity policy. You can change it but clickin on no will take you another step.
8-)Here we are choosing Storage Type.This is also asked while deinstalling database.I created a folder named data_DBHAMDI under my ORACLE_HOME path.
9-)Due to instructions on book i did not clicked on these two options which will be explained next book.
10-)I did something reverse than the book i followed at this step. I used Sample Schemas and i clicked on this option. Because i need HR tables which come with sample schema tables.It will consume
11-) Automatic Memory Management was selected and we let oracle to manage it.We could also specify PGA and SGA. We can do all later.
12-)We chose character set of database.It is 'WE8ISO8859P9'
13-)It can be seen where data files,control files and online redo log files are stored at picture shown below and the locations are possible to be changed.As defaults,two copy control files are created.It is likely to create more than one control file. It is also likely to be able to change the sizes of redlog files and add new ones.It is also possible to do same instructions after database configuration.
14-)Click on Create Database and Finish
15-)Click on OK.
16-)After completing configuration,another screen will be shown which tells database configuration details.
It is possible to unlock users and password change from Password Management.Enterprise Manager links are also given (Database Control URL)
Buy it! It will be helpful!
By the way ; I do not know who the author is personally. (Footnote)
Kaydol:
Kayıtlar (Atom)
















