If you need to download latest workflow client, for EBS, search in metalink for Doc ID # 261028.1.There are different versions, to be downloaded depending on what version of Oracle RDBMS you would be working on. For example if the RDBMS version is 10g or above, then download patch # 4066964 click here.to go there.
If you intend to work on non-EBS Oracle installation, then you can download from OTN - click here to go there.
Notes on daily happenings around me, while I work hard - or hardly, depending on the viewpoint - in the Oracle World
Friday, May 28, 2010
Sunday, May 23, 2010
SQLDeveloper - Connection parameters
Here is how I am able to connect to the database using SQLDeveloper, without using TNSNAMES option.
Note: All the notes have been written for *nix (Linux/UNIX) OS versions
Leave the connection Type as "Basic"
Determine the Hostname, port and global database name as mentioned below:
- open a terminal
- type lsnrctl (the prompt will change to LSNRCTL>)
- type show pid
- This will display host (which you will enter in hostname) and the port values.
- Next determine service name by running the following SQL:
- SELECT VALUE AS "Service Name" FROM v$parameter WHERE name = 'service_names'
- Enter value into Service Name
- Click on Test and ensure that you are able to connect.
- Finally click on save to save it in the connection list.
Tuesday, May 18, 2010
How to reconfigure Oracle Enterprise Manager on Linux
I was unable to connect to Enterprise Manager Console for the last one week. I had tried out everything that I could search for from the web, but nothing seemed to work. I was able to start the dbconsole, connect, but it would give me a message stating "Enterprise Manager could not to connect to the database". Finally, in sheer desperation,I thought of dropping and recreating the EM. I chanced upon a well written article, by MacLochlainns, (See References below) on recreating the EM in windows. Although, I am running on Linux, I was sure, the commands would be same or similar. It turned to be the same!. In fact, I did not face any of the problems mentioned in his blog (Point # 7). Users, SYSMAN and MGMT_VIEW, the PUBLIC Synonyms setemviewusercontext & mgmt_target_blackouts and the role mgmt_user, were all automatically dropped,.
Other than that, rest of it, I just followed his instructions and I have the EM running. Thanks a lot MacLochlainns
The commands I used, are listed below:
Start the Oracle Listener and Database
emca -deconfig dbcontrol db -repos dropOnce the above command finishes, run the following one:
The emca command required me to enter Oracle SID, Listener port; passwords were keyed-in without using double or single quotes (again there was a difference between my reconfiguration and MacLochlainns web article). In other words, key-in just the passwords, encasing them within double quotes is not needed.
Finally, I accepted default values for Email notifications, Outgoing Mail Server for notifications, and I was done.
emca -config dbcontrol db -repos createImportant: Backup emkey.ora, since the database is kept in encrypted mode. If the key gets corrupted then, all the data will be lost.
once it is completed, test run it by logging onto the Enterprise Manager console.
References :-
How to reconfigure Oracle Enterprise Manager on Windows | MacLochlainns WeblogOracle's page on Enterprise Manager Configuration Assistant (EMCA)
Saturday, May 15, 2010
Errorlogging Clause in 10.1 and above
I was working on the Errorlogging clause in the Insert statement which can be used to capture errors that may occur while inserting, and I noticed that Errorlogging clause does not automatically create an error logging table, if it is not specified. I was trying this using SQLDeveloper, so was not sure whether it was a bug in the SD or not. To test it, I ran it using SQL*Plus.
Here is the Insert statement with Error logging clause
Log Errors Syntax (Screen -01) |
Not mentioning table is Not an option (Screen -02) |
Created Error Log Table (Screen -03) |
As you can see from the screen below, the procedure got executed successfully (Screen -04)
Procedure to generate Error (Screen -04) |
The data got inserted into the Err$_Employees Table (Screen -05). So, I think I might have hit into a Bug, however, I am still researching about it.
Data Inserted Into Error Log Table (Screen -05) |
References:
Click here to view Insert StatementClick here to view DBMS_ERRLOG Statement
Click here to view well written example @orafaq.com
Bug: Could not find any bug other that this old one in Metalink # Bug 5255455
Sunday, May 9, 2010
Date display in Oracle/SQLDeveloper
A post in OTN forum (forum question was, How can I tell SQL Developer to always display datetime values in full?) asked how SQLDeveloper will display "Hours & seconds" in a "DATE" datatype, when the data entered is Date with no time component. Will it error out or will it display '00:00:00"? To this, I was certain, SQLDeveloper would gracefully display the timestamp at midnight. However, to prove it, I have to key-in data in date column and display them.
Before we get to that, let us first understand how Oracle stores DATE datatype.
Oracle stores date in 7 bytes (Ref: Oracle Advanced Application Developer's Guide. to access click here) Quote: Oracle Database stores dates in its own internal format. Date data is stored in fixed-length fields of seven bytes each, corresponding to century, year, month, day, hour, minute, and second. End Quote
So let us get back to SQLDeveloper and analyze how it displays date datatype
I would use the seeded table EMPLOYEES which has "hire_date" column defined as DATE datatype for demonstration purposes.
Emp table Columns and Datatypes (Screen -01) | |
Let us take an internal dump of the date and display the data (Screen -02)
Data Display (Screen -02) |
A brief note on the Datadump column:-
Let us take line # 6 and analyze. 120 represents Century, 109 represents Year (both are displayed as 100+Century/100+Year), then comes the month, and date. Next you would see 1,1,1 which represents the time portion (or in other words the time here is 12:00:00 AM). Time is stored as (HH+1),(MI+1),(SS+1) and displayed as 12+(HH-1) and so on. For example Line # 3 diplays 23-FEB-2010 06:34:12 AM and is stored as CC=(100+20), YY=(100+10), MM=2, DD=23, Hours=7 (6+1), Minutes=35(34+1), Seconds=13(12+1).
Why Century and Year are stored in excess 100 notation? so that we can represent BC numbers. If you look at Line # 4, you would notice that for Century and Year column the value is less that 100. That is because, the data represents BC.90-100=-10, the century inserted and the negative value will tell Oracle that it is a BC and not AD.Another point is that, we know that BC 1010 is greater than BC 1011 (line # 5). So it works perfectly well in binary sorting too.
So, to conclude, there is absolutely no issues in displaying date by SQLDeveloper
Saturday, May 8, 2010
TNS-12541: TNS:no listener
The command lsnrctl start ORCLPLSQL resulted in "TNS-12541:TNS:no listener " error yesterday; I was puzzled (See below).
(Screen -01) |
Oracle was working perfectly fine till then; moreover, I had not installed any new s/w at all.What could then be the issue?
A search on Google brought up this page: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
As listed in that web page, I tried the first one.
The Command, show parameter local listener displayed that tns port has not changed, listener.ora is pointing to the correct port.
Next, I tried tnsping avs.ramanujam.com, which resulted in the same error message.
(Screen -02) |
Another thing I noticed was, both starting up the listener and tnsping was taking more time than usual. Next I ran the ifconfig command, I noticed that the ipaddress had changed. (I have to make a confession here. Even though the best practices and the recommendation is that "servers" should have static ipaddress, I had not made it static.) Bang- sound of myself hitting my head -changed the ipaddress in the /etc/hosts and I was back into business in no matter of time.
Final screen is after successful connection is shown below
(Screen -03) |
Wednesday, May 5, 2010
(Not a ) Bug in Debug Procedures in SQLDev
Today an OP in SQLDeveloper forum at OTN had complained about "disappearing" Green icon on Procedures (To read the post click here Note: Sue has pointed out that it is not a bug.I have posted an update below on how to use compiler with debug option. So if you just want to know how to turn on or off the compiler with debug option, just scroll down. If you have time to kill , go ahead and read the entire post. ) . So, back to my original post....
I just happen to have Windows version SQLDeveloper (Build Version 2.1.1.63) and Linux Version (Build Version 2.1.1.64) installed. Just a heads up for those who are wondering about the "green" icons, when you compile a procedure, in SQLDeveloper, if the procedure compiles successfully, then it will display a Green icon on the left of the procedure name. If the procedure fails to compile a "red" stop icon is displayed - pretty cute isn't it? Only that it does not seem be consistent across versions (or is it across OS versions, I wonder)?
Since I usually used Linux, I was not sure what the OP was talking about. I created a few test procedures in 63 (windows version) first (Screen -01).
Everything went off without any hitch, although it did not display the Procedure Complier bar, it was not a show stopper. I could compile repeatedly the procedure without any issue, and update the parameter for this procedure (Screen -02).
Next, I started my linux version and recreated the same procedure. Bingo! The first time procedure got compiled and the green icon was displayed. I could see the Procedure 'Compilation' Toolbar. However, when I compiled again, (Screen -03)
When I complied "with Debug option", I could see the green icon now (Screen -04)
But, I cannot modify the parameter window (Screen -05). I hope SQLDeveloper team will take note of this and correct the bug.
Update:
As Sue Harper had pointed out, it was a case of how I compiled. Default Compilation option for SQLDeveloper is to "Compile with Debug"
If you want to reset the default preferences to "compile and no Debug" go to Tools-->Database-->PLSQL Compiler and click on the optimization level and set it to 2. Note: This setting "tells" compiler to optimize the PLSQL Library units. (Screen -06)
After setting the preferences to zero, I reran the procedure and was able to change the input parameter ( See below) .
The log ouput window is shown below. Thanks Sue.
You might also want to read this post ( If using windows:-
I just happen to have Windows version SQLDeveloper (Build Version 2.1.1.63) and Linux Version (Build Version 2.1.1.64) installed. Just a heads up for those who are wondering about the "green" icons, when you compile a procedure, in SQLDeveloper, if the procedure compiles successfully, then it will display a Green icon on the left of the procedure name. If the procedure fails to compile a "red" stop icon is displayed - pretty cute isn't it? Only that it does not seem be consistent across versions (or is it across OS versions, I wonder)?
Since I usually used Linux, I was not sure what the OP was talking about. I created a few test procedures in 63 (windows version) first (Screen -01).
Windows Build version 63. Notice missing Proc toolbar (Screen -01) |
Everything went off without any hitch, although it did not display the Procedure Complier bar, it was not a show stopper. I could compile repeatedly the procedure without any issue, and update the parameter for this procedure (Screen -02).
Modify the parameter (Screen -02) |
Next, I started my linux version and recreated the same procedure. Bingo! The first time procedure got compiled and the green icon was displayed. I could see the Procedure 'Compilation' Toolbar. However, when I compiled again, (Screen -03)
Linux Build 64 (notice the Procedure Tool bar (Screen 03) |
When I complied "with Debug option", I could see the green icon now (Screen -04)
Go for Green (Compiled with Debug) (Screen -04) |
But, I cannot modify the parameter window (Screen -05). I hope SQLDeveloper team will take note of this and correct the bug.
Cann't change the parameter (Screen -05) |
Update:
As Sue Harper had pointed out, it was a case of how I compiled. Default Compilation option for SQLDeveloper is to "Compile with Debug"
If you want to reset the default preferences to "compile and no Debug" go to Tools-->Database-->PLSQL Compiler and click on the optimization level and set it to 2. Note: This setting "tells" compiler to optimize the PLSQL Library units. (Screen -06)
After setting the preferences to zero, I reran the procedure and was able to change the input parameter ( See below) .
The log ouput window is shown below. Thanks Sue.
You might also want to read this post ( If using windows:-
How to get SQLDeveloper working on Windows 7
If you are using *nix thenHow to make SQLDeveloper work on Linux
)Oracle Learning Library
Thanks to Sue's post (click here to read her post), I learned that, Oracle has introduced a Learning Library, includes online demonstrations, including APEX tutorials and SQLDeveloper demos. Truly worth watching. Click here to go to Oracle Learning Library. It is easy to search either by Product or by Category. For example to find out how to use SQLDeveloper for Microsoft Access, you would select "Database" under the "Category" and "SQL Developer" under "Product Component" and system provides a search output as shown below. Click on hyperlink under the column "Title" and a new window is launched displaying the Demo.
Monday, May 3, 2010
How to get SQLDeveloper working on Windows 7
Oracle SQL Developer 2.1
I have a 64 Bit Windows 7 installed in my laptop. So I downloaded and installed 64 bit Java software in my machine. Next I found where the jdk was installed (usually it is in the "C:\Program files\Java\jdk<version>". If you cannot find it, go to c:\ and type dir jdk*.* /s /p - 's' will search recursively and 'p' will pause after each page of display). Go to the directory where you have unzipped the SQLDeveloper and open the SQLDEVELOPER.conf file and updated the variable SetJavaHome (This file is located at sqldeveloper\sqldeveloper\bin directory. Then click on the sqldeveloper.exe (located in the same directory), a command window is opened and lanuches SQLDeveloper in a new window. (Note:Do not use the SQLDeveloper.bat - available in the same directory - to launch SQLDeveloper. This would result in problems Procedures/Packages/Function toolbar (see below)
This is the Screen from as launched from SQLDeveloper.bat;As you can see, Both the Compiler options and Procedure Toolbar are missing(Screen -01) |
This is the Screen from as launched from SQLDeveloper.exe;As you can see, Both the Compiler options and Procedure Toolbar are present(Screen -02) |
Version Screen for Sqldeveloper.bat(Screen -03) |
Version Screen for Sqldeveloper.exe(Screen -04) |
SO Exception, TNS-12514 and other errors
My Windows 7 was giving troubles of late and was crashing (Blue-screen-of-death) almost 3/4 times daily (Need to figure out that one at some other point of time). Naturally, the Linux OS installed in the VMware, also started giving problems. For the last two days, I could not connect to Oracle from SQLDeveloper. First I got ORA-12541 (Screen -1), then, ORA-12514 error and lastly, a "SO Exception".
Lastly, I logged into SQLPLUS as sys and ran the following command:-
Show parameter local listener (Screen -02).
Bingo! I found that the port number was wrong. Instead of 25000,my tnsnames and listener was set at 3801. Modified the listener.ora and tnsnames.ora and SQLDeveloper was able to connect again (Screen -03)
Labels:
connections,
Error,
How to,
SQLDeveloper,
TNS-12514,
tnsnames.ora
Sunday, May 2, 2010
PLSQL Document Stds from Steven Feuerstein
I missed noticing that Steven Feuerstein has published a PLSQL Standards Document nearly a week ago. For those who have not download you can do that by clicking here
Subscribe to:
Posts (Atom)