Quantcast
Channel: Toad for Oracle Forum - Recent Threads
Viewing all 4385 articles
Browse latest View live

Connection Toad error Invalid Home Name

$
0
0
Connection Toad error Invalid Home Name
I cannot connect to any databases
W2k12 server
Oracle Instant client 11.2.0.3
Toad for Oracle 12.9

Invalid Home Name: p:\Oracle\ora11203\bin

Instant Client - 11.2.0.3 (11.2.0.3)
    ORACLE_HOME:p:\Oracle\ora11203\bin
    ORACLE_HOME_NAME:p:\Oracle\ora11203\bin
    ORACLE_HOME_KEY:
    ORACLE_SID:
    NLS_LANG:DUTCH_THE NETHERLANDS.WE8MSWIN1252
    SQLPATH:p:\oracle\ora11203\dbs
    LOCAL:
    Client DLL:p:\Oracle\ora11203\bin\oci.dll
    TNSNames.ora:p:\Oracle\tns_admin\tnsnames.ora
    SQLNet.ora:p:\Oracle\tns_admin\sqlnet.ora
    LDAP.ora:
    Login.sql:
    GLogin.sql:
    In system PATH:Yes
    Home is valid:Yes

RE: Script Working in Toad Quest Script Runner but not in Toad SQL*Plus

$
0
0

Sorry for the delay in getting your question answered.  SQLplus is not a Toad product, it is an Oracle product.  SQLplus is the editor that comes with your Oracle client.  If you are having issues running a query in SQLplus, I would suggest you contact Oracle to find out why this is occurring.

Script Working in Toad Quest Script Runner but not in Toad SQL*Plus

$
0
0

The script is pasted at the bottom of this post.

Here is the Script Runner Output:

start

loop 1

Update 1567471 F90183

loop 1

Update 7165 F91186

loop 1

Update 13112 F90660

...

loop 1

Update 9762 F91257

292 job records updated in NBRJOBS

PL/SQL procedure successfully completed.

Here is the output from SQL*Plus:


SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 19 13:24:37 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Last Successful login time: Tue Jul 19 2016 13:19:54 -06:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt
ions

 41

Each time Enter is pressed, SQL*Plus displays the next number (ie. 41 42 43...).  A coworker is able to run this script in SQL*Plus and I am able to run other scripts in SQL*Plus.

Any suggestions would be appreciated.  Thank you,  Dave

Here is the script:

-- Faculty Contracts - Base Salary Update
--     This script updates NBRJOBS salary amounts based upon spreadsheet from Faculty Contracts.

set serveroutput on;
declare

  CURSOR sal_upd_c IS
    select * from dpace.base_salary_upd@BANI_BAND.UNM.EDU;
   
  curr_rec            nbrjobs%ROWTYPE;
  ins_count           NUMBER default 0;
   
  begin
    dbms_output.put_line('start');
    FOR rec IN sal_upd_c LOOP
      begin
        dbms_output.put_line('loop 1');   
        select * into curr_rec from nbrjobs a
         where nbrjobs_effective_date = (
        select max(nbrjobs_effective_date) from nbrjobs
         where nbrjobs_pidm = a.nbrjobs_pidm and
               nbrjobs_posn = a.nbrjobs_posn and
               nbrjobs_suff = a.nbrjobs_suff) and
               nbrjobs_pidm = rec.pidm and
               nbrjobs_ecls_code = rec.eclass and
               nbrjobs_suff = '00' and
               nbrjobs_status = 'A';
       
        dbms_output.put_line('Update '||rec.pidm||' '||curr_rec.nbrjobs_posn);
     
        ins_count := ins_count + 1;
   
      exception
        when no_data_found then
          dbms_output.put_line ('Skipping '||rec.pidm||' no active job record');
        when others then
          dbms_output.put_line ('Skipping '||rec.pidm||' unknown error');
      end;
     
     
    END LOOP;
   dbms_output.put_line(ins_count||' job records updated in NBRJOBS');
  end;
 

RE: Trigger on Table with CLOB Raises Exception upon Toad's Edit Feature

$
0
0

OK, next beta - Import Table Data with CLOBs should no longer cause problems with your trigger.

RE: Toad 12.9.0.71, ASH browser time filter bug

$
0
0

It works fine for me.   When I set the filter for a specific start and end date, I see data.   Here is the query that runs when I have it set to "Active Sessions"

select TRUNC (sample_time, 'mi') sample_time, count(*) value
from V$ACTIVE_SESSION_HISTORY
where 1=1
and sample_time >= :MinSampTime
and sample_time <= :MaxSampTime
group by TRUNC (sample_time, 'mi')
order by 1;
:MinSampTime(DATE)=7/29/2016 7:37:13 AM
:MaxSampTime(DATE)=7/29/2016 3:33:42 PM

If you still think there is a bug, please provide more details so I can reproduce it.   Thanks.

RE: Trigger on Table with CLOB Raises Exception upon Toad's Edit Feature

$
0
0

Wonderful - thank you, John!

To the "version" question: Toad for Oracle 12.5.1.1, Base Edition; Add-Ons: <none>

RE: Trigger on Table with CLOB Raises Exception upon Toad's Edit Feature

$
0
0

Yup, that explains it.   The problem with EDIT and triggers on CLOBs was fixed in 12.8.

RE: Ignore blank lines within the SQL Editor for SQL

$
0
0

Disable "Treat blank line as statement terminator" in Options on the Execute/Compile page.


RE: Ignore blank lines within the SQL Editor for SQL

Ignore blank lines within the SQL Editor for SQL

$
0
0

I'm using 12.9 and if I have any SQL statement that contains any blank lines then the statement below that shows as a red circle with an exclamation mark.  Hitting PF9 doesn't run the query and complains about the red circle.


An SQL query like the one shown below won't run.  Blank lines between the SELECT and the FROM puts a red circle by the blank line and the FROM statement

select sysdate

from dual

How do you get rid of this so that blank lines are ignored?

RE: &&SCHEMA.tablename pet peeve

$
0
0

Chiming in late, but that mix of shell and SqlPlus variables intrigues me. Joe, a one million dollar question: I see an exclamation mark (!) in your screenshot, are you using a here-document? If so, then you are effectively "mixing technologies". [:)]

community.oracle.com/.../855475

Viewing oracle XML table in Toad data grid generates ORA-04036 memory error - Toad memory leak?

$
0
0

I have an oracle table SY_History with the structure shown below that includes an XML column and contains 17,591 rows. Each row has a small amount of character data.  The entire table consumes 22.4MB  When opening the table in the Toad for Oracle data grid without any filters (simply displaying it) it generates oracle error ORA-0436 out of PGA memory.  If the PGA memory is expanded the toad query will run, but it consumes 6GB and it will display after a long delay.  If I filter the table to show only one row it comes up without any problem.  I can query against the table and list it in Oracle SQL command window without a problem.  The result of an Oracle SR is Oracle feels there is not an oracle issue.  Appears to be a TOAD memory leak.  Toad version is 12.9.0.71

How does this get corrected?

Thanks

Joe

ALTER TABLE VPAORA.SY_HISTORY
DROP PRIMARY KEY CASCADE;

DROP TABLE VPAORA.SY_HISTORY CASCADE CONSTRAINTS;

CREATE TABLE VPAORA.SY_HISTORY
(
SY_HISTORY_ID NUMBER(20) DEFAULT "VPAORA"."SY_HISTORY_ID"."NEXTVAL",
SY_USER_ID NUMBER(20) CONSTRAINT SY_HISTORY_SU_NN NOT NULL,
SY_CALL_STACK VARCHAR2(4000 BYTE),
SY_ACTION VARCHAR2(20 BYTE) CONSTRAINT SY_HISTORY_AC_NN NOT NULL,
SY_COMMENT VARCHAR2(100 BYTE),
SY_PRIMARY_ID NUMBER(20) CONSTRAINT SY_HISTORY_PO_NN NOT NULL,
SY_CALL_PROGRAM VARCHAR2(100 BYTE),
SY_TABLE VARCHAR2(500 BYTE) CONSTRAINT SY_HISTORY_TB_NN NOT NULL,
SY_COLUMN1 VARCHAR2(500 BYTE),
SY_VALUE1_OLD VARCHAR2(500 BYTE),
SY_VALUE1_NEW VARCHAR2(500 BYTE),
SY_COLUMN2 VARCHAR2(500 BYTE),
SY_VALUE2_OLD VARCHAR2(500 BYTE),
SY_VALUE2_NEW VARCHAR2(500 BYTE),
SY_COLUMN3 VARCHAR2(500 BYTE),
SY_VALUE3_OLD VARCHAR2(500 BYTE),
SY_VALUE3_NEW VARCHAR2(500 BYTE),
SY_USER_ID_ADD NUMBER(20) CONSTRAINT SY_HISTORY_UA_NN NOT NULL,
SY_DATE_ADD DATE CONSTRAINT SY_HISTORY_DA_NN NOT NULL,
SY_USER_ID_MOD NUMBER(20),
SY_DATE_MOD DATE,
SY_UPDATES_XML SYS.XMLTYPE
)
XMLTYPE SY_UPDATES_XML STORE AS SECUREFILE BINARY XML (
TABLESPACE VPAORA
ENABLE STORAGE IN ROW
CHUNK 8192
NOCACHE
LOGGING
STORAGE (
INITIAL 104K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
))
ALLOW NONSCHEMA
DISALLOW ANYSCHEMA
LOGGING
NOCOMPRESS
NOCACHE
MONITORING;

COMMENT ON TABLE VPAORA.SY_HISTORY IS 'History of transactions.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_HISTORY_ID IS 'Unique identifier for this history row.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_USER_ID IS 'SY_User_ID of individual initiating the add/change transaction that is generating this history.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_CALL_STACK IS 'Oracle call stack that led to the transaction.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_ACTION IS 'Transaction that caused the change.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_COMMENT IS 'Comment regarding the change, if applicable.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_PRIMARY_ID IS 'Primary Key of row being changed.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_CALL_PROGRAM IS 'Last calling program as recorded through context variable, so not verifiable.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_TABLE IS 'Table whose data is changing';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_COLUMN1 IS 'Name of Column 1 being tracked.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE1_OLD IS 'Old Value of 1 element before change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE1_NEW IS 'New Value of 1 element after change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_COLUMN2 IS 'Name of Column 2 being tracked.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE2_OLD IS 'Old Value of 2 element before change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE2_NEW IS 'New Value of 2 element after change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_COLUMN3 IS 'Name of Column 3 being tracked.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE3_OLD IS 'Old Value of 3 element before change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_VALUE3_NEW IS 'New Value of 3 element after change';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_USER_ID_ADD IS 'User VPA_Person_ID who originally added this row.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_DATE_ADD IS 'Date row originally added.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_USER_ID_MOD IS 'User VPA_Person_ID who last modified this row.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_DATE_MOD IS 'Date row last updated.';

COMMENT ON COLUMN VPAORA.SY_HISTORY.SY_UPDATES_XML IS 'History of changes to table data values by table and column in XML format.';


CREATE INDEX VPAORA.SY_HISTORY_PI ON VPAORA.SY_HISTORY
(SY_PRIMARY_ID)
LOGGING;

CREATE UNIQUE INDEX VPAORA.SY_HISTORY_PK ON VPAORA.SY_HISTORY
(SY_HISTORY_ID)
LOGGING;

CREATE INDEX VPAORA.SY_HISTORY_TB ON VPAORA.SY_HISTORY
(SY_TABLE)
LOGGING;

CREATE INDEX VPAORA.SY_HISTORY_UI ON VPAORA.SY_HISTORY
(SY_USER_ID)
LOGGING;

ALTER TABLE VPAORA.SY_HISTORY ADD (
CONSTRAINT SY_HISTORY_PK
PRIMARY KEY
(SY_HISTORY_ID)
USING INDEX VPAORA.SY_HISTORY_PK
ENABLE VALIDATE);

RE: Viewing oracle XML table in Toad data grid generates ORA-04036 memory error - Toad memory leak?

$
0
0

I've never heard of this exact symptom, but Toad doesn't do well with BINARY XML.   It's been a long-standing problem.  

You can work around it with GetClobVal, like this:

SELECT SY_UPDATES_XML.GetClobVal() as SY_UPDATES_XML,

               <other columns....>

FROM SY_HISTORY SY

You must include a table alias, or GetClobVal with throw an error.  This workaround will be automatic in schema browser.
You’ll still have to code it manually in the editor though.



John

RE: &&SCHEMA.tablename pet peeve

$
0
0

Hi Andre,  Here's my fifty cent answer to your million Dollar question.  [:)]

Yes I am using a "here" document.  However it is my take that a here document in KShell is just a streamed literal, which still needs to parsed by sqlplus and is subject to the rules of it's OS Client.

So if you mean I am mixing technologies by expecting a Windows tool to handle variables like a Unix/Linux client, I suppose  you are correct.

That being said Toad handles variables the same as the Windows version of sqlplus. Both require a variable to include a period after the variable(&&OWNER.) or including a double period between the OWNER..TABLENAME in the sql itself. 

Since Toad is a windows tool I understand it should handle variables the same as it's respective Oracle's OS client. .

Actually it is Oracle's fault for not having consistent Syntax across OS systems.  So I blame Oracle!!  lol

RE: &&SCHEMA.tablename pet peeve

$
0
0

>  here document in KShell is just a streamed literal, which still needs to parsed by sqlplus and is subject to the rules of it's OS Client.

...but the variables you're using are parsed and handled by the shell. The substitutions are made to the string literal *before* sending it to SQL*Plus. What SQL*Plus is receiving is a string literal that it understands void of any variables. You've taken variable handling out of the SQL script and moved its processing to the shell. There is no difference between SQL*Plus on Linux compared to Windows here. There's nothing wrong with the approach other than you've locked your scripts into Linux. If you need compatibility with Windows you need to have your SQL be SQL*Plus compatible. 


RE: &&SCHEMA.tablename pet peeve

$
0
0

Yes Michael and Andre you are right.  I have done some additional testing and confirmed the OS system does the resolution of the owner name variable BEFORE streaming, so sqlplus has a valid owner.table_name.

Thanks!

RE: &&SCHEMA.tablename pet peeve

$
0
0

So back to my earlier suggestion. If you do something like...

define var = $var_value

...

select '&&SCHEMA..test' from...

...at start of your SQL script you can still use your here document and the SQL will largely be compatible elsewhere. You'd only need to change the DEFINE for your vars when executing on Windows.

RE: Connection Toad error Invalid Home Name

RE: svn is broken in 12.9

$
0
0

Hi, 

I am following up if you were able to create the debug log?  What is the status of this issue?

RE: Connection Toad error Invalid Home Name

$
0
0

That KB article is missing an important step, making sure that the path to OCI.dll is in system PATH. The resolution steps are correct per the info in description, but the title says... "How to configure the Oracle Instant Client to connect with Toad." which should include information about PATH.

The information the OP provided suggested there is a TNS_ADMIN environment variable setup and that the home is properly listed in PATH.

Viewing all 4385 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>