Desc command

Hi all
I did Set Linesize 1000. Then I desc table. I t is showing me only name column of desc command. Then I did formatting of name column
column name format a20
even then it does not show me the rest of two columns(null and datatype) why???

it is a oracle8 feature, describe is now capable of displaying nested tables with increments!
ok, you have two solutions:
1) do not use "set linesize 1000"
2) do not use "describe"
not happy?
you could write a script desc.sql with "set lin 80; desc &1; set lin 1000" and then use "@desc yourtab" to have a nicer output
Regards
Laurent

Similar Messages

  • How to display  Columns  in Alphabatical  order when using DESC command

    Hello
    A table column is inserted not in alphabetic order during the table creation definition.
    So while describing the table definition (e.g. desc emp)
    it will not show in the same order as we are written during the table creation.
    Question: is there any utility/command/query which will display the columns in alphabatical order while describing it.
    Regards
    Nikhil Wani

    select column_name from user_tab_columns
    order by column_name;
    should do it.
    Sunil

  • Delete command in SQLPLUS by use wrong column name command

    Assume I have three table T1,T2 and T3 shown as follow...
    sql> desc T1 ;
    cusid number
    name varchar2(50)
    sql> select * from T1;
    cusid name
    1) 101 TEST1
    2) 102 TEST2
    3) 103 TEST3
    4) 104 TEST4
    sql>desc T2;
    ref_cusid number
    sql>select * from T2
    cusid
    1) 103
    if I want to delete account in T1 that deleted account is in T2.
    I must use query1 , it will work
    query1::>
    delete from T1 where cusid in (select ref_cusid from T2);
    but if i type wrong by this command
    query2::>
    delete from T1 where cusid in (select cusid from T2);
    in query 2,it should be have warning message because field cusid is not in T2.Right ? But it will delete all account in table T1.
    compare query2 with query 3,
    query3::>
    delete from T1 where cusid in (select field_test from T2);
    it will show warning message like 'ORA-00904: "FIELD_TEST": invalid identifier'
    I noticed that in query2 and query3 , Different Thing is query 2 wrong column name in T2 has same name as column in T1. I wonder why it is.

    I doubt very much if this is really what you did:
    sql>desc T2;
    ref_cusid number
    sql>select * from T2
    cusid
    1) 103The desc command shows a column name ref_cusid. The select command shows a column title cusid, not ref_cusid.
    You start by saying that you have 3 tables, without doing anything with T3. Are you sure you you haven't mixed up a copy and paste somewhere?

  • 2.1 RC1 - Can not get data in Object viewer

    Hi,
    I open the table and change the tab to "Data" then error message is shown in the Data Editor Log panel.
    The message is "ORA-00923: FROM keyword not found where expected".
    This table has more than 100 columns. I guess that the SQL statement is too long so whole statement is not send to Oracle.
    EA2 work successfully.

    Hi,
    RaghvendraSaboo
    SELECT command is working in worksheet both 'select * from table' and 'select col1, co2,... from table'.
    Only object viewer can not show values.
    Here is the result of DESC command below.
    Thanks.
    desc ching1;
    Name Null Type
    CH-1 NOT NULL CHAR(6)
    CH-2 NVARCHAR2(16)
    CH-3 CHAR(1)
    CH-4Z CHAR(1)
    CH-4B CHAR(1)
    CH-4K CHAR(1)
    CH-5 CHAR(1)
    CH-6Z CHAR(1)
    CH-6B CHAR(1)
    CH-6K CHAR(1)
    CH-7 NUMBER(1)
    CH-8 NUMBER(1)
    CH-9 CHAR(1)
    CH-11 NUMBER(1)
    CH-12 NUMBER(7)
    CH-13 NUMBER(7)
    CH-14 CHAR(1)
    CH-15 CHAR(1)
    CH-16 NUMBER(2)
    CH-17 CHAR(1)
    CH-18 CHAR(1)
    CH-19 NUMBER(7)
    CH-20 NUMBER(7)
    CH-21 CHAR(1)
    CH-22 CHAR(1)
    CH-23 NUMBER(2)
    CH-24 CHAR(1)
    CH-25 CHAR(1)
    CH-26 CHAR(1)
    CH-27 CHAR(1)
    CH-28 CHAR(1)
    CH-30 CHAR(1)
    CH-31 CHAR(1)
    CH-32 CHAR(1)
    CH-33 CHAR(1)
    CH-34 NUMBER(3)
    CH-ER CHAR(1)
    CH-48 NUMBER(6)
    CH-49 CHAR(1)
    CH-50 NUMBER(6)
    CH-51 NUMBER(6)
    CH-60 NUMBER(1)
    CH-61 NUMBER(1)
    CH-62 NUMBER(1)
    CH-63 NUMBER(1)
    CH-64 NUMBER(1)
    CH-65 NUMBER(1)
    CH-66 NUMBER(1)
    CH-67 NUMBER(1)
    CH-68 NUMBER(1)
    CH-69 NUMBER(1)
    CH-73 NUMBER(1)
    CH-74 NUMBER(1)
    CH-75 NUMBER(1)
    CH-76 NUMBER(1)
    CH-79 NUMBER(3,2)
    CH-80 NUMBER(4)
    CH-81 NUMBER(4)
    CH-82 NUMBER(5)
    CH-83 NUMBER(5)
    CH-84 NUMBER(1)
    CH-85 NUMBER(5)
    CH-86 NUMBER(5)
    CH-87 NUMBER(5)
    CH-88 NUMBER(2)
    CH-91 NUMBER(1)
    CH-92 CHAR(1)
    CH-93 CHAR(1)
    CH-94 NUMBER(1)
    CH-95 NUMBER(1)
    CH-96 CHAR(1)
    CH-97 CHAR(1)
    CH-98 NUMBER(1)
    CH-99 NUMBER(6)
    CH-100 NUMBER(3,2)
    CH-101 NUMBER(7)
    CH-102 NUMBER(6)
    CH-103 NUMBER(6)
    CH-104 NUMBER(6)
    CH-105 NUMBER(6)
    CH-106 NUMBER(5)
    CH-107 NUMBER(6)
    CH-108 NUMBER(6)
    CH-109 NUMBER(6)
    CH-110 NUMBER(7)
    CH-111 NUMBER(7)
    CH-112 NUMBER(6)
    CH-113 NUMBER(6)
    CH-114 NUMBER(5)
    CH-120 NUMBER(6)
    CH-121 NUMBER(6)
    CH-130 NUMBER(5)
    CH-131 NUMBER(6)
    CH-132 NUMBER(6)
    CH-133 NUMBER(6)
    CH-134 NUMBER(6)
    CH-135 NUMBER(6)
    CH-136 NUMBER(6)
    CH-137 NUMBER(6)
    CH-138 NUMBER(6)
    CH-139 NUMBER(6)
    CH-140 NUMBER(6)
    CH-141 NUMBER(6)
    CH-142 NUMBER(6)
    CH-143 NUMBER(6)
    CH-144 NUMBER(5)
    CH-145 NUMBER(5)
    CH-146 NUMBER(5)
    CH-147 NUMBER(6)
    CH-148 NUMBER(5)
    CH-149 NUMBER(5)
    CH-150 NUMBER(6)
    CH-151 NUMBER(6)
    CH-152 NUMBER(6)
    CH-153 NUMBER(6)
    CH-154 NUMBER(6)
    CH-155 NUMBER(6)
    CH-156 NUMBER(6)
    CH-157 NUMBER(6)
    CH-160 NUMBER(7)
    CH-170 NUMBER(6)
    CH-171 NUMBER(5)
    CH-180 NUMBER(6)
    CH-190 NUMBER(7)
    CH-191 NUMBER(7)
    CH-200 NUMBER(3)
    CH-201 NUMBER(6)
    CH-202 NUMBER(6)
    CH-203 NUMBER(6)
    CH-204 NUMBER(6)
    CH-205 NUMBER(6)
    CH-206 NUMBER(6)
    CH-207 NUMBER(6)
    CH-208 NUMBER(6)
    CH-209 NUMBER(6)
    CH-210 NUMBER(6)
    CH-211 NUMBER(6)
    CH-212 NUMBER(6)
    CH-213 NUMBER(6)
    CH-214 NUMBER(6)
    CH-215 NUMBER(6)
    CH-216 NUMBER(6)
    CH-220 NUMBER(6)
    CH-221 NUMBER(6)
    CH-222 NUMBER(6)
    CH-223 NUMBER(6)
    CH-224 NUMBER(6)
    CH-225 NUMBER(6)
    CH-230 NUMBER(2)
    CH-231 NUMBER(5)
    CH-240 NUMBER(6)
    CH-241 NUMBER(6)
    CH-242 NUMBER(6)
    CH-243 NUMBER(6)
    CH-244 NUMBER(6)
    CH-280 NUMBER(6)
    CH-290 NUMBER(7)
    CH-300 NUMBER(6)
    CH-301 NUMBER(6)
    CH-302 NUMBER(6)
    CH-303 NUMBER(6)
    CH-304 NUMBER(1)
    CH-305 NUMBER(5)
    CH-306 NUMBER(1)
    CH-307 NUMBER(6)
    CH-308 NUMBER(6)
    CH-309 NUMBER(3)
    CH-310 NUMBER(6)
    CH-311 NUMBER(6)
    CH-312 NUMBER(6)
    CH-313 NUMBER(6)
    CH-314 NUMBER(6)
    CH-315 NUMBER(1)
    CH-316 NUMBER(5)
    CH-317 NUMBER(5)
    CH-318 NUMBER(5)
    CH-319 NUMBER(1)
    CH-320 NUMBER(5)
    CH-321 NUMBER(5)
    CH-322 NUMBER(5)
    CH-323 NUMBER(5)
    CH-324 NUMBER(6)
    CH-325 NUMBER(6)
    CH-326 NUMBER(6)
    CH-327 NUMBER(6)
    CH-328 NUMBER(6)
    CH-329 NUMBER(5)
    CH-330 NUMBER(5)
    CH-331 NUMBER(5)
    CH-332 NUMBER(6)
    CH-333 NUMBER(6)
    CH-334 NUMBER(5)
    CH-335 NUMBER(6)
    CH-336 NUMBER(6)
    CH-337 NUMBER(5)
    CH-338 NUMBER(5)
    CH-339 NUMBER(3)
    CH-340 NUMBER(6)
    CH-341 NUMBER(6)
    CH-342 NUMBER(6)
    CH-343 NUMBER(6)
    CH-344 NUMBER(6)
    CH-345 NUMBER(6)
    CH-346 NUMBER(6)
    CH-347 NUMBER(6)
    CH-348 NUMBER(6)
    CH-349 NUMBER(6)
    CH-350 NUMBER(6)
    CH-351 NUMBER(6)
    CH-352 NUMBER(6)
    CH-353 NUMBER(6)
    CH-354 NUMBER(6)
    CH-355 NUMBER(5)
    CH-356 NUMBER(5)
    CH-357 NUMBER(6)
    CH-358 NUMBER(6)
    CH-359 NUMBER(6)
    CH-360 NUMBER(6)
    CH-361 NUMBER(6)
    CH-362 NUMBER(6)
    CH-363 NUMBER(5)
    CH-364 NUMBER(5)
    CH-365 NUMBER(5)
    CH-366 NUMBER(5)
    CH-367 NUMBER(5)
    CH-368 NUMBER(5)
    CH-369 NUMBER(7)
    CH-370 NUMBER(7)
    CH-371 NUMBER(7)
    CH-372 NUMBER(7)
    CH-373 NUMBER(6)
    CH-374 NUMBER(6)
    CH-375 NUMBER(6)
    CH-380 NUMBER(6)
    CH-381 NUMBER(6)
    CH-382 NUMBER(6)
    CH-383 NUMBER(6)
    CH-384 NUMBER(6)
    CH-385 NUMBER(6)
    CH-386 NUMBER(6)
    CH-387 NUMBER(6)
    CH-388 NUMBER(6)
    CH-389 NUMBER(6)
    CH-390 NUMBER(5)
    CH-391 NUMBER(5)
    CH-392 NUMBER(5)
    CH-393 NUMBER(5)
    CH-394 NUMBER(6)
    CH-400 NUMBER(5)
    CH-401 NUMBER(4)
    CH-402 NUMBER(5)
    CH-403 NUMBER(5)
    CH-404 NUMBER(5)
    CH-405 NUMBER(5)
    CH-406 NUMBER(6)
    CH-407 NUMBER(6)
    CH-408 NUMBER(6)
    CH-409 NUMBER(6)
    CH-410 NUMBER(6)
    CH-411 NUMBER(6)
    CH-412 NUMBER(6)
    CH-413 NUMBER(6)
    CH-414 NUMBER(5)
    CH-415 NUMBER(6)
    CH-416 NUMBER(6)
    CH-417 NUMBER(6)
    CH-418 NUMBER(6)
    CH-419 NUMBER(6)
    CH-420 NUMBER(5)
    CH-421 NUMBER(5)
    CH-422 NUMBER(5)
    CH-423 NUMBER(5)
    CH-424 NUMBER(5)
    CH-425 NUMBER(5)
    CH-426 NUMBER(5)
    CH-427 NUMBER(6)
    CH-480 NUMBER(6)
    CH-490 NUMBER(6)
    CH-491 NUMBER(6)
    CH-500 NUMBER(6)
    CH-501 NUMBER(6)
    CH-502 NUMBER(6)
    CH-503 NUMBER(6)
    CH-504 NUMBER(6)
    CH-505 NUMBER(6)
    CH-506 NUMBER(6)
    CH-507 NUMBER(6)
    CH-508 NUMBER(6)
    CH-509 NUMBER(7)
    CH-510 NUMBER(7)
    CH-511 NUMBER(7)
    CH-512 NUMBER(7)
    CH-513 NUMBER(1)
    CH-514 NUMBER(1)
    CH-515 NUMBER(7)
    CH-516 NUMBER(7)
    CH-517 NUMBER(7)
    CH-518 NUMBER(7)
    CH-519 NUMBER(3)
    CH-520 NUMBER(7)
    CH-530 NUMBER(7)
    CH-531 NUMBER(7)
    CH-580 NUMBER(7)
    CH-590 NUMBER(6)
    CH-591 NUMBER(6)
    CH-600 NUMBER(4,1)
    CH-601 NUMBER(4,1)
    CH-602 NUMBER(4,1)
    CH-603 NUMBER(4,1)
    CH-604 NUMBER(4,1)
    CH-605 NUMBER(6,3)
    CH-606 NUMBER(4,1)
    CH-607 NUMBER(4,1)
    CH-608 NUMBER(2)
    CH-609 NUMBER(2)
    CH-610 NUMBER(2)
    CH-611 NUMBER(2)
    CH-612 NUMBER(2)
    CH-613 NUMBER(2)
    CH-614 NUMBER(2)
    CH-615 NUMBER(2)
    CH-616 NUMBER(2)
    CH-617 NUMBER(2)
    CH-618 NUMBER(2)
    CH-619 NUMBER(2)
    CH-620 NUMBER(2)
    CH-621 NUMBER(2)
    CH-622 NUMBER(2)
    CH-623 NUMBER(2)
    CH-624 NUMBER(2)
    CH-625 NUMBER(2)
    CH-626 NUMBER(2)
    CH-627 NUMBER(2)
    CH-628 NUMBER(3,1)
    CH-629 NUMBER(2)
    CH-630 NUMBER(2)
    CH-631 NUMBER(1)
    CH-632 NUMBER(1)
    CH-633 NUMBER(2)
    CH-634 NUMBER(4,1)
    CH-635 NUMBER(2)
    CH-636 NUMBER(4,1)
    CH-637 NUMBER(1)
    CH-638 NUMBER(2)
    CH-639 NUMBER(2)
    CH-640 NUMBER(4)
    CH-641 NUMBER(2)
    CH-642 NUMBER(2)
    CH-643 NUMBER(2)
    CH-644 NUMBER(2)
    CH-645 NUMBER(1)
    CH-646 NUMBER(2)
    CH-647 NUMBER(4,1)
    CH-648 NUMBER(1)
    CH-649 NUMBER(1)
    CH-650 NUMBER(2)
    CH-651 NUMBER(2)
    CH-660 NUMBER(4,1)
    CH-661 NUMBER(6,3)
    CH-662 NUMBER(4,1)
    CH-663 NUMBER(4,1)
    CH-664 NUMBER(4,1)
    CH-665 NUMBER(3,1)
    CH-666 NUMBER(2)
    CH-669 NUMBER(4,1)
    CH-670 NUMBER(6)
    CH-671 NUMBER(2)
    CH-672 NUMBER(2)
    CH-673 NUMBER(2)
    CH-674 NUMBER(2)
    CH-680 NUMBER(1)
    CH-681 NUMBER(4,1)
    CH-682 NUMBER(1)
    CH-683 NUMBER(4,1)
    CH-684 NUMBER(1)
    CH-685 NUMBER(4,1)
    CH-686 NUMBER(1)
    CH-687 NUMBER(4,1)
    CH-688 NUMBER(1)
    CH-689 NUMBER(4,1)
    CH-690 NUMBER(1)
    CH-691 NUMBER(4,1)
    CH-700 NUMBER(6)
    CH-701 CHAR(3)
    CH-702 CHAR(2)
    CH-703 NUMBER(7)
    CH-704 NUMBER(8)
    CH-705 NUMBER(8)
    CH-710 NUMBER(1)
    CH-711 NUMBER(4)
    CH-712 NUMBER(4)
    CH-720 NUMBER(5,2)
    CH-721 NUMBER(2)
    CH-750 NUMBER(8)
    CH-751 NUMBER(7)
    CH-752 NUMBER(7)
    CH-800 NUMBER(4)
    CH-801 NUMBER(4)
    CH-802 NUMBER(4)
    CH-803 NUMBER(6)
    CH-804 NUMBER(6)
    CH-811 NUMBER(4)
    CH-812 NUMBER(4)
    CH-813 NUMBER(6)
    CH-814 NUMBER(6)

  • Unknown table--- BIN$q9sxdXaDQgWvL8DWKxQFbw==$0

    I found the following unknown table in my scott/tiger instance.this table is named as
    BIN$q9sxdXaDQgWvL8DWKxQFbw==$0
    i am unable to run desc command or drop command on this table
    looking for some help regarding this
    thanks and regards

    Hi,
    Oracle introduce the concept of Recyclebin in 10g,whenever u drop the tables from schema then it automatically move to recyclebin and its names has changes with bin+some uq identifier,now in 10g ,after droping the tables from schema u can easily recover it by issuing one command.
    and if u want to be purge this table then use
    PURGE TABLE BIN$q9sxdXaDQgWvL8DWKxQFbw==$0;
    http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10739/tables.htm#sthref2018
    Kuljeet

  • ODBC connectivity to SQL-Server fails

    Oracle 11.2.0.2 on Enterprise Linux Enterprise Linux Server release 5.4 (Carthage).
    Using FreeTDS unixODBC Driver to connect to a MS SQL-Server 2008 R2 SP1database. (RPM package freetds-0.64-1.el5.rf.x86_64 reported by yum whatprovides for ODBC FreeTDS .so).
    ODBC isql connectivity works and SQL select Col1 from Schema.Table is successfully executed against DSN, and returns rows/data (not real names).
    Same SQL in Oracle, select "Col1" from "Schema"."Table"@dblink fails (using the same ODBC DSN as isql test cor connectivity), via sqlplus.
    Debug trace (HS_FDS_TRACE_LEVEL=debug) reports:
    Exiting hgopars, rc=28500 at 2013/06/19-14:12:08 with error ptr FILE:hgopars.c LINE:570 FUNCTION:hgopars() ID:SELECT list of size 0 is not valid
    Have enabled/disabled numerous combinations of odbc.ini and init.ora parameters such QuotedId,  HS_FDS_SQLLEN_INTERPRETATION, HS_FDS_SUPPORT_STATISTICS and so on. Also tried using DBMS_HS_PASSTHROUGH, instead of native SQL via sqlplus. Same error, consistently.
    Interestingly, the desc "Schema"."Table"@dblink call works fine in sqlplus - but according to the debug trace it lets the ODBC driver deal with it - it does not craft a SQL and pass this to the ODBC driver, according to the debug trace. Instead an ODBC interface call is used to describe the object.
    So, ODBC driver seems  perfectly fine. Oracle can successfully use it as the desc command proved. Except that SQL statements (from Oracle) via the driver fails.
    Any ideas as to what the problem can be?

    Yes, thanks Mike.
    Ran into a brick wall troubleshooting, have developers and project managers doing what seems to be an ugly dance (think that is what they are doing with the up and down jumping movements).
    With no responses to my posting here, and my dislike of bad dancing, went the SR route instead.
    Appreciate you looking at the posting though. Makes me feel less alone in a world of bad dancers...

  • Help in sql(pratap)

    Hi all,
    i want to retrive no of column present in a table in a sql query..don't use desc command
    thanks
    pratap

    Look in user_tab_cols (or all_tab_cols or dba_tab_cols).
    More specifically:
    select table_name, count(*) num_of_cols
    from   user_tab_cols
    group  by table_name
    order  by table_name;Message was edited by:
    Eric H

  • Binary Values unreadable - Database corrupt?

    Hi,
    I'm experiencing a really weird problem here, I have a table with some varchar columns and two binary columns. What I do now, is to select data from it via Python with the following select statement:
    select * from torder where customerid=1624 order by torderid desc
    What happens is, that only for this customerid some binary data is missing, they contain an empty string. If I do the select like this:
    select * from torder where customerid=1624 order by torderid
    It does work, the data is there. With this, it works too:
    select * from torder order by torderid desc
    So it seems, the combination of "customerid=1624" and "desc" somehow corrupts the results.
    What's furthermore interesting is, that when I delete the last inserted row of the result, it works, and if I add a new one, it's broken again.
    I could not check if the error is Python-related or not, as I found no way to retrieve/display the binary data in sqlcli, as it displays only something like 0x8002637A6F70652E6931 , but I doubt that this has something to do with Python.
    Any clues of how to fix this?
    My database version is Kernel    7.6.06   Build 003-121-202-135 | X32/LINUX 7.6.06   Build 003-121-20
    2-135
    Previously, I had 7.6.03 and updated it to the above version, hoping that this would fix the problem, but it did not.
    Best Regards,
    Hermann Himmelbauer

    Ok, first many thanks for your quick reply. I did not answer at first as the problem magically went away. But unfortunately the problem is back today.
    <p/>
    The DDL statements look the following, there are no indexes on the table:
    <p/>
    <pre>
    CREATE TABLE torder (
            torderid INTEGER NOT NULL DEFAULT SERIAL,
            creation_date TIMESTAMP,
            transfer_date TIMESTAMP,
            signed_date TIMESTAMP,
            signed_with VARCHAR(3) CHECK (signed_with in ('TAN', 'BKU', 'MAN') OR signed_with IS NULL),
            revocation_date TIMESTAMP,
            done_date TIMESTAMP,
            formdata LONG BYTE NOT NULL,
            trans_function VARCHAR(30) NOT NULL CHECK (trans_function in ('do_bank_transfer', 'do_bank_collection',
                                    'do_cheque_transfer', 'do_cash', 'do_cashdraw')),
            trans_type VARCHAR(30) NOT NULL CHECK (trans_type in ('national','sepa','international')),
            applet_location VARCHAR(35),
            errors_text VARCHAR(100),
            errors LONG BYTE,
            customerid INTEGER,
            dbuserid INTEGER,
            torder_periodicid INTEGER,
            PRIMARY KEY (torderid),
             FOREIGN KEY(customerid) REFERENCES kunde (kundeid),
             FOREIGN KEY(dbuserid) REFERENCES dbuser (dbuserid),
             FOREIGN KEY(torder_periodicid) REFERENCES torder_periodic (torder_periodicid)
    </pre>
    <p/>
    The insert statements look the following (They are copied out of the SQLAlchemy SQL log), one can see that the binary values are inserted here:
    <p/>
    <pre>
    INFO:sqlalchemy.engine.base.Engine.0x...d110:INSERT INTO torder (creation_date, transfer_date, signed_date, si
    gned_with, revocation_date, done_date, formdata, trans_function, trans_type, applet_location, errors_text, err
    ors, customerid, dbuserid, torder_periodicid) VALUES (now(), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    INFO:sqlalchemy.engine.base.Engine.0x...d110:['20091027113506345604', None, None, None, None, '\x80\x02}q\x01(
    U\x0bcharges_forq\x02U\x04bothq\x03U\x05dcodeq\x04U\x0588888q\x05U\x0ccurrency_isoq\x06U\x03EURq\x07U\x06valut
    aq\x08K\x00U\x11foreign_acc_name1q\tU\x11Foreign Account 2q\nU\x0cacc_payer_noq\x0bX\t\x00\x00\x00999111110q\x
    0cU\ttextlinesq\r]q\x0e(U\x0c1st transferq\x0fU\tMultilineq\x10U\x0bFor testingq\x11eU\x06amountq\x12cdecimal\
    nDecimal\nq\x13U\x071000.00\x85Rq\x14U\x0cacc_benef_noq\x15X\t\x00\x00\x00888111110q\x16U\x11foreign_acc_name2
    q\x17U\x0bfor Testingq\x18u.', 'do_bank_transfer', 'national', 'url:test_transfer', None, None, None, None, No
    ne]
    </pre>
    <p/>
    All rows are inserted with binary data, so it's never NULL and it's also never set to an empty string ('').
    <p/>
    But when reading back the rows, some binary values are an empty string.
    <p/>
    The following Python code illustrates the problem:
    <pre>
    import sapdb.dbapi
    def true_false_result(result):
        if result:
            return 'Bug begins'
        else:
            return 'Bug ends'
    def check_bincols(bdb, sqlcmd):
        print "----
        print "QUERY: %s" % sqlcmd
        print "----
        bdbc = bdb.cursor()
        bdbe = bdbc.execute(sqlcmd)
        bug_occured = False
        stored_bin_result = False
        while 1:
            row = bdbe.fetchone()
            if row is None:
                break
    Now check if the binary data results to an empty string,
    This should never happen (= the database bug)
            bin_result = (row[7]() == '')
            if bin_result != stored_bin_result:
                bug_occured = True
                print "Toggle to %s at torderid %s" % (
                    true_false_result(bin_result),
                    row[0])
                stored_bin_result = bin_result
        if not bug_occured:
            print "No Bug for this query"
        bdbe.close()
        bdbc.close()
    #bdb.close()
    if __name__ == '__main__':
        bdb = sapdb.dbapi.connect('USER', 'PASS', 'DBNAME', 'LOCALHOST')
    First try the original query, which results in a bug
        sqlcmd = 'select * from torder where customerid=1624 order by torderid desc'
        check_bincols(bdb, sqlcmd)
    This query normally is bugfree
        sqlcmd = 'select * from torder where customerid=1624 order by torderid'
        check_bincols(bdb, sqlcmd)
    This query has a bug, too
        sqlcmd = 'select * from torder order by torderid desc'
        check_bincols(bdb, sqlcmd)
    But this one not
        sqlcmd = 'select * from torder order by torderid'
        check_bincols(bdb, sqlcmd)
    This triggers the bug, too, which is curious as there's practically no ordering
        sqlcmd = 'select * from torder where customerid=1624 order by customerid desc'
        check_bincols(bdb, sqlcmd)
    So, it seems that the bug occurs only when using "DESC" for descending
    ordering.
    </pre>
    <p/>
    The output of this program is:
    <p/>
    <pre>
    QUERY: select * from torder where customerid=1624 order by torderid desc
    Toggle to Bug begins at torderid 1355
    Toggle to Bug ends at torderid 582
    QUERY: select * from torder where customerid=1624 order by torderid
    No Bug for this query
    QUERY: select * from torder order by torderid desc
    No Bug for this query
    QUERY: select * from torder order by torderid
    No Bug for this query
    QUERY: select * from torder where customerid=1624 order by customerid desc
    Toggle to Bug begins at torderid 1355
    Toggle to Bug ends at torderid 582
    </pre>
    <p/>
    So, it can be seen that the problem occurs ONLY when using descending ordering. Moreover it's interesting that the result for "select * from torder order by torderid desc" is sometimes buggy, sometimes not, which seems to be related if someone inserted some more rows or not. What's furthermore interesting is the last query, as there the order is applied to "customerid", which is the very same for every row, so there is no ordering and the bug occurs here, too.
    <p/>
    All this happens on my production instance. I have a testing environment, where I imported the very same data set (same database version etc.) and there is no such problem (for now), so it's quite complicated to nail down the problem further as I cannot easily disrupt the availability of the production instance.
    <p/>
    All I could do for now is not to use the "DESC" command and reorder the data in my application, but that is really suboptimal as I have to keep all results in memory.
    <p/>
    Any help is really appreciated!
    <p/>
    Best Regards,<BR>
    Hermann Himmelbauer
    <p>
    Update: I tried the same query with the following code with C++ / SQLDBC (I modified one of the SQLDBC examples):
    <p>
    <pre>
    First you have to include SQLDBC.h
    #include "SQLDBC.h"
    #include <stdio.h>
    typedef struct ConnectArgsT {
        char * username;
        char * password;
        char * dbname;
        char * host;
    } ConnectArgsT;
    static void parseArgs (ConnectArgsT * connectArgs, int argc, char **argv);
    using namespace SQLDBC;
    Let start your program with a main function
    int main(int argc, char *argv[])
       ConnectArgsT connectArgs;
       parseArgs (&connectArgs, argc, argv);
       char errorText[200];
    Every application has to initialize the SQLDBC library by getting a
    reference to the ClientRuntime and calling the SQLDBC_Environment constructor.
       SQLDBC_IRuntime *runtime;
       runtime = SQLDBC::GetClientRuntime(errorText, sizeof(errorText));
       if (!runtime) {
         fprintf(stderr, "Getting instance of the ClientRuntime failed %s", errorText);
         return (1);
       SQLDBC_Environment env(runtime);
    Create a new connection object and open a session to the database.
       SQLDBC_Connection *conn = env.createConnection();
       SQLDBC_Retcode rc;
       rc = conn->connect(connectArgs.host, connectArgs.dbname,
                          connectArgs.username, connectArgs.password);
       if(SQLDBC_OK != rc) {
         fprintf(stderr, "Connecting to the database failed %s", conn->error().getErrorText());
         return (1);
       printf("Sucessfull connected to %s as user %s\n",
              connectArgs.dbname, connectArgs.username);
    Create a new statment object and execute it.
       SQLDBC_Statement *stmt = conn->createStatement();
       rc = stmt->execute("select * from torder where customerid=1624 order by torderid desc");
       if(SQLDBC_OK != rc) {
         fprintf(stderr, "Execution failed %s", stmt->error().getErrorText());
         return (1);
    Check if the SQL command return a resultset and get a result set object.
       SQLDBC_ResultSet *result;
       result = stmt->getResultSet();
       if(!result) {
         fprintf(stderr, "SQL command doesn't return a result set %s", stmt->error().getErrorText());
         return (1);
    Position the curors within the resultset by doing a fetch next call.
       while (1) {
         rc = result->next();
         if(SQLDBC_OK != rc) {
           break;
           //fprintf(stderr, "Error fetching data %s", stmt->error().getErrorText());
           //return (1);
         char szString[30];
         char szString1[3000];
         SQLDBC_Length ind;
    Get a string value from the column.
         rc = result->getObject(1, SQLDBC_HOSTTYPE_ASCII, szString, &ind, sizeof(szString));
         if(SQLDBC_OK != rc) {
           fprintf(stderr, "Error getObject %s", stmt->error().getErrorText());
           return (1);
         rc = result->getObject(8, SQLDBC_HOSTTYPE_ASCII, szString1, &ind, sizeof(szString1));
         if(SQLDBC_OK != rc) {
           fprintf(stderr, "Error getObject %s", stmt->error().getErrorText());
           return (1);
         printf("%s %s\n", szString, szString1);
    Finish your program with a returncode.
       return 0;
    static void parseArgs (ConnectArgsT * connectArgs, int argc, char **argv)
    setting defaults for demo database
        connectArgs->username = (char*)"USER";
        connectArgs->password = (char*)"PASS";
        connectArgs->dbname = (char*)"MYDB";
        connectArgs->host = (char*)"localhost";
    use values from command line
        if (argc > 4) {
            connectArgs->host = argv [4];
        if (argc > 3) {
            connectArgs->dbname = argv [3];
        if (argc > 2) {
            connectArgs->password = argv [2];
        if (argc > 1) {
            connectArgs->username = argv [1];
    </pre>
    <p/>
    This works!! So it seems, that the problem is related to the Python module, which is interesting, as adding "DESC" should not be any difference to it. I personally suspect that there are some memory leaks in the code, which result in this strange behavior.
    <p/>
    Any suggestions?<p/>
    Best Regards<br>
    Hermann Himmelbauer
    Edited by: Hermann Himmelbauer on Oct 28, 2009 12:51 PM
    Edited by: Hermann Himmelbauer on Oct 28, 2009 12:55 PM

  • Sun Ray Connector proxy : Child closed socket prematurely, session shutdown

    Dear All,
    I'm using SRS 5 & SRWC 2.2 :
    $ pkginfo -l SUNWuttsc
       PKGINST:  SUNWuttsc
          NAME:  Sun Ray Connector for Microsoft Windows Operating Systems (opt)
      CATEGORY:  system,sunray
          ARCH:  i386
       VERSION:  2.2_32
       BASEDIR:  /opt
        VENDOR:  Sun Microsystems, Inc.
          DESC:  Commands, configuration, resources and Man Pages
        PSTAMP:  SunOS_5.10_20091021175007
      INSTDATE:  févr 05 2010 10:34
       HOTLINE:  Please contact your local service provider
        STATUS:  Installation complète.
         FILES:       26 chemins d'accès installés
                       9 répertoires
                      10 exécutables
                       1 exécutables setuid/setgid
                    9037 blocs utilisés (env.)
    The SRWC crash and restart immediately...
    As you can see I've some log like this :
    Feb  7 03:03:15 SRS Sun Ray Connector proxy:[18056]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:15 SRS Sun Ray Connector proxy:[18089]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18254]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18214]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18219]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18221]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    Feb  7 03:03:23 SRS Sun Ray Connector proxy:[18220]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    ...I'm using a separate DHCP on LAN. DTU & TSE (W2K8) are working 95% of time and sometime and randomly, one DTU has a full black screen. The only way to get the login screen of win 2K8 is to reset his own session.
    Help will be really appreciated.
    Florent.

    I have the same issue . . .
    1. Sun Ray 5 (Sun Ray 4.2)
    2. SRWC 2.2
    3. Solaris 10 u9 X86 on two x2200
    4. Terminal Server on Win2K3 R2 Standard x64 Edition SP2
    I have a handful of users and they all logon the same way, which is to enter username & password then I have the following lines at the end of the users' individual .dtprofile file . . .
    <begin snip>
    DTSOURCEPROFILE=true
    /opt/SUNWuttsc/bin/uttsc -b -m -O -u uname 192.168.100.29
    exit
    <end snip>
    Of course 'uname' is actually the user name followed by the Terminal Server IP address and as you can see I am using the '-O' option, but every morning all the users on a server have their Sun Ray sessions reset and I find this in the messages file . . .
    Mar 16 09:38:31 sunraya Sun Ray Connector proxy:[12941]: [ID 855542 user.error] Child closed socket prematurely, session shutdown
    . . . . Using cron, I reset the Sun Ray service twice a day on both servers at 7AM and 7PM . . .
    # cat /sunray-restart.script
    # This is to restart SunRay 5 service due to
    # what I think may be a memory leak that disconnects
    # the SunRay Windows Connector every day
    /opt/SUNWut/sbin/utrestart -c
    echo "#" >> /var/adm/messages
    date >> /var/adm/messages
    echo "#" >> /var/adm/messages
    echo " RESTARTING SUNRAY SERVICE " >> /var/adm/messages
    echo "#" >> /var/adm/messages
    echo "#" >> /var/adm/messages
    . . . But this does not appear to having an affect.
    I will be looking around the forums for any other bits of information about this. The "Known Issues" can probably be found in the Release Notes.

  • PL/SQL Procedure Parameters PROBLEM

    Here's my problem:
    When we describe the successfully compiled PL/SQL packaged procedures in SQL*Plus, the parameter order seems reversed. For instance, my PL/SQL source looks like this:
    Create Package pkg1...
    Procedure func1 (param1 in varchar2,
    param2 in number) is
    ...function body...
    end func1;
    end pkg1;
    After it is successfully compiled in SQL*Plus, when I describe it using the desc command, it shows:
    PROCEDURE FUNC1
    Argument Name Type ......
    PARAM2 VARCHAR2
    PARAM1 VARCHAF2
    This problem occurs occasionally, if we recompile the source, it goes away. We couldn't quite tell when and how this happens. When the problem occurs, we checked the ALL_SOURCE view and verified that the parameters are in the right order.
    We use the Merant Drivers for our client side interfaces and whenever we have this problem on the db server, we get the "wrong number of types or parameters" error.
    Any clues, hints, solutions are greatly appreciated.
    Thank you for your time.
    On a different note, I couldn't find the appropriate forum to post this PL/SQL specific message, wondering why there isn't a PL/SQL forum.
    Murthy.

    Hi Yegneshwar
    Can U tell me how to invoke the procedure ? If all it can be invoked the post it or mail me and then I might help U out.
    Thank U.
    edwin

  • How do we?

    Hello,
    I want to identify the elements defined in XML schema. I have XML tables in XML DB (Oracle 9i). I tried to expand the XML tables using sqlplus Desc command. It is going in indeninete level, due to type definition for each XML elements.
    Do we have any scripts or tools to view the XML table in tree form?
    I want to go upto lowest level of structure, so I could see column, attribute manner. How to go about?
    Do we have any tools to view XML db as object model/Data Model form?
    If I have XML table in XML DB or XML schema, how could we create relation view? (View ---> Coulmn ----> Relational type (eg Varchar2, Date, number ) )
    I appreciate your help.
    Ram

    Hi Rashmi,
    Thanks for your help/reply. I downloaded the XMLspy. I was able to open the (.xsd) file . I tried to connet to oracle. Through import option, it was not showing XML Database, XML Schema of my instance. It was showing relational tables.
    How do I access objects of XML Database using XMLspy? What is the workaround?
    I appreciate your help.
    Rgds,
    Ram

  • Oracle Resource Manager

    hi,
    In the GROUP section of the ubb file I have defined a Oracle Resource Manager.
    GRP1
    LMID = SITE1 GRPNO =1
    TMSNAME = TMS_ORA TMSCOUNT = 2
    OPENINFO = "Oracle_XA:Oracle_XA+Acc=P/usr1/usr1+SesTm=0+LogDir=/tmp/xa_logs+Objects=T+Loose_Coupling=false+SesWt=60"
    when i boot the application, the TMS_ORA gets booted.
    Now if I change just the login information to another valid user (say usr2/usr2)of
    the database in the OPENINFO parameter and try to boot the TMS_ORA fails.
    Can you please let me know as to what can be the possible reason behind this.
    Thanks

    Hi,
    If you are using ORACLE Version 7.X,
    You should grant the SELECT privilege of v$xatrans$ to usr2.
    The checking is like the following.
    1. sqlplus usr2/usr2
    2. desc v$xatrans$
    Here, If the desc command's result gets a error, then the privilege is
    not granted to usr2.
    info) v$xatrans$ view table owner is sys, therefore you should login sys
    using sqlplus
    and then "grant select on v$xatrans$ to usr2" statement is
    executed in sqlplus prompt.
    3. reboot TMS.
    If you are using ORACLE Version 8.X,
    Maybe, You should grant the SELECT privilege of DBA_PENDING_TRANSACTIONS
    view table to usr2.
    The checking is like the following.
    1. sqlplus usr2/usr2
    2. desc dba_pending_transactions
    Here, If the desc command's result gets a error, then the privilege is
    not granted to usr2.
    info) DBA_PENDING_TRANSACTIONS view table owner is sys, therefore you
    should login sys using sqlplus
    and then "grant select on dba_pending_transactions to usr2"
    statement is executed in sqlplus prompt.
    3. reboot TMS.
    This hopes help.
    Thanks.
    "vipul" <[email protected]> wrote in message
    news:[email protected]..
    >
    hi,
    In the GROUP section of the ubb file I have defined a Oracle ResourceManager.
    >
    GRP1
    LMID = SITE1 GRPNO =1
    TMSNAME = TMS_ORA TMSCOUNT = 2
    OPENINFO ="Oracle_XA:Oracle_XA+Acc=P/usr1/usr1+SesTm=0+LogDir=/tmp/xa_logs+Objects=T+L
    oose_Coupling=false+SesWt=60"
    >
    >
    when i boot the application, the TMS_ORA gets booted.
    Now if I change just the login information to another valid user (sayusr2/usr2)of
    the database in the OPENINFO parameter and try to boot the TMS_ORA fails.
    Can you please let me know as to what can be the possible reason behindthis.
    >
    Thanks

  • Deploying rel_time table

    Hi all,
    I'm trying to do some hands on OWB 10g Release 2, so i used the oracle by example tutorials.
    when i reached the deployment lesson I tried to deploy the rel_time table but the depolyment failed
    the rel_time table is created but the failure happned when trying to run the scripts on the rel_time_COMMENT.dll that try to add comments to the rel_time table using COMMENT ON COLUMN statements. the error is "ORA-00942: table or view does not exist".
    I tried to access the rel_time table by "SELECT * FROM rel_time" using TOAD the same error appeared. and appeared with another table deployed by OWB
    I tried to DDL that created the table an error indicating that an object with the same name already exist.
    I checked the USER_TABLES view i found an entry for the table "rel_time"... the table also appeared under the Tables node of the objects tree of the toad
    the same behaviour repeated in the SQL+
    can any one help on this issue please
    best of regards
    Message was edited by:
    Shaimaa

    i did so and found the owner of the rel_time table as the expense_wh
    I knew that the table exist because it appears in the tables tree on the TOAD and when I try to create a table with the same name an error indicating that an object with the same name exists appears.
    i tried to create a test table in the same schema and tried to access this table and i succeded.
    I also tried to desc a deployed sequence and had the same error "object doesn't exist" while it's exist in the user_objects view . I tried to create a sequence in the same schema then used its name with DESC command and it's executed successfully ...
    there's a problem in the objects created by deployment form the OWB .. !!!!????
    Message was edited by:
    Shaimaa

  • New starter

    create table countries
    Name varchar (255),
    Null? varchar(255) ,
    Type varchar(255)
    Result
    Null? varchar(255) ,
    ERROR at line 4:
    ORA-00904: : invalid identifier
    null? should be my coloumn name ,,,, how do i do it
    Thanx

    I just realized that you use the column names of the DESC command to create your table...
    This command gives you an overview of the table, the names of the columns - their optionality and the datatype
    SQL> create table countries
      2  (code varchar2(5)
      3  ,name varchar2(15)
      4  ,language varchar2(25)
      5  )
      6  /
    Table created.
    SQL> desc countries
    Name                                      Null?    Type
    CODE                                               VARCHAR2(5)
    NAME                                               VARCHAR2(15)
    LANGUAGE                                           VARCHAR2(25)
    SQL> alter table countries
      2  modify code not null
      3  /
    Table altered.
    SQL> desc countries
    Name                                      Null?    Type
    CODE                                      NOT NULL VARCHAR2(5)
    NAME                                               VARCHAR2(15)
    LANGUAGE                                           VARCHAR2(25)

  • Studio Creator - Pointbase database - ApplicationModel - AppModel4 - DDL ?

    Hello,
    Does anyone know how i can get the DDL text from the Pointbase database for the AppModel4 tutorial.
    Basically, i want to use that DDL to create some tables in Oracle.
    In Creator, i see where you can write SQL to query specific tables, but the DESC command doesn't show the DDL apparently!
    Thanks very much!

    Hi -,
    PointBase Travel schema populating java class is available at:
    $Creator/startup/samples/PBCreateTravelDB.java
    I do have such a java class for populating Travel Schema in Oracle. If you can email your request to CreatorFeedback AT sun DOT com, i can send email that file back to you.
    Regards,
    Sakthi

Maybe you are looking for