First i want to explain what i have done with my oracle,
i use oracle XE in my win7x64.
i have 3 file contained 'insert into ..' query ..
file 1.sql is about 3MB in inserted by Oracle SQL Developer
file 2.sql is about 30MB in inserted by Oracle SQL Developer
file 3.sql is about 120MB and cannot be inserted by Oracle SQL Developer so i use SQLPlus (#3.sql)
the problem is,
i only see data 1.sql and 2.sql instead data 3.sql when i open my Oracle SQL Developer.
then i only see data 3.sql instead 1.sql and 2.sql when i login from SQL Plus.
what should i do to see my all data inserterd?
i only connect to this XE in my local laptop ..
Need your suggestion :D
== SOLVED ==
i miss commit on both Oracle SQL Developer and SQL Plus
1. commit in Oracle SQL Developer using F11
2. commit in SQL Plus just happening when you type 'exit' or 'quit'
So you have 3 files containing a bunch of INSERT statements, and imported file1.sql and file2.sql using Oracle SQL Developer and file3.sql using SQL/Plus.
What is the output of SQLPlus after running #file3.sql?
Did you do a commit in SQLPlus after importing the data?
What query did you run in SQL Developer afterwards to check whether file3.sql was imported?
Related
I have successfully connected to a DB2 database from Oracle SQL Developer 19.4.0.354 using the DB2 ODBC driver.
SQl scripts work just fine.
Now I also want to execute PL/SQL scripts but simple sample script fails.:
set serveroutput on
DECLARE
message varchar2(20):= 'Hello, World!';
BEGIN
dbms_output.put_line(message);
END;
It fails in such a way that PL/SQL code does not seem to be accepted at all:
DB2 SQL Error: SQLCODE=-104, SQLSTATE=42601, SQLERRMC=DECLARE
message varchar2(20):= 'Hell;BEGIN-OF-STATEMENT;<create_view>, DRIVER=4.26.14
Is PL/SQL generally supported in this setup?
When using the Oracle-compatibility mode of Db2-LUW, it is necessary to:
set the Db2-registry-variable DB2_COMPATIBILITY=ORA with the db2set command.
bounce the Db2-instance with the db2stop and db2start commands, so the registry variable becomes effective.
create a new database after both of the above steps are completed (using the db2 create database command ), so that Oracle specific datatypes and other features become available.
If you only change the registry variable and bounce the Db2-instance but use a pre-existing database then you will not get all of the implemented Oracle compatibility features! This is documented in the Db2-Knowledge-Centre online.
With currently shipping Db2-LUW versions, you cannot retrofit the Oracle compatibility on to a previously created database.
I created a tablespace on Oracle SQL Developer and trying to access tables data with SQL PLUS console. But when I insert a row with SQL Developer and want to see if the result is display on the SQL PLUS console, SQL PLUS doesn't show me any results. Seems like there's no connection between SQL PLUS and SQL Developer.
Is anyone has an idea ?
of course you are committing the transactions, then querying them from SQL*Plus; otherwise there is no way to see the data from another session.
commit;
SQLDeveloper and SQL*Plus are just two front end tools that allow to access the database. Let's start by making sure, that:
* You connected with the same database
* You are connected as the same user
* You did commit
You need to commit from JDeveloper and not be in a transaction in sqlplus.
I have several application connected to Oracle 11g server. I would like to print all SQL queries executed into the database into text file. Is this possible?
I am using
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod &
Toad for oracle 10.6.1.3
when i try to run insert statement which is having around 84,000 + records, it is showing Out of Memory error. Here is the error image.
Any of you please suggest me, how i should execute this insert script in toad.
P.S : since toad is connecting to remote machine I'm not able to run it with SQLPLUS. If any one knows option to do that, please let me know.
If you need any more information, Please raise your hands in comment box i will provide you.
I got the same error when i want to execute sql script 70k rows.
But i solved it just like this.
Firstly
You should run it with sqlplus commands. Log in the sqlplus and run
this command
#scriptName.sql
Secondly (this is alternative)
You can use DBLINK in oracle.
As bpgergo suggested copy the sql file into remote machine using FTP, then open your SQLPLUS.
Follow this steps in SQLPLUS.
step 1 : change your current session using following query.
alter session set current_schema = Schema_Name;
Here, SCHEMA_NAME is schema name of your insert query table.
step 2 : Execute the sql script file using following query.
#{PATH}/FILE_NAME.SQL
Eg : #D:/oracle/script/FILE_NAME.SQL
Here, D:/oracle/script/ is the file available location and FILE_NAME is your sql script file name.
Now, It will work as expected.
How can I export data from Oracle 8i database using command which I can run through oracle cli?
My biggest problem is, the data should be exported based in the query I use...
For ex,
select * from emp where emp_id>4
should dump the records having emp_id>4.
I don't have permission to use functions.
Please help!!
Oracle provides a set of tools that are designed for exporting data (the exp tool, for instance). These don't run via the SQL*PLUS command line (which I assume is what you mean by CLI), although they do connect via NET*8. From Oracle 8i onwards, you can use the query parameter to limit the rows exported:
exp scott/tiger tables=emp query="where deptno=10"
But you have to have the Oracle client installed and be able to connect to the database via SQL*NET.
If all you have is the ability to run queries, you're out of luck unless you can write a query that generates a CSV (tricky if you don't have the ability to call/write functions). It sounds to me like all you have access to is a web interface.