I have a requirement to change the owner of an interactive report and also change the interactive report from public to private. I am aware of the APEX_IR.CHANGE_REPORT_OWNER and wanted to know if there was a similar api to update a Public report to a Private one or the best way to do this via pl/sql
I am on apex version 21.1
Thank you in advance,
RD
Related
We have an Apex application (version 20.1) and our users must be able to change the database schema at runtime via button click (preferably without logging in again).
Currently we are solving this by installing our application multiple times, once per schema.
We recently discovered the function apex_export.get_application. We intend to use this function to bring our frontend under version control (finally!). We would like to deploy our application directly from the exported files. Having a single application, we would not have to mess with the internal component ids from the exported files.
Is it possible to install the application once and change the default schema via Pl/SQL code? Thank you!
I don't think this can be done, but perhaps the following is a reasonable compromise
add all the schemas you need to support to the workspace schema list
Any SQL (and I do mean any) in your app would be prefixed with an application item, eg
Before: select * from my_table
After: select * from &my_schema..my_table
At login time (or when a user selects it) you modify the MY_SCHEMA application item
(I've not tried this...so test/tread carefully)
this topic is related to one from Java but i cant find solution for C#.
http://theblasfrompas.blogspot.com/2010/01/closing-obsolete-database-change.html
I am using Oracle.ManagedDataAccess.dll with Change Notification.
All works fine but I have one problem. When my application starts I create Database Notification (with Timeout 0 - it must be) and i have handle to OracleDependency.
When my application is stopped I can use this handle to call remove registration in this way:
oracleDependency.RemoveRegistration(connection);
The problem appears when my application crashes in some way and i am unable to call RemoveRegistration method. I lose handle to OracleDependency so after restart application I cant remove obsolete registrations. As always on start application will create new registration but now will exists TWO - one new and one obsolete. In this way my application will get two times notification.
The question is - how to remove obsolete notifications created by my application.
Ok my further investigation is below:
I found on oracle docs that exists static method OracleDependency.GetOracleDependency(string guid)
So after I create oracle dependency I save his Id (seems its guid).
When my app is stopped i can use this method to get my dependency. Unfortunately it didnt work after application restart:/ If i try to get OracleDependency by this Id it return null but it strill exists in USER_CHANGE_NOTIFICATION_REGS
Java implementation to remove all change notification registrations from the database
Statement stmt= conn.createStatement();
ResultSet rs = stmt.executeQuery("select regid,callback from USER_CHANGE_NOTIFICATION_REGS");
while(rs.next())
{
long regid = rs.getLong(1);
String callback = rs.getString(2);
((OracleConnection)conn).unregisterDatabaseChangeNotification(regid,callback);
}
rs.close();
stmt.close();
You need to have ojdbc6/7.jar in class path to execute this code.
Original post:https://community.oracle.com/message/9315024#9315024
Although this is a rather old question I will describe my experience with Oracle CQN just in case it helps someone. The feature works better with java where its easy not only to register but also to unregister the notification.
In .NET if the application crashes there is no way in my experience to unregister the notification with code.
Revoking change notification is not working immediately. Until database restart the registration survived the revoke.
It seems that Oracle removes the registration when there is a problem in communication with the notification receiver. I was able to unregister notifications using this behavior. By turning on the firewall for example!
Another solution I use to unregister the notifications for a particular oracle user is a tool I wrote in java named NotificationRegistrationsCleaner.jar. It can be downloaded from the following link. We call it passing 4 parameters it like this.
java -jar NotificationRegistrationsCleaner.jar [oracle ip] [oracle service] [oracle user] [oracle password]
The tool displays the removed registrations. Far from perfect but its doing the job.
The java code is very similar to #TMtech code described above.
NotificationRegistrationsCleaner.jar
You just can revoke change notification from current user and grant it again. I know, this isn't best solution, but it work.
I am new to racle forms and report generation, I have successfully created a report by using the following syntax
web.show_document('http://URL/reports/rwservlet?KEY1&report=reportpage.rdf&destype=cache&desformat=pdf¶mform=no&server=rsnic'||'&transid='|| FS_TEMP || '&user_parameter=' || 'User_data','_blank');
The issue is that when I generate the Report the above link comes in the Browser URL so if anyone changes the "User_data" the report gets changed.
Is there anyway I can hide the User Parameter and its value
To secure the call to web.show_document you first need to make use of the RUN_REPORT_OBJECT.
The Oracle White Paper Integrating Oracle Reports in Oracle Forms Services applications states:
The most secure approach for calling Reports from Forms on theWeb is
to use the Oracle Application Server 10g reports Services in
combination with RUN_ REPORT_OBJECT. Because the user’s database
connection is implicitly passed from Forms to Reports on the server,
there is no risk of interception as if it were passed in a URL.
From page 10 this same document explains with an example on how to use RUN_REPORT_OBJECT.
I'm updating my Windows Phone App to Mango and starting to use SQL Server CE. I can insert and select data but am struggling to understand how to update data.
Most of the examples are basic tutorials and only show inserting and retrieving data not updating. I believe I need to attach a class I have retrieved to the data context but that is as far as I have got.
Please can someone point me to an online tutorial showing how to do this. Or some example code would be great.
Thanks.
UPDATE
Basic updating looks fairly simple - query the database, update the object, call SubmitChanges.
My scenario is a little more complicated.
I have a page showing a list of jobs. A job (JobDetail) is selected and another page is used to edit the details. The job is written to a cache (another table JobCache) while the job is edited. If the user cancels the edit the cache is deleted. If the user saves the edit the JobCache object is pulled from the cache, converted to an object of type JobDetail and now I want to update the database with the new JobDetail object.I don't think I can just call SubmitChanges as the object was not generated from a query. I believe I need to somehow use Attach to do this. The question is how?
Why not get the original JobDetail object, update the changed properties from the cahced object and call SubmitChanges ?
I'm still not getting my SP's generated in SubSonic 2.2 against an Oracle 10g DB. The Tables and Views generate up perfectly. Also this product is multiplatform so we're gen'ing up SubSonic libraries against SQL 2K5 and that works great for Tables/Views and SP's.
I recall on the old forums there was a bug in earlier versions of the Provider, so I'm not sure if this is still the same issue, or if I'm doing something wrong on my end? Also SubStage (the UI) chokes when invoking the provider on Oracle (no issues with SQL). So I'm figuring there's something in the SPs that are choking it [?]
Thanks! Real close to migrating to SS from our current home grown DAL.
I was able to fix a lot of the issues with the Oracle Provider in SubSonic in version 2.1 and most all of my fixes made it into 2.2. I didn't work on fixing the SP generation portion of the Oracle Provider as I only had one or two SPs. Even if the SP generation isn't working you can still use SPs with the Oracle Provider. I simply added the SPs by hand (see below) as a partial class in the altered folder I use to add functionality to the classes SubSonic generates.
example
public partial class SPs
{
public static decimal CreateSp(string username, string labelNote)
{
Decimal returnId = 0;
SubSonic.StoredProcedure sp = new StoredProcedure("User.MySP");
sp.Command.Parameters.Add("username", username, DbType.String);
sp.Command.Parameters.Add("labelnote", labelNote, DbType.String);
sp.Command.Parameters.Add("returnId", returnId, DbType.Decimal, ParameterDirection.Output);
sp.Execute();
return Convert.ToDecimal(sp.Command.Parameters.Find(delegate(QueryParameter qp) { return qp.ParameterName == "returnId"; }).ParameterValue);
}
}