PL/dynamic sql to retrieve the data from the production server
HelloI need to create a dynamic pl/sql program to retrieve all packages from the production server and store it on my local machine in another file.
Thanks in advance.
Hello
user9963922 wrote:
Hi Peter,.Thanks for the reply.
I need make my block dynamic while in a single query, for different packages I can save it in another file with the same name as the package on my local machine.
What is the problem with the suggestion of Peter? This is not 'dynamic' on this subject?
To save the code in the files, use utl_file. Inside the loop, open, write, and close a file. If you need help, your zip code and a description of the specific problem.
It is also possible to use only user_source table to accomplish the task.
Yes, but it doesn't work for you own schema.
If you do not use user_source, then you will not need any condition as
and owner in ('')
Tags: Database
Similar Questions
-
SQL to retrieve the specific attributes of an x 509 digital certificate
I'm curious to know if there is a way to use SQL to retrieve the specific attributes of an x 509 digital certificate. I know how to make using openssl - no problem. But what happens if the pem file is stored in a datebase column and I need to extract the expiration date. Since the openssl command line, I can just do this to extract the date of expiry of the certificate:
OpenSSL x 509 - noout - in certificate.pem - dates | grep notAfter | AWK-f = '{print $2} '.
(retrieves only the dates | take only the line with the expiration date | print only the second column of the row delimited =)
But if certificate.pem is stored in an Oracle database on the ground, how to achieve the same result? Y at - it something like "DBMS_OPENSSL"?
I got to thinking of V$ PORTFOLIO in an Oracle database. Only columns here are CERT_ID, DN, serial_num, TRANSMITTER, KEYSIZE and STATE - no certificate, which suggests that it is stored elsewhere. As you can tell, I am new to this.
Thanks for your help!You can use a small procedure stored Java to extract the required fields.
http://docs.Oracle.com/javase/6/docs/API/Java/security/cert/CertificateFactory.html
http://docs.Oracle.com/javase/6/docs/API/Java/security/cert/X509Certificate.htmlSQL> create table cert_storage (id integer, cert clob); Table created SQL> insert into cert_storage values (1, 2 '-----BEGIN CERTIFICATE----- 3 MIIDljCCAn4CCQD2F4J0d4f7rTANBgkqhkiG9w0BAQQFADCBjDEMMAoGA1UEChMD 4 V0dVMQ0wCwYDVQQLEwRNU0lBMR4wHAYJKoZIhvcNAQkBFg90d2lsbDYzQHdndS5l 5 ZHUxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR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acLrIjaQKpKKsL4rAb0Fd0SUPP6HkIt72 22 +vQ4jwHbxRhV7g== 23 -----END CERTIFICATE-----') 24 ; 1 row inserted SQL> commit; Commit complete
SQL> create or replace and compile java source named testx509src as 2 import java.security.cert.*; 3 import java.io.*; 4 import java.sql.*; 5 import oracle.sql.CLOB; 6 import oracle.sql.TIMESTAMPTZ; 7 8 public class TestX509 { 9 public static TIMESTAMPTZ getExpirationDate(CLOB cert) 10 throws SQLException, IOException, CertificateException { 11 12 Connection conn = (Connection) DriverManager.getConnection("jdbc:default:connection:"); 13 BufferedInputStream is = new BufferedInputStream(cert.getAsciiStream()); 14 15 CertificateFactory cf = CertificateFactory.getInstance("X.509"); 16 X509Certificate c = (X509Certificate) cf.generateCertificate(is); 17 is.close(); 18 19 return new TIMESTAMPTZ( conn, new Timestamp(c.getNotAfter().getTime()) ); 20 21 } 22 } 23 / Java created SQL> CREATE OR REPLACE FUNCTION CERT_GetExpirationDate(cert in clob) 2 RETURN timestamp with time zone 3 AS LANGUAGE JAVA 4 NAME 'TestX509.getExpirationDate(oracle.sql.CLOB) return oracle.sql.TIMESTAMPTZ'; 5 / Function created
SQL> select CERT_GetExpirationDate(cert) 2 from cert_storage 3 where id = 1; CERT_GETEXPIRATIONDATE(CERT) -------------------------------------------------------------------------------- 16-NOV-13 07.51.18.000000000 AM +01:00
If you need to access the fields again, it would be best to wrap them in an Oracle object type and have the Java method return an instance of this object.
-
Copy the datafiles/redo logs from the Production Server to QA Server
I need to update the QA database on server QA with the Production database on the Production Server. I intend to copy logs files from data/recovery of the Production database to replace the QA database datafiles/recovery logs. Should I stop the Production database before you start copying? If this is not the case, what happens if a Production database data file has been copied to QA and then this Production obtained data file updated before other newspapers of data/recovery files have all been copied to QA?
Thanks for any help.881656 wrote:
Should I stop the Production database before you start copying? If this is not the case, what happens if a Production database data file has been copied to QA and then this Production obtained data file updated before other newspapers of data/recovery files have all been copied to QA?If you use this technique without closing the database, copied datafile/recovery logs will be incompatible.
You can use the RMAN utility to take backup of the production database and restore it on server QA.
If the database size is small (about 10-20 gb) you can use EXPDP/IMPDB.
-
Required for the production server?
Hi all.
Another stupid question here: we are trying to develop an application that retrieves the position and transfer data from an 11 g database. On the development server where the application is written, everything is local is all hunky-dory. However, when you try to move on toward a development server where the database is not local, emerging problems.
On the production server, the file Oracle.DataAccess.dll is located in the web service /bin/ directory. Is it enough to allow a web service to access a database of remote, or is the component of Oracle data access install a required on the production server?Hello
Oracle.DataAccess.dll is a piece of ODP.NET - there are managed components, not managed.
In short, you need customer Oracle and various pieces of ODP.NET for a successful deployment. The client may be either a full or instant client and the version must match the version ODP.NET. Be aware of the 32-bit vs 64-bit issues as well (i.e. develop on 32-bit and deploy it to a 64 bit with 32-bit client server will cause problems if you have not set the 'target platform' correctly when you build your application).
For future use, the ODP.NET forum is here:
Kind regards
Mark
-
Local language wrong in the production server.
I have an app with a few projects with all two locale - Faroese and English. When I run the application on the application by default server on my local machine, it works fine with the locale Faroese, but when I deploy on our production server and try to run it from there the Faroese local doesn´t works more for one of the projects.
For this project the values that are bound to properties files in my viewcontroller are indicated in Faroese as it should, when the application is run from the production server, but the values that are related to the entity objects and display the properties of the objects files do not work as they should more. English values instead of the Faroe Islands so the English files property are met, but the server does not be able to understand that the Faroes properties existing files or for some reason some prefer the local English for this project so that it can figure out to see other projects in Faroese, so I guess that the error is somewhere in my model project given that the locale Faroese works for my other projects on the production server, but I can´t find out where.
So now I hope that someone here has experienced something like and can tell me what I need to do to correct this.Hello
I think you've hit a problem with case name of the resource bundle files (* .properties).
Even windows file system is not case sensitive that your file names MUST be exactly like the bundle Resource Manager is seeking.
This works also on embedded because the resource bundle files are located directly on the file system.
When you deploy the EAR/WAR files externally as files are found by the jar/zip finder which is case-sensitive!for example: bundlefile_EN.properies is not the same thing as bundlefile_en.properies
I hope this helps.
concerning
Peter -
Package a package on the Production Server
I use the updated sdk docs documents. I have a plugin very simple helloworld. It is composed, as in the example of echo service, she passes a string to a simple java service and receives the back string to display the user interface.
It all works very well in the environment of the SDK.
Now, I want to spend this plugin simple helloworld to my system of true vCenter (containing no eclipse, etc.). Using the SDK - Tutorial.html, step 3 discusses "package and save your solution. I used eclipse, such as indicated and chose "vSphere SDK Tools-> package vSphere Client plug-ins. I made sure to make it dependent on my java service. I looked on all the files, he created for me, and I had to modify the package.XML - plugin to set the < bundlesOrder > to have my load java service before my flex. I created the zip file and put it on a web server that is accessible. Then I registered using the #3 'old Client vSphere' method described in the SDK file - Tutorial.html. I'm on https, so I made sure to include the correct SHA1 fingerprint.
Then I restarted the WebClient service on the system of vSphere vCenter. Then I logged. When my plugin does not appear, I went looking in the newspapers.
I looked in C:\ProgramData\VMware\vSphere Web Client\Logs\wrapper.log and found errors. I can paste the full error below, but it starts with this:
INFO | jvm 1 | 2013/08/28 11:23:18 | [2013-08-28 11:23:18.349] [INFO ] start-signalling-2 <DE0005I> Started bundle 'com.vmware.vsm.vsmui' version '5.1.0'. INFO | jvm 1 | 2013/08/28 11:25:08 | [2013-08-28 11:25:08.223] [INFO ] onnection(7)-192.168.102.155 <DE0000I> Installing bundle 'com.acme.helloWorldJava.HelloWorldJava' version '1.0.0'. INFO | jvm 1 | 2013/08/28 11:25:09 | [2013-08-28 11:25:09.564] [INFO ] onnection(7)-192.168.102.155 <DE0001I> Installed bundle 'com.acme.helloWorldJava.HelloWorldJava' version '1.0.0'. INFO | jvm 1 | 2013/08/28 11:25:09 | [2013-08-28 11:25:09.642] [INFO ] onnection(7)-192.168.102.155 <DE0004I> Starting bundle 'com.acme.helloWorldJava.HelloWorldJava' version '1.0.0'. INFO | jvm 1 | 2013/08/28 11:25:10 | [2013-08-28 11:25:10.064] [ERROR] start-signalling-2 <DE0006E> Start failed for bundle 'com.acme.helloWorldJava.HelloWorldJava' version '1.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HelloWorldJava': Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'java.lang.Class[]' for property 'interfaces'; nested exception is java.lang.IllegalArgumentException: Error loading class [com.acme.helloWorldJava.HelloWorldJava]: problem with class file or dependent class.
So, he tried to start loading my HelloWorldJava, but failed. Note that it loads perfectly in the environment of the SDK. I kept this very simple code. It does not load in pots of any third party or whatever it is. The interface has only one method: echo. So I don't know what I'm missing; and don't know why it works in the environment of the SDK, but not on the production server.
I also tried to look in the Tomcat catalina logs, but I don't see anything here that stood out. In addition, newspapers just VPXD seem to show where I'm logged in, but no additional help for error details.
Any help is greatly appreciated.
I have attached a snippit of the wrapper.log containing any errors in this region, if you see something that I missed. When you get to flex errors, you will see that it fails due to the dependency (as expected) because the java part does not load correctly.
OK, I misunderstood your original problem.
The answer is that you can continue to use Java JDK 1.7 as long as you set the compilation option - target 1.6 to generate binary compatible Java 1.6. The Web client server still uses JRE 1.6.
-
Newspaper archive database pending apply to the production server.
Dear all,
How to apply for standby database archive log apply to the production server.
Please help me.
Thank you
ManasFollow the steps of permutation.
http://taliphakanozturken.WordPress.com/2011/10/28/physical-standby-database-switchover-failover-operations/
Talip Hakan Öztürk
http://taliphakanozturken.WordPress.com/ -
CFFORM - form validation does not AT ALL during the test on the production server
So I did all my tests on my local test of Coldfusion server. All form input boxes are validated correctly, with a dialog box popping up when it has not been completed
When I upload it on the production server, also running ColdFusion 8, it not there no event at all - no dialog boxes, cfform validation etc...
I use the same client computer to test locally as I test it on the web, and yet I get two different results! Any ideas?
THE FIRST THING to check in this case, it is that you can connect properly to the/cfide/scripts/folder via the web site on the production server. This scripts folder is where ColdFusion retains all its javascript, CSS and other client files used in computing, the
and other client UI features. If your browser cannot access these files, these features will not work. Rapid tests is just to put the /cfide/scripts/wddx.js in your browser on the production server and see if you get the right javascript file. If this isn't the case, you must make sure that there is a CFIDE virtual directory configured in your web site and that this directory is readable by users.
-
dynamic SQL to drop the indexes on the table
Hello world
Please tell me how to remove the indexes on a table by using a dynamic sql code
for example, I have a dummy table with two index idx1, idx2
I need a procedure or a function where I will be passing in the name of the table, the function/procedure should remove the indexes on the table
Thank youNot tested:
create or replace procedure drop_indexes_of_table(p_table_owner varchar2, p_table_name varchar2) as cursor c_drop_statements is select 'drop index '||owner||'.'||index_name stmt from all_indexes where table_owner=p_table_owner and table_name=p_table_name; begin for r in c_drop_statements loop execute immediate r.stmt; end loop; end;
-
Filter or manipulate data from e-mail server before coming to the mail program
How can I manipulate the data of the mail server until it gets pulled a software such as outlook e-mail.
For example, I want to write data of e-mail on db before it gets pulled into the e-mail program.
Is there a way to define the filter as the structures that work between the email server and the DB?
Of course, you can write the code with cfpop get the header etc, but what happens if I want to record all e-mail data on the database, how can I do that to save a copy of the email that is pulled in the e-mail program, if I understand well once the message is off the server so I would not be able to synchronize the db with the new messages with a kind structure of the scheduled task.
Or is it really something that you can configure completely by the parameters of the mail server itself? Here again, in shared or vps of installation, you probably haven't a lot of settings to set as you may not beside Server.
Any ideas will be appreciated.
Thank you.(a) use a DEDICATED e-mail account, which is NOT checked (= email
Downloaded) from any e-mail application
(b) use CFPOP to retrieve electronic messages, analyze needs, store data
DB and delete the message
(c) use intrusion via CFMAIL to send a copy of the message to another email address that
Download messages for archiving (if necessary at all - you are
already to store mails in the comics...)
(d) [optionally] based on use of the e-mail headers, subject, body, etc intrusion via CFMAIL (or
a gateway SMS or IM) to inform staff on new
request/ticket/whateverjust some thoughts...
Azadi Saryev
SABAI - Dee.com
http://www.SABAI-Dee.com/ -
insufficient privileges when using dynamic sql statements in the procedure
Hello
I use following script on oracle 10g. and get the error not enough privs. Please advice.
SQL > show user
The user is 'GRSADM '.
SQL > create or replace procedure grsadm.test_proc as
a varchar2 (2000);
Start
a: =' VIEW to CREATE or REPLACE
TEST_VIEW
IN SELECT
"FLAS" one
THE DOUBLE ';
immediately run one;
end;
Created procedure.
SQL > start
grsadm.test_proc;
end;
Start
grsadm.test_proc;
end;
Error on line 16
ORA-01031: insufficient privileges
ORA-06512: at "GRSADM. TEST_PROC', line 9
ORA-06512: at line 2
SQL > select * from session_privs
where the privilege as "VIEW %.
PRIVILEGE
----------------------------------------
CREATE A VIEW
REMOVE ANY VIEW
CREATE A MATERIALIZED VIEW
MODIFY A MATERIALIZED VIEW
REMOVE ANY MATERIALIZED VIEW
5 selected lines.
Published by: Rous Sharma on November 24, 2011 12:00GRSADM has a privilege ' CREATE (all) VIEW ' live?
And not via a role...SSM
Samir,
GRSADM is the owner of this procedure, it seems that the EXECUTE priv, that you suggested is already involved. -
Dynamic SQL query in the DB adapter
Hello
I want to use the following custom SQL query in the DB adapter:
SELECT EMP_ID, EMP_NAME, EMP_LOCATION FROM EMP WHERE EMP_ID IN (#iNPUT_PARAMETER)
the problem I'm facing is that I don't know at the time of the development that EMP_ID how much will be passed to the process so that I can not use the input parameter specific number. I cannot use it IN the query within which statement I concatenate all the EMP_ID separated by comma and passed under INPUT_PARAMETER, but when running, he read the full concatenated string as a single string rather than identify them as a list of different: with comma separation. could someone help me in this case
Thank you
SunilUse the following query with two parameters. Build the string with delimiter when running and pass this string and delimiter to query... (in this example, the input value would be the same for both Delimiter1 and Delimiter2.)
Select * from EMP WHERE deptno IN (SELECT SUBSTR (STRING_TO_TOKENIZE, DECODE (LEVEL, 1, 1, INSTR (STRING_TO_TOKENIZE, SEPARATOR, 1, LEVEL-1) + 1), INSTR (STRING_TO_TOKENIZE, SEPARATOR, 1, LEVEL)-DECODE (LEVEL, 1, 1, INSTR (STRING_TO_TOKENIZE, SEPARATOR, 1, LEVEL-1) + 1)) FROM (SELECT #StringToTokenizer | #Delimiter1 AS STRING_TO_TOKENIZE, #Delimiter2 AS DELIMITER FROM DUAL) CONNECT BY INSTR (STRING_TO_TOKENIZE SEPARATOR) ((, 1, LEVEL) > 0)
Thank you
-Sreeny -
Retrieven data from a Web server...
Hello, I need get data from a Web site, I'm developing it with XMLHttpRequest.
I have this code (copy of an example in the area of the developer) and if I connect via browser work perfectly but if I compile my .cod and run Simulator not working.
I have 3 options in my code, 2 are local file and 1 is for file server, a file local do not problem, but with the file of the server do not work.
Any can help me? Best regards!
My code is:
XMLHttpRequest example
onClick = "updateContent ("http://www.mysite.com/version.asp ")" / > HTML ""
onClick = "updateContent ('data.xml')" / > XML
onClick = "updateContent ('data.txt')" / > text
onClick = "updateContent ('unknown_file.txt')" / > no that there is no file
Finally, I have the solution:
I paste the code if it is useful for someone:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.DTD">
XMLHttpRequest example
onClick = "updateContent ("http://www.mysyte.com/dat/data.xml ")" / > HTML ""
onClick = "updateContent ('data.xml')" / > XML
onClick = "updateContent ('data.txt')" / > text
onClick = "updateContent ('unknown_file.txt')" / > no that there is no file
-
vCenter installed on a virtual machine and the SQL DB on the physical server?
All the
I'll run a VM on vCenter. A question... It is noticed that the best practice not to have the SQL Databsase(Sql 2005) on the virtual computer
but the DB on a physical server with an ODBC connection from the virtual machine. My client will not fail to ask - why, I can't give a clear
answer to the question.
If I can someone state why it is better practice to have the SQL DB on a physical server?
Thank you!!!
Here are a couple
http://www.VMware.com/files/PDF/vc_database_performance.PDF
http://www.VMware.com/files/PDF/SQLServerWorkloads.PDF
I hope that helps a little...
Please consider awarding points by scoring responses like 'proper' or 'helpul.
=========================================================================
-
Retrieve the product key after decommissioning
Hello!
A "friend" of mine took my Lenovo Y500 ideapad with an installation of Windows 8 and downgraded to Windows 7.
Unfortunately, the guy has destroyed the recovery partition in the process.
My question: is it still possible to recover the product key of Windows 8? I would like to reinstall Windows by using the product key from factory.
I tried some freeware, but they don't detect my Windows product key 7.
Thank you!
Hello and welcome,
If the laptop came originally with a factory Win 8.x install the product key is embedded in the BIOS.
When you install the same version of 8.x (STD, Pro), it should activate automatically.
Z.
Maybe you are looking for
-
HP ENVY x 360-15-w102ns: HP ENVY x 360 battery still connected
Hey there, Please want to know if it's bad for the battery, grab the always trendy gear. Whereas, in the HP ENVY x 360, the battery is integrated. If your computer is always plugged in, the battery is concerned with the passage of time (loss of life)
-
Need help with iTunes duplicate Applescript.
Hello I found this script that works great with iTunes automatically duplicates deleting. Something that I had wanted for a long time. I use Lion with the older version of ITunes, so I really need this script to work. It is an import script that help
-
This new model is listed at some online sellers like having a slot for micro-sd card and others as not having no not one. Who is this? Are there two versions of the same model, one with and one without? Thank you...
-
HP officejet 100: hp officejet 100 must often be reset
Printer often needs to be reset by pulling and plugging in the power cord. (battery not installed) when you print using bluetooth. This occurs by using two different computers
-
I deleted the sound on my compaq presario cq62 I need to reinstall
I deleted the sound on my compaq presario cq62 I need to reinstall