Insert the SQL script for BLOBs
HelloI managed to upload my word and pdf documents in the database using blob support APEX and have these columns in the MY_DOC table
, VARCHAR2 (400) FILE NAME NOT NULL
BLOB_CONTENT BLOB
, VARCHAR2 (48) MIME_TYPE
Now I want to migrate the data to another environment by using an insert SQL script, how to respond to the BLOB column in the insert script?
Kind regards
ADE
You cannot migrate data blob with insertion of scripts. However, you can achieve this by using the datapump...
Example:
expdp sysadm/sysadm tables =
BR, Nico
Impdp sysadm/sysadm dumpfile = dump.dmp
Tags: Database
Similar Questions
-
How to accept entries of user of the sql script
I want to create Tablespace using the sql script, but the location of the data file that I need to accept the user. (for the location of the data file).
How can I accept the user input to pl/sql.
Example:
Here, I need to accept the location of the user data file IE: "H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf".CREATE TABLESPACE TSPACE_INDIA LOGGING DATAFILE 'H:\ORACLE_DATA\FRSDB\TSPACE_INDI_D1_01.dbf' SIZE 500M AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL;
Maybe something like this...
declare flocation varchar2(300) := '&Enter_The_Path'; begin EXECUTE IMMEDIATE 'CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING DATAFILE '''||flocation|| '\SRC_TSPACE_INDI_D1_01.dbf'' SIZE 500M AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL'; end;
You will need to properly explain the quotes in your channel and also make sure you have spaces where they should be (for example, after the key word of the DATA file).
You'd better start with something like this:
set serverout on declare flocation varchar2(300) := '&Enter_The_Path'; v_sql varchar2(32767); begin v_sql := 'CREATE TABLESPACE SRC_TSPACE_INDIA LOGGING DATAFILE '''||flocation|| '\SRC_TSPACE_INDI_D1_01.dbf'' SIZE 500M AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL'; dbms_output.put_line(v_sql); end;
and see what SQL it generates. When you're happy it generates a valid statement, then you can replace the statement dbms_output with your immediate statement execution.
-
Effect of NLS_LANG in the SQL scripts
DB version: 11.2.0.2
Platform: RHEL 5.6
We have a software provider who occasionally sends SQL scripts to deploy.
The scripts contain usually few CFDS and many LMD
Textpad, I can see, the LMD (inserts, updates) in the SQL Script. It usually contains some non-English characters (Dutch, German, French) as
They always ask us set NLS_LANG as follows.'Übersicht Buchungssätze' . 'Fehler beim Löschen der zugeordneten Referenzen!'
After INSERTION, I questioned the inserted values of PL/SQL Developer. Values appear exactly as it appears in the SQL Script text file as shown above.export NLS_LANG="AMERICAN_AMERICA.WE8ISO8859P15"
So, what was the effect of the NLS_LANG setting? What would have happened if I had not set NLS_LANG?
NLS in the DB InfoSQL > select * from nls_Database_parameters; PARAMETER VALUE ------------------------------ ---------------------------------------- NLS_LANGUAGE ENGLISH NLS_TERRITORY UNITED KINGDOM NLS_CURRENCY # NLS_ISO_CURRENCY UNITED KINGDOM NLS_NUMERIC_CHARACTERS ., NLS_CHARACTERSET AL32UTF8 NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD-MON-RR NLS_DATE_LANGUAGE ENGLISH NLS_SORT BINARY NLS_TIME_FORMAT HH24.MI.SSXFF NLS_TIMESTAMP_FORMAT DD-MON-RR HH24.MI.SSXFF NLS_TIME_TZ_FORMAT HH24.MI.SSXFF TZR NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH24.MI.SSXFF TZR NLS_NCHAR_CHARACTERSET AL16UTF16 NLS_DUAL_CURRENCY ? NLS_COMP BINARY NLS_LENGTH_SEMANTICS BYTE NLS_NCHAR_CONV_EXCP FALSE NLS_RDBMS_VERSION 11.2.0.2.0 20 rows selected.
If our supplier had chosen to save the script with the UTF-8 encoding, then, we have set NLS_LANG. Right?
Evil. You need to AMERICAN_AMERICA. AL32UTF8. If you don't set NLS_LANG, it uses default AMERICAN_AMERICA. US7ASCII. Therefore, only pure ASCII 7-bit scripts can be executed in such environment. The Oracle Client does not use the default database character. It uses the platform default (usually US7ASCII) or UTF-16 in the case of JDBC, ODBC (Unicode mode) and ODP .NET pilots.
-Sergiusz
-
call a batch file in the sql scripts
Hi friends,
I'm looking for a way to call any batch file in sql scripts. I avoid using the DBMS_SCHEDULER package because my application server and database server are deparaments.
I use the sql script using the server.plz application.
Ah, I see. Of course, this explains everything.
Now to be serious: there is no way to run a batch SQL script. The Tools that present SQL statements to the database are often able to do; host in SQL * Plus may issue commands to the OS, the host of builtin forms is it too and with dbms_scheduler , you can run a shell script on the database server.
So depending on the tools you use, there are several ways to run the OS commands. So far you didn't tell us what you want to do with what tools in the version you want to do. So to only answer is: it is not possible. You cannot run a simple SQL command script.
see you soon
-
Insert the CD-ROM for Microsoft Works 9.0 for critical updates
How to change when I am asked to insert the CD-ROM for Microsoft Works 9.0 for the updates to take place? Given the computer came with all the software already installed and there is no disk provided. I can guarantee for hardward problems no software issues. Really need help on this one to prevent threats to the computer.
Hi Cj_jez,
1 is Microsoft Works and you will prompt to install the update or you are trying to install it via Windows updates?
As the message is asking you to insert the CD of Microsoft Works 9.0, you will need to insert the right disk to install the update. As the computer came with all already installed software, the best option would be to contact the manufacturer of the system that has installed all the software on the computer.
In the meantime, try the following steps and check the result.
Step 1: Manually install the update
a. visit the link and look for update for Microsoft Works 9
http://www.Microsoft.com/products/works/downloads.mspx
b. open the downloaded file and install it.
c. once the update is installed, restart the computer and check the result.You can also get in touch with the support of Microsoft Works team to see if there are other options to install the update without using the disc:http://www.microsoft.com/products/works/support.mspx
Visit our Microsoft answers feedback Forum and let us know what you think.
-
How do we improve the SQL Loader for EBS?
Hi all
We would like to use some of the new features like the FILLING and the EXPRESSION in the 10g version of SQL * Loader with the concurrent Manager.
EBS 11i version SQL Loader is 8i.
How do we improve the SQL Loader for EBS?
Thanks in advance!If you are referring to executable files under ORACLE_HOME 8.0.6, then it cannot be migrated to 10 g / 11 g - upgrade developer 6i with Oracle Applications 11i [125767.1 ID]
For executable files of database, please visit:
Interoperability Notes Oracle EBS 11i with Oracle Database 11 g 2 (11.2.0).) [ID 881505.1]
Oracle Applications Release 11i with Oracle 10 g Release 2 (10.2.0) [ID 362203.1]Thank you
Hussein -
Where the SQL Scripts running after the installation of the ODAC for Oracle Client?
I just installed ODAC for Oracle Client on a windows server that runs a database of sql server, allowing developers to connect to a web application to an Oracle/Unix database. The installation States to run SQL scripts, located in the $ORACLE_HOME\ASP.NET\SQL directory after installation. I don't know where to run them? On the ORACLE DB on the Unix server? If someone could let me know, I'd appreciate it. Thank you.You must run on the Oracle database server, but they are necessary only if you use Oracle for ASP.NET providers.
If you just install the software, so you can use OLEDB with SQL Server linked server, for example, you don't need them. What do you need to run although if this is the case is the oramtsadmin.sql script that creates the objects used by the Oracle MTS Recovery Service (if you do not have these objects created on the database) that SQL Server uses a distributed transaction for Oracle connections I think.
It will be useful,
Greg -
Hello
I am new to Oracle and PL/SQL Script. I would like to ask - is it possible to write a PL/SQL Script to compare two dates in Oracle.
It is a very basic example of the structure of the table.
table_1)
client_name varchar2 (30);
client_expire_date DATE;
status varchar2 (30);
);
settings)
time_to_run varchar2 (30);
);
I want to write a script that runs each for example 5 minutes (I want the script to take time to time_to_run rank, each time when it starts) and compare the client_expire_date with the sysdate. If the client_expire_date < sysdate scripts updates the State of the locked client.
Is it possible to do?
concerningCREATE TABLE clients ( client_serial INTEGER CONSTRAINT clients_pk PRIMARY KEY , client_expire_date DATE , client_name VARCHAR2(30) NOT NULL , status VARCHAR2(20) DEFAULT 'active' NOT NULL ); INSERT INTO clients VALUES (1, TO_DATE('2010-08-21 15','YYYY-MM-DD HH24'), 'Largo', 'active'); INSERT INTO clients VALUES (2, TO_DATE('2010-08-21 16','YYYY-MM-DD HH24'), 'Blofeld', 'active'); INSERT INTO clients VALUES (3, TO_DATE('2010-08-21 17','YYYY-MM-DD HH24'), 'Scaramanga', 'active'); INSERT INTO clients VALUES (4, TO_DATE('2010-08-21 18','YYYY-MM-DD HH24'), 'Drax', 'active'); INSERT INTO clients VALUES (5, TO_DATE('2010-08-21 19','YYYY-MM-DD HH24'), 'Goldfinger', 'active'); COMMIT; BEGIN DBMS_SCHEDULER.CREATE_JOB ( job_name => 'SET_STATUS' , job_type => 'PLSQL_BLOCK' , job_action => 'BEGIN ' || 'UPDATE clients SET status = ''locked'' ' || 'WHERE client_expire_date < SYSDATE AND status != ''locked''; ' || 'END;' , repeat_interval => 'FREQ=MINUTELY;INTERVAL=5' , enabled => TRUE , auto_drop => FALSE , comments => 'Demo job to update CLIENTS table every 5 minutes'); END; / SELECT log_date, status, run_duration FROM user_scheduler_job_run_details WHERE job_name = 'SET_STATUS'; LOG_DATE STATUS RUN_DURATION ------------------------------------------------- ------------------------------ ------------------- 21-AUG-10 16.53.35.671000 +01:00 SUCCEEDED +000 00:00:00 21-AUG-10 16.58.35.609000 +01:00 SUCCEEDED +000 00:00:00 SELECT * FROM clients; CLIENT_SERIAL CLIENT_EXPIRE_DATE CLIENT_NAME STATUS ------------- ------------------ ---------------- -------------------- 1 2010-08-21 15:00:0 Largo locked 2 2010-08-21 16:00:0 Blofeld locked 3 2010-08-21 17:00:0 Scaramanga active 4 2010-08-21 18:00:0 Drax active 5 2010-08-21 19:00:0 Goldfinger active select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') as time_now from dual; TIME_NOW ------------------- 2010-08-21 17:02:17
(Scaramanga account has been locked by the next run at 17:03)
You can call a procedure under the action of work rather than including the command line.
To abandon the work,
CALL DBMS_SCHEDULER.DROP_JOB('SET_STATUS');
-
After you create the action script for the creation of user Oracle DB - connector DBUM
Hello
After we have set up a user of IOM in the database on the target system, you must insert the same user in the RLS_USER_GROUPS table. (INSERT INTO CAMPDB. The VALUES of RLS_USER_GROUPS ('DV < user name >', RLS_DEV'); )
The requirement is available to the user of multiple databases (different values of SID). But, the user to insert in a table to a database (DB1).
If I write an after create a file of Action with action script, it will fire for all databases? How to trigger this script only on the DB1 database?
(2) in the literature, it is mentioned as below
(Q) I installed the connector only in IOM (there is no connector server). Thus, in the 3rd and 5th stage, what should I mention
Key code?
Decode?
Please suggest
Thank you
This query has worked well.
INSERT INTO CAMPDB. RLS_USER_GROUPS (USERNAME, GROUPNAME) VALUES ({__NAME__}, "RLS_DEV")
-
How to assign the variable in the SQL script?
I have the below running to generate the XML from the file.
I'm queue in the order of the coil, the output to a file named file1.xml. I invoke this SQL script from a shell script, I will pass variable association 3rd since the shell script which I want to use in the file ' & & 3'.xml. Help me set this variable to the DIGITAL field in this SQL script and how can I add to the command of the coil?set long 100 set pages 0 set trimspool on set serveroutput on set echo off set terminal off variable out CLOB begin pack.proc('&&1','&&2',:out); end; / spool /dir/loc/file1.xml select :out from dual; spool off
set long 100 set pages 0 set trimspool on set serveroutput on set echo off set terminal off variable out CLOB define var1='&1' -- to allow for more readable code define var2='&2' define var3 ='&3' begin pack.proc('&var1','&var2',:out); end; / spool /dir/loc/file&var3..xml -- note the substition variable has . appended print out spool off
------------
Sybrand Bakker
Senior Oracle DBA -
How to pass arguments to the SQL Script in command prompt
I don't know about the ' & nom_de_variable "to request a value in the command line.
But, how can I pass arguments from the command line for the following script to the command - prompt
Example:
ex_proc. SQL
CREATE OR REPLACE PROCEDURE ex_proc (employee_id NUMBE IN)
IS
v_emp_id Number (38);
BEGIN
v_emp_id: = employe_id;
UPDATE emp_employee SET sal = 2000 WHERE emp_id = v_emp_id;
END;
/
call_ex_proc. SQL
Appellant for procedure above:
BEGIN
ex_proc (100); -The employee id is 100.
END;
/
Here are the General controls that we use to run the scripts above-
SQL > @ex_proc.sql
SQL > @call_ex_proc.sql
But my requirement is to pass the employee id as an argument in the command line as.
SQL > @call_ex_proc.sql 100
Is it possible to pass command line arguments?Usually this question start with reading documentation, wouldn't it?
Solomon Yakobson showed you the method gross and unreadable.
You will use best
set
= '& 1' '. -use &
in the rest of the code ----------
Sybrand Bakker
Senior Oracle DBA -
Cannot insert the value with: in BLOB field
I use Oracle 10 g Express Edition.
Attempt to run this page of SQL commands insert:
INSERT INTO table1 (col1, col2)
VALUES ('one', '\"2.001:2372.002:002.005:Y2.018:G')
News of table1:
col1 = VARCHAR2 (25)
col2 = BLOB
When I click on run a tab enter the Variables is displayed?
Why can't I insert the value directly in col2 without bind variable?Ah, just read your message.
I'm guessing that because your on 10g Express Edition, you must be using the Application Express?
Edit: Here's the forum to request:
Oracle Application Express (APEX)
Published by: BluShadow on September 3, 2009 14:05
-
Compensation of the sequences, run the sql script
Hello
I use OWB 10.1.0.4.0 and I use a sequence to create a surrogate key in my paintings. For the tabels deleted during the process, I want these sequences set to 1 again.
Is it possible to run an sql script in a mapping or the flow of process (with a drop, create, grant the declaration for the sequence)?
Thanks in advance,
ArjanWrite these SQL statements in a procedure and the procedure in the import map.
-
Hi all
Oracle db 10g
I have a sql script that is like
In the above script as I must include conditionsCURSOR c IS select s.sid,s.serial# from gv$session s, gv$process p, gv$locked_object l where l.session_id = s.sid and floor(mod(last_call_et,3600)/60) > 3 and l.object_id in (438239,332790,46237,362927) and s.module in ('JSWPKSLIPN','OEXOEORD','ICPCKLOT','JSWPKSHIPHRM','JAINEORD') and s.status='INACTIVE' and s.paddr = p.addr; c_row c%ROWTYPE; l_sql VARCHAR2(100); BEGIN OPEN c; LOOP FETCH c INTO c_row; EXIT WHEN c%NOTFOUND; l_sql := 'alter system kill session '''||c_row.sessionid||','||c_row.serialid||''''; EXECUTE IMMEDIATE l_sql; END LOOP; CLOSE c; END; /
So that the cursor c gets all the inactiive and serial No. session id and put loop and kills the session... ? He must check the two conditions and if any condition returns the lines, he should kill?s.module in ('JSWPKSLIPN','OEXOEORD','ICPCKLOT','JSWPKSHIPHRM','JAINEORD') and s.last_call_et/1800 > 1 and s.action like 'FRM%' and s.status='INACTIVE'
Thank you
Baskar.lLoops of slider like the one you posted since out-of-date Oracle 8i over 12 years ago.
Learn how to process rows tables not simple.
http://www.morganslibrary.org/reference/array_processing.html -
A query to return all the SQL executed for a particular user instructions.
Hello
Is it possible to find all the instructions SQL for a particular user using the views v$? I can do it 10g but I am currently using 9i, the query below does not work.
I guess that some columns in these views do not exist in 9i. The output of 9 that I use is 9.2.0.1.0.select a.username,a.logon_time,b.sql_fulltext from v$session a,v$sqlarea b where a.sql_id=b.sql_id and a.username='USER' order by a.logon_time desc
Your help is very appreciated.
Thank you
Select this option.Dear mark!
I suggest you use the audit instead of v$ sqlarea. Onlinedocumentation said the next thing Oracle v$ sqlarea:
>
V$ SQLAREA lists statistics on the shared SQL area and contains a line by the SQL string. It provides statistics on SQL statements that are stored, analyzed and ready for execution.
>
This means that you will only get the SQL statements that are currently in memory. Older statements which are already deleted from memory are not visible for your query.Incidentally, if you simply want to know what's wrong with your query then please post your errormessage.
Yours sincerely
Florian W.
Published by: Florian W. the 29.07.2009 12:03
Maybe you are looking for
-
Pascal boot from a DVD on my Satellite P100
Hello I have a laptop Toshiba Satellite P100. I want to boot on a DVD. When the computer starts, the screen goes from black to the Welcome to windows screen, and there is no message that indicates which key to press to access the boot menu. I tried t
-
Need drivers of Windows XP Home for Satellite L40-139
Hello I need drivers Windows XP for Toshiba Satellite L40-139 Model No.: PSL40E-02R02GRN There are only installation instructions in the download section for this model, no drivers for XP, only for Windows Vista
-
Droid Razr 6.12.173 - BROKEN Exchange - solution
I just downloaded and installed the 6.12.173 patch on my Razr. However, I erased my data before making the implementation level and now cannot add my corporate exchange account. I tried both resets and erased the cache, both times. It will not connec
-
E5 - 571g tap in Crans interemittently of work
My Synaptic touchpad sometimes lose the ability to tap-tap. Tapping the touchpad starts by dragging or by selecting instead of click, as if the mouse button is blocked. Hard clicking on the touchpad still works. The problem is that I can only get rid
-
Netflix said silverlight did not work and I can't uninstall it
went to netflix to watch the movie. Netflix said silverlight wasn't working, that I needed to uninstall it and it would automatically reinstall when the movie started. my computer won't let me uninstall it. He said he can not open the file or I have