Package objects
Is possible to get a list of all objects encapsulated within a package.
Is there any data dictionary view etc to see what all procedure, functions, objects etc are declared/defined in any package.
user_sources doesnt help much and intention is not to look at the source but to list down a list like object_name-object_type within a package.
:) absolutely and Thanks.
While looking at the another thread where a user wanted to execute all his procedures in package(assuming there are no parameters and all are procedures), I though if it is possible to generate a dynamic query which will iterate through the procedure list in package and execute them.
This doesnt seems to be possible with simple pl/sql.
Similar Messages
-
Multiple SQL task objects inside a package object is not generating proper DTSX
I am programmatically adding multiple ExecuteSQLtask objects inside a package. I am specifying all the required properties to the ExecuteSQLtask objects. However, when I save the package object to dtsx, the package looses the properties of some
of the ExecuteSQLtask object.
In the below example, I have created 3 ExecuteSQL task objects using the function AddSqlTask. However, once you run it, one of the objects will loose its properties. What makes it more weird is the fact that sometimes, object 1 looses the properties,
some times, its object number 2. Its random. I know that these objects are COM objects. Is there something I need to careful of when setting the properties ? Why are the values lost when I save them to DTSX ?
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Tasks.FileSystemTask;
using Microsoft.SqlServer.Dts.Tasks.BulkInsertTask;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask;
using Microsoft.SqlServer.Dts.Tasks.ExecutePackageTask;
namespace PackageCreator
class Program
static void Main(string[] args)
#region Package 1
Package package1 = new Package();
#region ConnectionString
AddSqlConnection(
package1,
ConfigurationManager.AppSettings["ServerHostName"],
ConfigurationManager.AppSettings["SqlServerDefaultDB"]
#endregion
AddSqlTask(package1, "P1 - Task1");
AddSqlTask(package1, "P1 - Task2");
AddSqlTask(package1, "P1 - TaskFinal");
#region Add Dependencies
package1.PrecedenceConstraints.Add(
package1.Executables[0] as TaskHost,
package1.Executables[1] as TaskHost
package1.PrecedenceConstraints.Add(
package1.Executables[1] as TaskHost,
package1.Executables[2] as TaskHost
#endregion
#endregion
#region Package 2
Package package2 = new Package();
#region ConnectionString
AddSqlConnection(
package2,
ConfigurationManager.AppSettings["ServerHostName"],
ConfigurationManager.AppSettings["SqlServerDefaultDB"]
#endregion
AddSqlTask(package2, "P2 - TaskFinal");
#region ExecutePackageTaskClass
Executable exec1 = package2.Executables.Add("STOCK:ExecutePackageTask");
TaskHost th = exec1 as TaskHost;
ExecutePackageTask myTask = th.InnerObject as ExecutePackageTask;
myTask.PackageID = package1.ID;
#endregion
#region Add Dependencies
package2.PrecedenceConstraints.Add(
package2.Executables[0] as TaskHost,
package2.Executables[1] as TaskHost
#endregion
#endregion
//new Ispac(package1, package1.ID).DeployAndRun();
SavePackage(package1);
SavePackage(package2);
var packageList = new List<Package>();
packageList.Add(package1);
packageList.Add(package2);
new IspacPackageCollections(packageList).DeployAndRun();
Console.Read();
private static void AddSqlTask(Package package, string component)
//Thread.Sleep(5000);
package.Executables.Add("STOCK:SQLTask");
ExecuteSQLTask executeSQLTask = (package.Executables[package.Executables.Count - 1]
as TaskHost).InnerObject
as ExecuteSQLTask;
executeSQLTask.Connection = package.Connections[0].ID;
executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
component + @"')";
private static void SavePackage(Package package)
string packageNetworkLocation = @""
+ ConfigurationManager.AppSettings["packageNetworkLocation"]
+ @"\" + package.ID + ".dtsx";
new Application().SaveToXml(
packageNetworkLocation,
package,
null
//new Application().SaveToSqlServer(
// package,
// null,
// "ANUPN8470P",
// null,
// null
#region AddConnectionManager
private static ConnectionManager AddSqlConnection(Package package, string server, string database)
return AddConnection(
package,
"OLEDB",
String.Format(
CultureInfo.InvariantCulture,
"Provider=SQLOLEDB.1;Data Source={0};Persist Security Info=False;Initial Catalog={1};Integrated Security=SSPI;",
server,
database)
private static ConnectionManager AddConnection(Package package, string type, string connectionString)
ConnectionManager manager = package.Connections.Add(type);
manager.ConnectionString = connectionString;
manager.Name = String.Format(
CultureInfo.InvariantCulture,
"{0} Connection",
type);
return manager;
#endregion
public static void AddExecuteSqlTask(
Package _package,
string _componentId
_package.Executables.Add("STOCK:SQLTask");
// Get the task host wrapper
ExecuteSQLTask executeSQLTask = (_package.Executables[_package.Executables.Count - 1]
as TaskHost).InnerObject
as ExecuteSQLTask;
#region Set required properties
executeSQLTask.Connection = _package.Connections[0].ID;
executeSQLTask.SqlStatementSource = "insert into [dbo].[SupersetPackageDependencies] (Component) values ('" +
_componentId + @"')";
#endregion
//return executeSQLTask;Why you do not tell what properties get lost?
And why is the same get repeated (you want parallel?):
package1.Executables[0] as TaskHost,
package1.Executables[1] as TaskHost
package1.PrecedenceConstraints.Add(
package1.Executables[1] as TaskHost,
package1.Executables[1]
And why not to add them
like
package1.PrecedenceConstraints.Add(
package1.Executables[0] as TaskHost);,
package1.PrecedenceConstraints.Add( package1.Executables[1] as TaskHost
Arthur
MyBlog
Twitter -
Transport of a package object type DEVC
Hello,
when I create a transport task manually with package (object type DEVC) in SE10, does it
a) only transport the package definition again
or
b) transport the package and all the objects in it?
Thanks in advance for your help!Hi,
When you transport the package it transports the package and all the objects in it.
Regards,
Renu -
Can't access packaged object type in Java
Hi
I am getting the following error while accessing an oracle packaged object type. Can You please give me an advise..!!
java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_RECRegardsHI
I am not asking how to search in google. If You know how to resolve my problem..then help me. I don't what this kind of answers.
This is my problem
Error in java.
java.sql.SQLException: invalid name pattern: XXGW_RMA_CREATION_PKG.XXGW_RMA_REC
This is my package
create or replace package xxgw_rma_creation_pkg
is
type xxgw_rma_rec is record (dealer_name varchar2(40), dealer_desc varchar2(300));
type xxgw_rma_line is table of xxgw_rma_rec; --(item_name varchar2(40), item_desc varchar2(300)) index by binary_integer;
xx_rma_rec xxgw_rma_rec;
xx_rma_line xxgw_rma_line
procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2);
end;
create or replace package body xxgw_rma_creation_pkg
is
procedure xxgw_rma_creation (p_rma_rec in xxgw_rma_rec ,p_rma_line in xxgw_rma_line,p_rma_no out varchar2)
is
l_rma_rec xxgw_rma_rec := p_rma_rec;
l_rma_line xxgw_rma_line := p_rma_line;
begin
dbms_output.put_line(l_rma_rec.dealer_name||' '||l_rma_rec.dealer_desc);
for i in l_rma_line.first..l_rma_line.last loop
dbms_output.put_line(l_rma_line(i).dealer_name||' '||l_rma_line(i).dealer_desc);
end loop;
p_rma_no := '20';
end;
end;Rekha -
Hi
Is there some way to re-name entity objects, view objects and their packages after creating them?
I think one option can be to rename the various folders on my PC where I am storing all the source code, but I am not sure whether this is the way to do it.
Any pointers will be appreciated.
Thanks
Ajay K. GargYou have to create the package (Directory) structure manually in the file system, then move all the renamed EO/VO/AM (and all realted files) to appropriate directories.
After you do this, you need to open each file in some text editor (esp for XML files) and change the package structure there.
Thanks,
Tapash -
Package objects and transport request
Hi Gurus,
How to find out the transport request which are generated by an object created?
I have a package(ex:xyz) which has got an object (abc).Now i need to find the transport request which are related to this object abc?
Please tell me the procdure or the Tcode to out the same.
Regards,
Prasadhi,
SE09 is the transaction code for workbench organiser.Workbench organiser is the set of utilities for development change management.All Development changes are tracked via Workbench organiser.
SE10 is for Customosing organiser.Customising organiser is the set of tools for customising change management.All customizing changes are tracked via customising organiser.
thnks,
raji. -
SSIS 2012 - Parent/Child Package "Object" Type Variables
How do I pass Variables of Object type from Parent to Child packages?
I am using the SSIS 2012 project deployment model.
ThanksYou can do it as outlined in
http://sqlblog.com/blogs/andy_leonard/archive/2010/01/25/ssis-snack-passing-parent-starttime-to-the-child-package.aspx
But
When you need an object it is typically a recordset, then just pass the results, or execute the query in a package.
Arthur My Blog -
Changing package - object dictionary entry
Hi all,
my basis has copied a report from a different sap instance to my sap instance. But the package program is not existing in my sap system. Because of this I am not able to modify the program. also I am not able to change the object dictionary entry.
Please tell me how to modify the object dictionary entry of the program in this case.
Thanks
Marktry by making a copy of the program..
Cheers
L -
Recover Database Package Object
Hi, i accidently replace my package in my schema on last friday, how i gonna recover it back? my company is running a full backup of the database, and do not open up flashback function in that database. How I just recover only one object without causing the all data recovery?
Please help.. urgent.
vincent.kiddoo_81 wrote:
my company's oracle version is 9iR2....i use the command create or replace package...... command, unfortunately, there are one package is the same name as mine... so i replace the old package with my new one... after 3 days... user came to me and complain that some of the old program cannot open.
that is the situation. is my mistake thought... sob..
vincent.Have you tried to use the method I've provided to you?
Why don't you use supervision?
How much the size of the database? If it's not so big, why don't you want to perform a disaster recovery (restore and recover the database on the different server) and get back the package you've lost? -
Wonder if a $TMP package object can be transported?
In Transport Connection, we drag over an ODS to the right frame grouped by "In Dataflow Before". Even if the package assigned to this ODS is not $TMP, but one update rule under this ODS in this frame is assigned to $TMP. If we check this update rule object to be transported, then the transport will work or not if it's assigned to $TMP, but it's upper level ODS is assigned to a Z package?
ThanksKevin,
No,
If it is a sandbox system, u can use $TMP, if its a development system, use a package structure. B'cos only objects assigned to package structures can be transported from developement to Production.
You can use $tmp as pkg for your proxies.
Let me know if you need any further clarifictions.
Thanks
Ramu
Message was edited by: Pidugu Ramu -
R12 - Compile Invalid objects (Fast Formula, Package Body and View) Urgent
Invalid objects about 43, in this Fast Formula 2 AP Package object, and 1 view
OWNER OBJECT_TYPE COUNT(*)
APPS PACKAGE BODY 37.00
APPS PROCEDURE 1.00
SCOTT PACKAGE BODY 1.00
APPS VIEW 1.00
APPS FUNCTION 3.00
any one can give idea to make it valid.
Awaiting for your reply.
FYI
the object list is below.
OWNER OBJECT_NAME
APPS FFP52474_01010001
APPS FFP61059_01010001
APPS FFP56168_01010001
APPS FFP56167_01010001
APPS FFP58579_01052004
APPS FFP56169_01010001
APPS FFP56170_01010001
APPS FFP56171_01010001
APPS FFP56172_01010001
APPS FFP56173_01010001
APPS FFP60309_01010001
APPS FFP60306_01010001
APPS FFP60308_01010001
APPS FFP60310_01010001
APPS FFP60307_01010001
APPS AP_IMPORT_VALIDATION_PKG
APPS FFP58576_01011951
APPS FFP60357_01011951
APPS FFP57511_01010001
APPS FFP57510_01010001
APPS FFP52473_01010001
APPS FFP60305_01010001
APPS FFP60545_01042004
APPS FFP60342_01010001
APPS FFP58887_01042004
APPS FFP58888_01042004
APPS FFP58870_01042004
APPS FFP58885_01042004
APPS FFP58907_01010001
APPS FFP58906_01010001
APPS FFP58861_01042004
APPS FFP61122_01010001
APPS FFP58871_01042004
APPS FFP58857_01042005
APPS FFP60917_01032006
SCOTT MK_PLS_XML_REP_TEST
APPS MK_PLS_XML_REP_TEST
APPS AP_FSX_PAYMENT_ADVICE
APPS RA_SITE_USES
APPS ZDBAR_CONTACT
APPS ZDBAR_FAX
APPS ZDBCLOAD
APPS ZDBAP_DV_PAYMENT_TYPE
Advanced thanks for reading and giving solution for this.
Thamaraiselvanany one can give idea to make it valid.Run "Compile APPS Schema" from adadmin.
For Fast Formulas, refer to:
Note: 155737.1 - How To Compile Oracle Fast Formulas
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=155737.1 -
Hello everybody,
i wonder if it is possible to "package" objects into package definition as follow:
CREATE OR REPLACE PACKAGE OBJECTS_TEST IS
TYPE MYTYPE IS OBJECT(T0 VARCHAR2(200),T1 VARCHAR2(200));
when i try to execute this I always receive the following error:
ERROR line 3, col 22, ending_line 3, ending_col 22, Found '(', Expecting: ;
So far, seems that the definition of the object must go internally to the PACKAGE BODY, therefore into a FUNCTION/PROCEDURE.
I would like to define a package that works as a global handler for all my objects used in my schema, what I'm supposed to do ?
Any help will be very appreciated,
Thank you,
LuigiThank you everybody for your support, and as requested I'll try to be more precise.
I'm developing functions and procedure to manipulate data that will then be used by a Business Object universe.
As for now, I've opted to develop some custom transformation procedure in PL/SQL to handle special cases where strings contains value pairs like :
1~FirstText~2~SecondText
From this point onward, I need to create a view that needs to be like this:
VALUE | TEXT
1 | FirstText
2 | SecondText
So far, I've build a PL/SQL procedure that parse the string and returns a TABLE OF OBJECTS to be further used in a VIEW with more or less 100 records.
Those objects where initially declared externally to my package in this way:
CREATE OR REPLACE TYPE RadioQuestionParam IS OBJECT (
Q_ID VARCHAR2 (50 CHAR),
Q_F_ID VARCHAR2 (50 CHAR),
Q_VALUE VARCHAR2 (4000 CHAR),
Q_TEXT VARCHAR2 (4000 CHAR)
CREATE OR REPLACE TYPE RadioQuestionParamTable IS TABLE OF RadioQuestionParam;
/and the procedure that will use them is...
create or replace package objects_test
FUNCTION PARAMS2ROWS2 (P_Q_ID IN VARCHAR2,
P_Q_F_ID IN VARCHAR2,
P_Q_PARAM IN VARCHAR2)
RETURN RadioQuestionParamTable ;
end objects_test;
/so then I can use:
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2'));to produce the desired output.
As I would like to organize everything in one single package I was wondering if there's a way of using OBJECTS INSIDE A PACKAGE....
As for now I've modified my code to use michaels2 suggestion but with no luck as when I execute the
select * from table(objects_test.params2rows2('q_id','q_f_id','1~TEST1~2~TEST2')); I'm receiving a ORA-00902: invalid datatype;
Thank you for your precious help,
Luigi -
Help need in Java Web Service method receiving object values as null
Below is my web method and Package is the object received from dotnet client as a consumer. I have also defined the Package object structure. Now when I receive the data from dotnet I get only identifier value, but I get ownerid and price as null, even both values are sent by Dotnet client. I want to know whether only primitive datatype in java web service works or I need to do some configuration changes in order to have build in Wrapper class datatypes? It would be a great help if somebody explains.
@WebMethod
@WebResult(name = "PackageId")
public long createNewPackage(@WebParam(name = "Package") com.db.radar.wl.data.Package data1,@WebParam(name = "PackageDetail") PackageDetail data2,@WebParam(name = "PackageTrade") PackageTrade data3);
public class Package {
Long ownerid;
Double price;
long identifier;
}Hi ,
I am getting the same error. I am running my application on jboss-4.0.4.GA. Please let me know the version of jboss that you to got it working.
Thanks
Viv -
Creating callable object+ authorization problem
Hi,
I am following the tutorial to create the first process (GP). I assigned all designtime specific roles. I can now create a content package object. But when I try to create the callable object, I come across the following error:
You are not authorized to start the design time
What going wrong! A quick reply will be appreciated!
MayukhI restarted the server. But the problem persists.
Let me give more details:
It says :
YOU CAN
and then the following list
Create Action #
Create Callable Object #
Create Process #
Create Object View
Create Block #
Create Content Package Object
Create Simple Process
Create Process by Semantics
The problem is with the ones I marked as # and for the others it works fine.
I assigned the role : designtime_all and all other roles where the term designtime occurs.
Namely:
UME com.sap.caf.eu.gp designtime.businessobject
UME com.sap.caf.eu.gp designtime.admin
UME com.sap.caf.eu.gp designtime.process
UME com.sap.caf.eu.gp designtime.callableobject
UME com.sap.caf.eu.gp designtime.logicalcriteria
UME com.sap.caf.eu.gp designtime.businessobject
UME com.sap.caf.eu.gp designtime.admin
UME com.sap.caf.eu.gp designtime.process
UME com.sap.caf.eu.gp designtime.callableobject
UME com.sap.caf.eu.gp designtime.logicalcriteria
UME com.sap.caf.eu.gp designtime.translation
UME com.sap.caf.eu.gp designtime.cpkgobject
UME com.sap.caf.eu.gp designtime.ertemplate
UME com.sap.caf.eu.gp designtime.all
UME sap.com_tclmwebadmin~permissions Applications_Start_Stop
Phew!
Mayukh -
Where to find public function, object etc.
I'd like to find some public (free) function, package, objects made with forms, reports etc. and share mine with others. Does anyone know for some links?
Thanks
m.Hi,
Go to:
http://www.oracle.com/technology/oramag/code/tips2006/index.html
and find the section "submitting tips".
Or
http://www.oracle.com/technology/pub/articles/index.html
and find "Submit an article"
Regards,
Hugo.
Maybe you are looking for
-
Hi Guys, I am having an interview tmmorrow in Abap Objects. Could any one help me in sending me the Faq's ASAp. Thanks in advance
-
Problems in RFC Sender adapter
Hello I am having a scenario where I am sending the message through RFC sender. The message is getting posted on integration server but its giving error in SXMB_MONI. The error says "HTTP response contains status code 503 with the description Service
-
I am using TestStand 3.5 and LabVIEW 8 in a Windows XP environment. I have a sequence that runs properly when run from the sequence editor. I have made a few minor mods to the simple Operator Interface that ships with TestStand. When I run my seque
-
Bold in IE, not bold in FF and GC
Here's the link: http://www.dynamicevolution.com/selfmastery_Program.html I have the pricing and subheads in bold. When viewed in IE, works fine. Not in FF and GC. Not sure where I'm missing something.
-
Hi, I have an JSF Portal application one of the Portlets displays some fields and link . The link opens a poup window where I can do some searchers and move the results to the parent window that all works OK the problem that I'm having is if the user