Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle 10g R2 on Windows 2008 Server

200754Jan 5 2010 — edited May 18 2011
Hi all,

Can I install Oracle 10g Release 2 on Windows Server 2008 64-bit? If not, is there any workaround solution? Our brand new server was shipped with Windows Server 2008 CD and we cannot install Windows 2003 on that machine.


Thanks in advance.

Comments

unknown-951199

>. Can I separately create those procedures and call inside the package body?

I give up.

Can you?

Most competent PL/SQL programmer could do so.

What exactly will be the benefit from doing so?

Will any one be able to measure any difference after you do so?

Do you have a solution that is in search of a problem?

Frank Kulash

Hi,

Satyam Rai wrote:

Hi All,

I have a question regarding a package which contains around 10 procedure. As I have declared all procedure in package specification, and in package body so it has become very lengthy around 700

lines of code.

Now I am using concept of private procedure to reduce some lines from package specification but still its look quite lengthy. Is there any process or idea by which I can reduce lines even from Package Body? Please provide syntax as well. Can I separately create those procedures and call inside the package body?

Sorry, without seeing your code, I can't suggest any changes.

If you have 700 lines of code in the package spec, then maybe there's too much in the package.  Perhaps it should be divided into 2 or more separate packages.

John Spencer

A package is intended to hold a group of functionally related units of code.  For example, you might have a package form employee maintenance in an HR application.  It would contain procedures to hire and employee, terminate an employee, change an employee's department etc.  As such, it needs to have whatever code is required to do those jobs. 

If that means that there are 30 or 3 procedure in the package spec then that is what is required.  Similarly, the package body needs to have at least the procedures defined in the spec plus, in most cases, other helper procedures that do parts of the job but are not callable externally.  In packages that I have written, they vary from having one procedure in the spec and hundreds in the body to having 40 in the spec and 40 in the body.  There is no "right" number for the number of procedure n the spec or the body.

Not exposing procedures in the package spec if they are not intended to be called externally is a good practice, but the private procedures a re still needed.  Moving those out of the package to implement as standalone procedures is wrong.  It can cause all sorts of issues for dependencies and future maintenance,

John

Nimish Garg

Can I separately create those procedures and call inside the package body?

Yes you can  !!!


Why do you want to reduce package size. Anyways you can divide the package into 2 or more packages as Frank said, probably divide them is some logical ways i.e. as per their funcationality


BrunoVroman

Hello,

note that IMHO 700 lines is really not much, you could have dozens of thousands of lines... I think that what has to be in a package or not is not guided by the length of code. You might have a look at Steven Feueurstein's column in the issue of January 2015 of Oracle Magazine : When Packages Need to Loose Weight

Best regards,

Bruno Vroman.

Chris Hunt

Well, you could tote your package body into your text editor of choice, replace all carriage returns with spaces and presto! Your package has one line of code.

That's only slightly less sensible than your question.

  • Put things into a package if they're logically related (you may interpret this relationship as strictly or as loosely as you like).
  • Only make procedures/functions public if they need to be called from outside the package
  • Don't worry about "lines of code"
unknown-951199

Regardless of how the code is packaged, the total number of lines of code will remain approximately the same.

You remind me of the following story.

A guy orders a pizza.

The order taker asks him does he want it cut into 12 or 6 pieces.

The guy responds to please cut it into 6 pieces because he is not very hungry & could never eat 12 pieces.

EdStevens

Satyam Rai wrote:

Hi All,

I have a question regarding a package which contains around 10 procedure. As I have declared all procedure in package specification, and in package body so it has become very lengthy around 700

lines of code.

Now I am using concept of private procedure to reduce some lines from package specification but still its look quite lengthy. Is there any process or idea by which I can reduce lines even from Package Body? Please provide syntax as well. Can I separately create those procedures and call inside the package body?

700 lines of code for an entire package isn't much.  Why do you think it needs to be reduced.  If you try to break up the package into multiple packages just to reduce lines of code, you need to consider the impact on all the application code that references the procedures in that package.   I remember reading an article recently about 'breaking the contract' when you change the interface of a package.  I can't find it now and don't remember the author, though I think I was Tom Kyte.

Frank Kulash

Hi,

Chris Hunt wrote:

Well, you could tote your package body into your text editor of choice, replace all carriage returns with spaces and presto! Your package has one line of code.

...

Good idea, but watch out for line-ending comments

...

PROCEDURE  proc_a;  -- Comment

...

should be changed to

...

PROCEDURE  proc_a;  /* Comment */

...

Sven W.

Comments should be deleted. After all they have no true meaning!

EdStevens

Chris Hunt wrote:

Well, you could tote your package body into your text editor of choice, replace all carriage returns with spaces and presto! Your package has one line of code.

Good idea!    And while they are at it, they could eliminate any unnecessary tabs and repeating spaces.  Getting rid of all those extra characters will make the code run faster as well!  

Frank Kulash

Hi,

Chris Hunt wrote:

Well, you could tote your package body into your text editor of choice, replace all carriage returns with spaces and presto! Your package has one line of code.

...

That also solves the problem of misleading error messages.  For example, I sometimes get an error message that says something is wrong on line 50, but it turns out that the problem is really that I forgot a single-quote on line 40.  If we get rid of the returns, then all error messages will say "Line 1", and we'll know exactly where the error is.

unknown-7404

What PROBLEM are you trying to solve?

I have a question regarding a package which contains around 10 procedure. As I have declared all procedure in package specification, and in package body so it has become very lengthy around 700

lines of code.

Sorry - but that MAKES NO SENSE.

Declaring procedures in the spec does NOT make the package body any longer. Sure - the procedure declarations are repeated in the body but it is the CODE in the body that makes the package body longer.

Now I am using concept of private procedure to reduce some lines from package specification but still its look quite lengthy. Is there any process or idea by which I can reduce lines even from Package Body?

Why do you want to make the package spec smaller? It is a SPEC - it does NOT have any code.

If you have 10 pairs of pants then they will take up a certain amount of room. You can move ALL of them from your bedroom closet to the hall closet but they will STILL take the same amount of room.

You won't save 'space' by moving something. You save space by donating some things to good will or the Salvation Army. Even that only works if you STOP BUYING NEW THINGS!

What PROBLEM are you trying to solve?

Jarkko Turpeinen

Hi Satyam,

Please provide syntax as well. 

here you are https://docs.oracle.com/database/121/LNPLS/packages.htm#LNPLS009

If you want serious suggestions for coding conventions for example, you need to show some if not all of your code.

1 - 14
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 14 2011
Added on Jan 5 2010
8 comments
5,671 views