Save package spec and body in lower case ?
I'm using sqldeveloper 3.1.07. We have the convention to save all source files in lower case. However, when I do "Save package spec and body" the filename that is suggested is always upper case. Is there a setting for this that I missed or any way I can change this ?
Buntoro,
thank you very much - that worked just fine (if I start from the Tools menu and then can select only the packages and package body options - and then in the next step do the name filtering for the selected objects).
I was trying to use shift key and select multiple packages from the browser and then unload - that does not give you the "package body" selection option. In that particular case, the related package bodies for the selected packages should be automatically included - but I don't know if that can be classified as a bug or even an improvement, given that this can be achieved from the Tools menu (then unload).
I understand what you mean by
========================================================
"Note that the Package Spec displays only the choosen ones.
But, why on earth unloading all of package body instead of the ones which we chose before?
Simply forward, the output of this caused all of the package body to be exported.
So please be aware before using this."
========================================================
I also believe this is a bug and needs to be fixed.
Buntoro, thanx again.
R/ Zaf
Edited by: zaferaktan on Jan 12, 2011 10:57 AM
Similar Messages
-
30EA2 Save package spec and body - saves only spec?
It seems that the "Save package spec and body" in the popup menu on the spec in the object tree view actually only saves the spec (.pls).
Is that so?Buntoro,
thank you very much - that worked just fine (if I start from the Tools menu and then can select only the packages and package body options - and then in the next step do the name filtering for the selected objects).
I was trying to use shift key and select multiple packages from the browser and then unload - that does not give you the "package body" selection option. In that particular case, the related package bodies for the selected packages should be automatically included - but I don't know if that can be classified as a bug or even an improvement, given that this can be achieved from the Tools menu (then unload).
I understand what you mean by
========================================================
"Note that the Package Spec displays only the choosen ones.
But, why on earth unloading all of package body instead of the ones which we chose before?
Simply forward, the output of this caused all of the package body to be exported.
So please be aware before using this."
========================================================
I also believe this is a bug and needs to be fixed.
Buntoro, thanx again.
R/ Zaf
Edited by: zaferaktan on Jan 12, 2011 10:57 AM -
Schema name not present on filename for "Save Package Spec and Body"
In versions previous to 3.0 EA, the filename defaulted to schema.object.sql when using the "Save Package Spec and Body" on the right click of the package/body. This appears to have disappeared. Also, it now defaults to the .PLS ext/type, which I prefer to save them as .SQL (which i can override, but it would be nice in the file type dropdown). Also, I had posted a suggestion about the actual file not including the schema name prefixing the object name when using the "Save Package Spec and Body". i.e. it does create or replace package reader_package instead of what it should be doing which is create or replace package schema.reader_package
Would be nice indeed having the real name as default, and all supported PL/SQL types (as in the preferences) in the extensions dropdown.
As for the schema name inside, I reckon that would do damage for more users than it would do good for others. But a preference would be best of course.
K. -
Bug SQL Developer 3.0.04 Save Package Spec and Body to ips file bug
Hi.
I have problem with export package body end header. Exported ips file have some rows switched compared to original source code.
SQL Developer version: 3.0.04. Build MAIN-04.34
Error simulation:
- Click on package header with right mouse button in SQL Developers Connections bar
- In context menu choose 'Save Package Spec and Body...'
- Save ips file... (Small bug: Offered file name is wrong (= last saved package/file, not actual name of package) :-( )
- This file(source code) compare with original source code in Developer and u will see switched rows every +-90. row in source code.
Can u fix this in next version of SQL Developer?
Thanks...
Edited by: 880809 on 22.8.2011 6:57Bug 12904494 has been created.
Michael -
In previous versions of SQL Developer, there was always an All Files option in the dropdown when saving package spec and body. Now we're using the latest version 3.1.07.42 and the only option available is to save as a .pls extension. We do not use .pls files in our system, and it's annoying to have to save as .pls and then copy the code into another file. Does anyone know a way around this, and also why Oracle has put such a restriction on the save function?
Hi,
Welcome to the forum. This behavior of the chooser UI for Save Package Spec and Body changed between 3.0 and 3.1, mostly for the better, I assume, except perhaps for the issue on which you comment. In general, I believe there was an effort to make the user experience more consistent across the product when opening or saving files.
Checking this area in the code line up next for release, I see that pls and sql are the file extension choices, but not all files. Will that help?
Regards,
Gary
SQL Developer Team -
LO,
When using the "save package spec and body", a single file (pls extension) is generated with package spec and package body, including '/' characters, which is what is expected.
The trouble is that if you open this file back with SQL developer, a PL/SQL editor is opened with both spec and body. This prevents the compilation, since either spec or body is expected, not both.
Suggestion #1: open two PL/SQL windows, one for spec and the other for body
Suggestion #2: do not open PL/SQL editor, but rather SQL Worksheet for pls files
I do not indicate a version since it happens in every version.
Thanks to correct,
Olivier.Added default file filter *.sql -- the choice between PL/SQL editor and SQL Worksheet is based upon file extension. Expect fix in 3.1.1
-
Bulk Export Package Spec and Body as single file
Is there a way to bulk export the package spec and body into a single file, you can export spec and body if you choose each individual proc/package but if you just choose the spec/body individually from the connection - > packages list it only exports that part of the code. If not i will raise as an enhancement.
Thanks
TrottyThanks for your update K.
Have tried that and you can sort of do it however you still have to choose/select the spec/body individually so twice the overhead selescting them.
Will raise an enhancement and see where it goes.
Thanks
Trotty -
EA2 - Export Wizard - No forward slash after package spec and body in sql
I exported a schema with the export wizard. My stand alone functions and sql types in the script have have a forward slash after the "end;" statement Great. However, package specs and body create statements do not have a forward slash after the "end;" and I believe they also should have this.
This appears to be a DB issue as we are just using DBMS_METADATA to generate the ddl. Please test manually using worksheet or sqlplus
exec DBMS_METADATA.SET_TRANSFORM_PARAM( DBMS_METADATA.SESSION_TRANSFORM, 'SQLTERMINATOR' , TRUE );
select dbms_metadata.get_ddl('PACKAGE', 'PACKAGE_NAME','SCHEMA') from dual;
I looked through the DB bugs briefly and noticed a few on other objects that were fixed in 9.2.0.6 but I didn't see one for Packages...
This is not something I would fix in SQL Developer as the core issue is with DBMS_MEATADATA and your version of the DB.
As this is fixed in 10 I'm sure you can work with support and request a backport if it's not a currently available patch. -
Split a PL/SQL Package Spec and Body
I hope this was not discussed in some other thread somewhere (haven't found it), but my problem is:
How to split the Package Spec and Package Body in JDeveloper if you want to have both (for database deployment) as files in e.g. a subversion repository?
The problem arises if you have a couple of packages that are dependent on each other, so that you have to deploy the specs first to have the "public" part in place and afterwards the bodies to define the package functions/procedures.
Is there a way to do this?
TIA.
--Ciao, FD.If you want to store for example the package "mypackage" source code in a subversion repository
one possibility is to define 2 svn files:
- mypackage.pks (which contains the package "specification") and
- mypackage.pkb ( package "body").
I haven't tried this from JDev 11.2 but it works for example when using a single-user
svn repository from Sql Developer 2.1.1. ( in SQL Dev if you specify a database
connection you can compile the file based pakage specification and after then the
package body ...)
Regards
user_alex -
How to retreive contents of package spec and body over jdbc
is there a query i can issue that would return the contents (both spec and body) of a database package? similar to "desc schema.pkg" ?
i want to issue this query via jdbc and get back the contents of the package spec/body.solved:
select * from user_source where name='my_pkg'
Message was edited by:
user612126 -
Reg: Package Spec and Body
All,
I am adding a function to an existing package. I have added the function code only in the package body and compiled. I have received the below error.
PLS-00313: 'Fun_check' not declared in this scope
Where as, I have declared the same function in the package specification, then no issues.
So, my question is, Can't we add the function/procedure without the declaration of it inside the package specification.Because,I see, there were many functions inside the same package body, which were not declared in the package specification. What will happen, if we declare the function/proc inside the package spec and what if not.
Thanks in advance.
Thanks,EV259 wrote:
PLS-00313: 'Fun_check' not declared in this scope
For this error need to define the local programs before these being called by another program in package body.
Check below example for giving proper scope to local program in package body.
create or replace package p1
as
procedure p1;
function f1 return number;
end p1;
create or replace package body p1
as
procedure p1
is
var number;
begin
null;
var := f_l; -- first:- calling local f_l before defining will throw error
end;
function f_l --second:- defining local f_l
return number
is
begin
null;
return 2;
end;
function f1
return number
is
begin
null;
return 1;
end;
end p1;
Warning: Package Body created with compilation errors.
SQL> show err
Errors for PACKAGE BODY P1:
LINE/COL ERROR
8/3 PL/SQL: Statement ignored
8/10 PLS-00313: 'F_L' not declared in this scope
------ Now Creating scope for local function f_l through out pkg body by defining it first!
create or replace package body p1
as
------- can be called in any program below it
function f_l
return number
is
begin
null;
return 2;
end;
procedure p1
is
var number;
begin
null;
var := f_l;
end;
function f1
return number
is
begin
null;
return 1;
end;
end p1;
Package body created. -
I'm exploring an existing package and I can find in the package spec number of procedures are different than the number of procedure in the package Body, how can that happen; and if I try to create a package with different number it gives an error like "object defined in spec and not in body"
duplicate thread
Pachage Spec and Body
Please continue with other one. -
How to open and compile a package specification and body in SQL Developer
I'm currently evaluating a possible migration to SQL Developer.
Our PL/SQL code base is stored in scripts files named as follows: <schema>.<package_name>_<package|package_body>.sql and managed in SVN.
If now trying open a sql script containing the package specification or body and trying to compile it, I get no or strange error messages as if SQLDeveloper would not recognize the source as a PL/SQL code.
If I open an already compiled package from the database it seems to work as expected.
On the other hand I cannot find any option to write a package specification or body to a script except for the "Save package spec and body" option that only generates a single (!) script containing package specification and body in one single file and without any configuration options on how to name the generated file.
Any help is appreciated!What strange error messages ? Make sure to configure your extensions as PL/SQL file type under Preferences - File Types.
To save, just Save As under the File menu.
Hope that helps,
K. -
Error when Compiling package header and body - how change pkb file associat
Hi everyone,
it has already been noticed elsewhere (in the thread "Compiling package header and body" of Jan 12, 2010) that the compilation of package scripts sometimes fails (apparently because of a sqldeveloper bug) when the script contains the terminating slash /.
Is this bug still open?
Next question: In the above mentioned thread it is recommended as workaround to change the corresponding file type association from pl/sql to sql. I would like to do that; I know the place in the preferences dialog, but most of the associations there seem to be hard coded and cannot be changed.
I would appreciate any ideas!
Thanks in advance,
user8632123.For the workaround: you'd have to change the file's extension, not the association (to e.g. .sql).
Have fun,
K. -
Changing images and folders to lower case
I modified my Apache software so that all the URL's in my websites default to lower case before I realized that my images would also be affected. I also modified it so that underscores are changed to dashes. Thus, an image located at images/Maps/South_America.png now gets left behind when the URL defaults to images/maps/south-america.png.
So I have two choices - 1) Figure out a way to exempt image links from the new defaults, or 2) rename all my images and the folders that contain them.
As I haven't yet figured out how to do the former, I need to learn how to do the latter.
So I guess we're talking about as many as three or four operations here - change all folder names to lower case, change all images names to lower case and replace underscores in folders and images with dashes.
Can anyone tell me how to get started? I believe there are lots of tools and software programs that accomplish at least some of these, but I'd like to find out which operations, if any, Apple can do first. Ideally, I'd like to dump my entire images folder into some program and let it change everything. (I've already made a backup of my images folders, of course.)
Thanks.First of all be sure the font you're using has small letters and not just caps. If it does, then click the tiny triangle at the far left of the options bar and choose Reset Tool.
Maybe you are looking for
-
I would like to use my Appletv device to watch ESPN3 on my TV. Is it possible to set it up to do so. Where can I find instructions on how to set up?
-
Images as Hyperlinks in webi reports
Hi, I'm trying to link two webi reports (summary through Details) through Open doc syntax using Images in a cell. We have a requirement to link two webi reports (summary through Detail) using buttons (like Back & email) as images which will be embedd
-
Link between Purchase Orders - Sales Documents
Hi all, How can I find the link between a Purchase Order and a Delivery? I searched in table VBFA (Sales Document Flow) but I can't find anything. When I look into this table I only can see WMS Transfers Order and Shipment numbers. Does anybody have
-
NW04 Java add-in installation problem
Hi Friends, I am installing Unicode WAS 640 ABAP + Java system for XI3.0 on Windows/Oracle. I have installed ABAP system successfully. After that I was installing Java add-in on ABAP system. At the step 24 of 27 : Start SAP J2EE Engine, I was getting
-
How do I save aperture slideshow onto dvd
I have just created my first slideshow on aperture and now want to burn it to dvd. Can't find how to do this.