Sqlplus logging in

Hi,
can you please let me know what is the use of
sqlplus /nolog instead of using sqlplus '/as sysdba'
thanks

Yes. You didn't read my post.You thinking that you have great magic power. Great. You are tracking whatever OP's thinking in his mind. :)
Do you use / as sysdba all the time? Hopefully not. So what do you use to prevent exposure of username/password in an Unix environment? '/ as sysdba'?When do you have OS authentication, then why you are worrying of other security concern?
So is the switch /nolog of no use as you claim?
I explained it is of use! So why do you contradict that? Where is the established connections.
Your advice is, as several times before, dangerous, You seem to recommend to use / as sysdba all the time, If I would see you do that, I would walk you to your desk, and have you collect your belongings, and say 'Farewell'.Then why you grant the permission to connect '/ as sysdba' ? If not granted do you think still it is going to connect?
I know your history here, How many posters frustrated with your comments, God has given great patience to me. I dont want to loose that by replying you such persons. You thinking as Larry Ellison thats why you will say farewell. If you throw a ball down do you think it is not going to come back? It will come with double of power.
I will give send visa, ticket prices and do the same farewell. You are confident that you can't do in your life term except that GOD. Please mind it.
Stop eating much SALT :)

Similar Messages

  • Hide the password "sqlplus log/pass"

    Hi,
    I am using the following command and running through the shell script.
    Unix Prompt> sqlplus abc/abc @sqlplus_settings.sql
    Now when I do ps -ef |grep abc. It shows me the username and password "abc".
    How can hide the password
    Thanks and regards
    KP
    null

    1. you could put the username/password as
    the first line of u're sqlscript.
    2. or use the following syntax in unix ksh
    sqlplus << END_OF_SQLPLUS_CMDS
    username/password
    @sqlplus_settings.sql
    END_OF_SQLPLUS_CMDS
    unfortunately the above ksh will exit once it executes sqlplus_setting.sql ..so is only useful for running batch scripts
    3. if u're purpose (as it seems from the name of u're script ) is to set some initial sql*plus settings like linesize ,pagesize etc...then try using login.sql SQL*Plus always looks for this script in the current dir or the ORACLE_PATH and runs it as it connects to a session.

  • Jdbc takes more time then sqlplus

    Hi,
    I am using type 4 jdbc driver(classes12.jar) to access the oracle10.0.2.
    The table is quite huge having total rows 33,213,317,702.
    The problem I am facing is, the same query If i runs on TOAD takes time of the order of 30-40 seconds.
    And If I run using JDBC it take around 250 seconds.
    Which is significantly larger. Has anbody have clues on that
    The query return just 30 rows. I am using Prepared Statement. and the time mentioned above is just the time taken to execute query. It doesn't include the time to get the connection or to get data from the result set.

    >
    I have removed this from the sql query /*+ ORDERED parallel(a11) use_hash(a11)
    *******************************SQLPlus Log *********************
    Execution Plan
    Plan hash value: 690042758
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 1 | 1253 | 32188 (40)| 00:09:40 | | | | | |
    |* 1 | COUNT STOPKEY | | | | | | | | | | |
    | 2 | TEMP TABLE TRANSFORMATION | | | | | | | | | | |
    | 3 | PX COORDINATOR | | | | | | | | | | |
    | 4 | PX SEND QC (RANDOM) | :TQ10001 | 1 | 18 | 1 (0)| 00:00:01 | | | Q1,01 | P->S | QC (RAND) |
    | 5 | LOAD AS SELECT | | | | | | | | Q1,01 | PCWP | |
    | 6 | PX RECEIVE | | 1 | 18 | 1 (0)| 00:00:01 | | | Q1,01 | PCWP | |
    | 7 | PX SEND ROUND-ROBIN | :TQ10000 | 1 | 18 | 1 (0)| 00:00:01 | | | Q1,00 | P->P | RND-ROBIN |
    | 8 | PX PARTITION HASH ALL | | 1 | 18 | 1 (0)| 00:00:01 | 1 | 64 | Q1,00 | PCWC | |
    | 9 | TABLE ACCESS BY LOCAL INDEX ROWID | DIM_COM_ADVERTISER_ACCOUNT | 1 | 18 | 1 (0)| 00:00:01 | 1 | 64 | Q1,00 | PCWP | |
    | 10 | BITMAP CONVERSION TO ROWIDS | | | | | | | | Q1,00 | PCWP | |
    |* 11 | BITMAP INDEX SINGLE VALUE | DIM_ADV_ACCOUNT_BIDX29 | | | | | 1 | 64 | Q1,00 | PCWP | |
    | 12 | PX COORDINATOR | | | | | | | | | | |
    | 13 | PX SEND QC (ORDER) | :TQ20004 | 1 | 1253 | 32188 (40)| 00:09:40 | | | Q2,04 | P->S | QC (ORDER) |
    | 14 | VIEW | | 1 | 1253 | 32188 (40)| 00:09:40 | | | Q2,04 | PCWP | |
    |* 15 | SORT ORDER BY STOPKEY | | 1 | 214 | 32186 (40)| 00:09:40 | | | Q2,04 | PCWP | |
    | 16 | PX RECEIVE | | 1 | 1253 | | | | | Q2,04 | PCWP | |
    | 17 | PX SEND RANGE | :TQ20003 | 1 | 1253 | | | | | Q2,03 | P->P | RANGE |
    |* 18 | SORT ORDER BY STOPKEY | | 1 | 1253 | | | | | Q2,03 | PCWP | |
    | 19 | SORT GROUP BY | | 1 | 214 | 32186 (40)| 00:09:40 | | | Q2,03 | PCWP | |
    | 20 | PX RECEIVE | | 1 | 34 | 3 (0)| 00:00:01 | | | Q2,03 | PCWP | |
    | 21 | PX SEND HASH | :TQ20002 | 1 | 34 | 3 (0)| 00:00:01 | | | Q2,02 | P->P | HASH |
    | 22 | BUFFER SORT | | 1 | 1253 | | | | | Q2,02 | PCWP | |
    | 23 | TABLE ACCESS BY LOCAL INDEX ROWID | DIM_COM_ACCOUNT_TERM | 1 | 34 | 3 (0)| 00:00:01 | 1 | 1 | Q2,02 | PCWC | |
    | 24 | NESTED LOOPS | | 1 | 214 | 32184 (40)| 00:09:40 | | | Q2,02 | PCWP | |
    | 25 | NESTED LOOPS | | 1 | 180 | 32183 (40)| 00:09:40 | | | Q2,02 | PCWP | |
    |* 26 | HASH JOIN | | 1 | 61 | 32183 (40)| 00:09:40 | | | Q2,02 | PCWP | |
    | 27 | PX RECEIVE | | 1 | 7 | 2 (0)| 00:00:01 | | | Q2,02 | PCWP | |
    | 28 | PX SEND HASH | :TQ20000 | 1 | 7 | 2 (0)| 00:00:01 | | | Q2,00 | P->P | HASH |
    | 29 | PX BLOCK ITERATOR | | 1 | 7 | 2 (0)| 00:00:01 | | | Q2,00 | PCWC | |
    | 30 | TABLE ACCESS FULL | SYS_TEMP_0FDAE1E8A_59FE93DB | 1 | 7 | 2 (0)| 00:00:01 | | | Q2,00 | PCWP | |
    | 31 | PX RECEIVE | | 7855 | 414K| 32180 (40)| 00:09:40 | | | Q2,02 | PCWP | |
    | 32 | PX SEND HASH | :TQ20001 | 7855 | 414K| 32180 (40)| 00:09:40 | | | Q2,01 | P->P | HASH |
    | 33 | PX PARTITION HASH SUBQUERY | | 7855 | 414K| 32180 (40)| 00:09:40 |KEY(SQ)|KEY(SQ)| Q2,01 | PCWC | |
    | 34 | TABLE ACCESS BY LOCAL INDEX ROWID| FACT_TRF_ADV_TERM_DAILY | 7855 | 414K| 32180 (40)| 00:09:40 | KEY | KEY | Q2,01 | PCWP | |
    | 35 | BITMAP CONVERSION TO ROWIDS | | | | | | | | Q2,01 | PCWP | |
    | 36 | BITMAP MINUS | | | | | | | | Q2,01 | PCWP | |
    | 37 | BITMAP MINUS | | | | | | | | Q2,01 | PCWP | |
    | 38 | BITMAP AND | | | | | | | | Q2,01 | PCWP | |
    | 39 | BITMAP MINUS | | | | | | | | Q2,01 | PCWP | |
    | 40 | BITMAP MINUS | | | | | | | | Q2,01 | PCWP | |
    | 41 | BITMAP MERGE | | | | | | | | Q2,01 | PCWP | |
    | 42 | BITMAP KEY ITERATION | | | | | | | | Q2,01 | PCWP | |
    | 43 | BUFFER SORT | | | | | | | | Q2,01 | PCWP | |
    | 44 | TABLE ACCESS FULL | SYS_TEMP_0FDAE1E8A_59FE93DB | 1 | 13 | 2 (0)| 00:00:01 | | | Q2,01 | PCWP | |
    |* 45 | BITMAP INDEX RANGE SCAN | FACT_TRF_ADVTD_NEW2_BDX16 | | | | | KEY | KEY | Q2,01 | PCWP | |
    |* 46 | BITMAP INDEX SINGLE VALUE | FACT_TRF_ADVTD_NEW2_BDX14 | | | | | KEY | KEY | Q2,01 | PCWP | |
    |* 47 | BITMAP INDEX SINGLE VALUE | FACT_TRF_ADVTD_NEW2_BDX14 | | | | | KEY | KEY | Q2,01 | PCWP | |
    | 48 | BITMAP MERGE | | | | | | | | Q2,01 | PCWP | |
    | 49 | BITMAP KEY ITERATION | | | | | | | | Q2,01 | PCWP | |
    | 50 | BUFFER SORT | | | | | | | | Q2,01 | PCWP | |
    |* 51 | TABLE ACCESS FULL | DIM_COM_DATE | 371 | 5194 | 4 (0)| 00:00:01 | | | Q2,01 | PCWP | |
    |* 52 | BITMAP INDEX RANGE SCAN | FACT_TRF_ADTD_NEW2_BDX1 | | | | | KEY | KEY | Q2,01 | PCWP | |
    |* 53 | BITMAP INDEX SINGLE VALUE | FACT_TRF_ADVTD_NEW2_BDX14 | | | | | KEY | KEY | Q2,01 | PCWP | |
    |* 54 | BITMAP INDEX SINGLE VALUE | FACT_TRF_ADVTD_NEW2_BDX14 | | | | | KEY | KEY | Q2,01 | PCWP | |
    | 55 | PARTITION RANGE SINGLE | | 1 | 119 | 3 (0)| 00:00:01 | 1 | 1 | Q2,02 | PCWP | |
    | 56 | PARTITION HASH ALL | | 1 | 119 | 3 (0)| 00:00:01 | 1 | 64 | Q2,02 | PCWP | |
    | 57 | TABLE ACCESS BY LOCAL INDEX ROWID | DIM_COM_URL | 1 | 119 | 3 (0)| 00:00:01 | 1 | 64 | Q2,02 | PCWP | |
    |* 58 | INDEX RANGE SCAN | IX_DIM_COM_URL_BID_URLSID | 1 | | 2 (0)| 00:00:01 | 1 | 64 | Q2,02 | PCWP | |
    | 59 | PARTITION RANGE SINGLE | | 1 | | 2 (0)| 00:00:01 | 1 | 1 | Q2,02 | PCWP | |
    | 60 | PARTITION HASH ITERATOR | | 1 | | 2 (0)| 00:00:01 | KEY | KEY | Q2,02 | PCWP | |
    |* 61 | INDEX RANGE SCAN | DIM_COM_ACCOUNT_TERM_IDX1 | 1 | | 2 (0)| 00:00:01 | KEY | KEY | Q2,02 | PCWP | |
    Predicate Information (identified by operation id):
    1 - filter(ROWNUM<=30)
    11 - access("ACCOUNT_KEY"='6270741410')
    15 - filter(ROWNUM<=30)
    18 - filter(ROWNUM<=30)
    26 - access("A11"."ACCOUNT_SID"="C0")
    45 - access("A11"."ACCOUNT_SID"="C0")
    46 - access("A11"."PRODUCT_SID" IS NULL)
    47 - access("A11"."PRODUCT_SID" IS NULL)
    51 - filter("A13"."DATE_KEY">=TO_DATE('2007-06-13 00:00:00', 'yyyy-mm-dd hh24:mi:ss'))
    52 - access("A11"."DATE_SID"="A13"."DATE_SID")
    53 - access("A11"."PRODUCT_SID"=1)
    54 - access("A11"."PRODUCT_SID"=8)
    58 - access("A11"."URL_SID"="URL_SID")
    61 - access("A11"."TERM_SID"="TERM_SID")
    Statistics
    559 recursive calls
    185 db block gets
    140470 consistent gets
    704 physical reads
    72528 redo size
    3230 bytes sent via SQL*Net to client
    349 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    123 sorts (memory)
    0 sorts (disk)
    29 rows processed
    SQL>
    JDBC Log is
    Is something like this
    BCV FUNC CharacterSet.convertAL32UTF8BytesToJavaChars: return=28
    DBCV FUNC DBConversion._CHARBytesToJavaChars(bytes[], nbytes[], chars[], cs): returned 28
    DBCV FUNC DBConversion.CHARBytesToJavaChars(bytes[]= (6000 bytes):
    68 74 74 70 3a 2f 2f 77 77 77 2e 70 69 6e 6f 75 74 6c 65 74
    2e 63 6f 6d 2f 70 69 6e 72 74 73 2e 61 73 70 78 3f 67 61 64
    3d 43 4b 62 4c 69 36 63 43 45 67 69 71 72 35 33 58 6b 66 48
    52 48 52 69 4f 79 4a 6e 39 41 79 44 4f 2d 70 49 4e 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ... last 5800 bytes were not printed to limit the output size byteOffset=0, chars[]= (136020 bytes):
    00 22 00 63 00 75 00 73 00 74 00 6f 00 6d 00 20 00 6c 00 61
    00 70 00 65 00 6c 00 20 00 70 00 69 00 6e 00 73 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ... last 135820 bytes were not printed to limit the output sizecharOffset=65009, nbytes[0]=25, charSize=1500)
    DBCV FUNC DBConversion._CHARBytesToJavaChars(bytes[]= (6000 bytes):
    68 74 74 70 3a 2f 2f 77 77 77 2e 70 69 6e 6f 75 74 6c 65 74
    2e 63 6f 6d 2f 70 69 6e 72 74 73 2e 61 73 70 78 3f 67 61 64
    3d 43 4b 62 4c 69 36 63 43 45 67 69 71 72 35 33 58 6b 66 48
    52 48 52 69 4f 79 4a 6e 39 41 79 44 4f 2d 70 49 4e 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ... last 5800 bytes were not printed to limit the output size, byteOffset=0, chars[]= (136020 bytes):
    00 22 00 63 00 75 00 73 00 74 00 6f 00 6d 00 20 00 6c 00 61
    00 70 00 65 00 6c 00 20 00 70 00 69 00 6e 00 73 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    ... last 135820 bytes were not printed to limit the output size, charOffset=65009, cs=873, nbytes[0]=25,charSize=1500)
    DBCV FUNC CharacterSet.convertAL32UTF8BytesToJavaChars(bytes (length=6000),offsetBytes=0,chars (length=68010), offsetChars=65009, countArr[0]=25,convertWithReplacement=true,charSize=1500)
    DBCV FUNC CharacterSet.convertAL32UTF8BytesToJavaChars: return=25
    DBCV FUNC DBConversion._CHARBytesToJavaChars(bytes[], nbytes[], chars[], cs): returned 25
    JTTC FUNC oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows:return: validRows = 29
    DRVR FUNC OracleStatement.execute_maybe_describe():return validRows = 29, needToPrepareDefineBuffer = false
    DRVR FUNC OracleStatement.doExecuteWithTimeout():return validRows = 29, needToPrepareDefineBuffer = false
    I am using literals.
    If you need any more info pl. let me know.
    Thanks much
    * Sorry - The sqlplus log is not going in correct format.

  • Sqlplus hangs

    Hi,
    I am trying to connect to Database using the following command:
    sqlplus user/passwd@i2o
    I'm just trying to connect to local database from the same machine where database is installed. But the same works from the remote machines.
    However, I've traced sqlplus process via strace utility. Looks like an infinite loop. See at the bottom.
    Any help will be greatly appreciated.
    Thanks in advance.
    Best Regards,
    Nikhil
    SQLPlus Log:
    munmap(0xb6bc8000, 1048576) = 0
    access("/ta/oracle/glinux/network/admin/sqlnet.ora", F_OK) = 0
    open("/ta/oracle/glinux/network/admin/sqlnet.ora", O_RDONLY|O_LARGEFILE) = 6
    fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
    fstat64(6, {st_mode=S_IFREG|0755, st_size=181, ...}) = 0
    mmap2(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6bc8000
    read(6, "# sqlnet.ora Network Configurati"..., 1048576) = 181
    read(6, "", 1048576) = 0
    close(6) = 0
    munmap(0xb6bc8000, 1048576) = 0
    open("/ta/oracle/glinux/rdbms/mesg/ocius.msb", O_RDONLY) = 6
    fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
    lseek(6, 0, SEEK_SET) = 0
    read(6, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
    lseek(6, 512, SEEK_SET) = 512
    read(6, "\337y\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
    lseek(6, 1024, SEEK_SET) = 1024
    read(6, "\25\7\'\0072\7>\7j\7\276\17$\'\6K5S\24TfT\307T(VsV\222"..., 86) = 86
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    times(NULL) = -2119410301
    _______________________________

    delete your spfile
    put those parameters to your pfile(initora)
    *.processes=150
    *.job_queue_processes=10That looks like the most unjustified advice I have seen on this forum for a long time. And there've been some doozies here recently.
    You don't know what the values of those parameters are currently, they don't seem to bear any relationship to the problem that the poster is experiencing and you don't know that the chap has an spfile. I can just maybe see that you might assume that the database server has run out of space in its process table and so is unable to allocate a new server process for the connection. It's an unwarranted assumption if so and rather ignores the fact that Oracle will return an error in this case. I cannot for the life of me understand what relationship you think job_queue_processes has to a sqlplus connection.
    Nikhil,
    as Eduardo suggested, typically you wouldn't bother to connect through a sqlnet connection from the database server itself. Setting the appropriate oracle environment variables (there's a provided script called oraenv that will do this for you prompting you for the necessary details) ought to be sufficient. That said you should also be able to connect over sqlnet if it is correctly configured.
    To troubleshoot that you could try
    1. using the tnsping utility supplied with Oracle.
    2. issuing the command lsnrctl services
    As others have suggested posting the sqlnet.ora file would be a reasonable step (and I'd also check the tnsnames.ora file on the server as well) as would posting the output from the above steps.
    Finally since guessing seems to be in vogue it may be that you have the line
    sqlnet.authentication_services=(NTS) in your sqlnet.ora which would mean that sqlnet connections try to use windows authentication (and fail badly on the linux machine)
    Hope all that helps a bit and look forward to seeing the detail we requested.
    Niall Litchfield
    http://www.orawin.info/

  • Problem with Roles and Triggers

    I'm having a strange problem with Roles and Triggers in Oracle. It's a little difficult to describe, so bear with me...
    I'm trying to create a trigger that inserts records into a table belonging to a different user/owner. Of course, the owner of this trigger needs rights to insert records into this other table. I find that if I add these rights directly to the owner of the trigger, everything works okay and the trigger compiles successfully.
    However, if I first create a Role and grant the "insert" rights to it, and then assign this role to the owner of the trigger, the trigger does not compile successfully.
    To illustrate this, here's an example script. I'm using Oracle 10g Release 2...
    -- Clean up...
    DROP TABLE TestUser.TrigTable;
    DROP TABLE TestUser2.TestTable;
    DROP ROLE TestRole;
    DROP TRIGGER TestUser.TestTrigger;
    DROP USER TestUser CASCADE;
    DROP USER TestUser2 CASCADE;
    -- Create Users...
    CREATE USER TestUser IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE USER TestUser2 IDENTIFIED BY password DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" QUOTA UNLIMITED ON "USERS";
    CREATE TABLE TestUser.TrigTable (TestColumn VARCHAR2(40));
    CREATE TABLE TestUser2.TestTable (TestColumn VARCHAR2(40));
    -- Grant Insert rights on TestTable to TestRole...
    CREATE ROLE TestRole NOT IDENTIFIED;
    GRANT INSERT ON TestUser2.TestTable TO TestRole;
    -- Add TestRole to TestUser. TestUser should now have rights to INSERT on TestTable
    GRANT TestRole TO TestUser;
    ALTER USER TestUser DEFAULT ROLE ALL;
    -- Now, create the trigger. This compiles unsuccessfully...
    CREATE TRIGGER TestUser.TestTrigger AFTER INSERT ON TestUser.TrigTable
    BEGIN
    INSERT INTO TestUser2.TestTable (TestColumn) VALUES ('Test');
    END;
    When I do a "SHOW ERRORS;" after this, I get:
    SQL> show errors;
    Errors for TRIGGER TESTUSER.TESTTRIGGER:
    LINE/COL ERROR
    2/3 PL/SQL: SQL Statement ignored
    2/25 PL/SQL: ORA-00942: table or view does not exist
    SQL>
    As I said above, if I just add the Insert rights directly to TestUser, the trigger compiles perfectly. Does anyone know why this is happening?
    Thanks!
    Adrian

    Hi Raghu,
    If the insert rights exist only on TestRole, and TestRole is assigned to TestUser, I can do the INSERT statement you suggest with no problems if I just execute it from SQLPlus (logged in as TestUser).
    The question is, why does the same INSERT fail when it's inside the trigger?

  • Problem with Application Login after upgrading to Oracle 11g

    I have a home-grown application with Oracle 10g database running under Windows XP Pro. Recently, I installed Oracle 11g and imported the application database from 10g to 11g (still want to keep the 10g running for a while). However, I now having problem with the application logging into the new 11g database. (Keep getting invalid user/name message).
    BTW, I have no problem accessing the 11g database through SQLPlus (logging in with the same name and password that I use for the application), and the connection test of NetManager (again using the same name and password that I use for the application) was successful.
    The application itself uses the old Borland BDE (Borland Database Engine) to access the 10g and 11g database. Testing confirms that BDE can access Oracle 11g with no problems.
    Any idea about the probable cause(s) of the problem?
    Thanks in advance,
    sg2000

    11g by default is case sensitive username/password.
    You can disable that with setting parameter SEC_CASE_SENSITIVE_LOGON to false.
    SQL> SHOW PARAMETER SEC_CASE_SENSITIVE_LOGON
    SQL> ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;

  • SQL report performance problem

    I have a SQL classic report in Apex 4.0.2 and database 11.2.0.2.0 with a performance problem.
    The report is based on a PL/SQL function returning a query. The query is based on a view and pl/sql functions. The Apex parsing schema has select grant on the view only, not the underlying objects.
    The generated query runs in 1-2 sec in sqlplus (logged in as the Apex parsing schema user), but takes many minutes in Apex. I have found, by monitoring the database sessions via TOAD, that the explain plan in the Apex and sqlplus sessions are very different.
    The summary:
    In sqlplus SELECT STATEMENT ALL_ROWS Cost: 3,695                                                                            
    In Apex SELECT STATEMENT ALL_ROWS Cost: 3,108,551                                                        
    What could be the cause of this?
    I found a blog and Metalink note about different explain plans for different users. They suggested to set optimizer_secure_view_merging='FALSE', but that didn't help.

    Hmmm, it runs fast again in SQL Workshop. I didn't expect that, because both the application and SQL Workshop use SYS.DBMS_SYS_SQL to parse the query.
    Only the explain plan doesn't show anything.
    To add: I changed the report source to the query the pl/sql function would generate, so the selects are the same in SQL Workshop and in the application. Still in the application it's horribly slow.
    So, Apex does do something different in the application compared to SQL Workshop.
    Edited by: InoL on Aug 5, 2011 4:50 PM

  • How can I redirect APEX(EPG) URL with afrindly one

    Hi All,
    I am using APEX with EPG on oracle 11g, and I would to redirect the URL http://localhost:8080/apex/f?p=122:1:43920293912715::NO with a friendly one like this
    http://project_name.mydomain.com
    Is there any one can help me know; how to do this redirection where I would to hide the port no 8080 within the URL
    Thank you in advance
    Yassin

    Yasen® wrote:
    hi is this solution working for Apex on 11g with EPG? whrere to run this code?Yes, it should work on 11g with EPG.
    Using SqlPlus, log in as SYS and run the code posted by "user7449726" to change the path name and default home page of the DAD.
    To change the port from 8080 (the default) to 80, run the following as SYS using SqlPlus:
    CALL DBMS_XDB.SETHTTPPORT(80);
    ALTER SYSTEM REGISTER;
    Make sure you don't have anything else running on port 80 (such as Microsoft's Internet Information Server) or you will obviously get a conflict.
    - Morten

  • System and Object privileges question

    hello everyone.
    I was really making it a priority to really understand both system and object privileges for users. I have setup a couple of 'sandboxes' at home and have done lots of testing. So far, it has gone very well in helping me understand all the security involved with Oralce (which, IMHO, is flat out awesome!).
    Anyway, a couple of quick questions.
    As a normal user, what view can I use to see what permissions I have in general? what about permissions on other schemas?
    I know I can do a:
    select * from session_privs
    which lists my session privileges.
    What other views (are they views/data dictionary?) that I can use to see what I have? Since this is a normal user, they don't have access to any of the DBA_ views.
    I'll start here for now, but being able to see everything this user has, would be fantastic.
    Cheers,
    TCG

    Sorry. should have elaborated more.
    In SQLPLUS, (logged in while logged into my Linux OS), I am working to try and get sqlplus to display the results of my query so it is easy to read. Right now, it just displays using the first 1/4 or 1/3 of the monitor screen to the left. Make sense? So it does not stretch the results out to utilize the full screen. it is hard to break down and read the results because they are "stacked" on top of each other.
    Would be nice if I could adjust sqlplus so the results are easier to read.
    HTH.
    Jason

  • Please Help:  A Problem With Oracle-Provided 'Working' Example

    A Problem With Oracle-Provided 'Working' Example Using htp.formcheckbox
    I followed the simple steps in the Oracle-provided example:
    Doc ID: Note:116534.1
    Subject: How to use checkbox in webdb for bulk update using webdb report
    However, when I select a checkbox and click on the Update button, I get a "ORA-01036: illegal variable name/number" error. Please advise. This was a very promising feature.
    Fred
    Below are step-by-step instructions provided by Oracle to create this "working" example:
    How to use a checkbox in WEBDB 2.2 report for bulk update.
    PURPOSE
    This article shows how checkbox can used placed on WEBDB report
    and how to use it.
    SCOPE & APPLICATION
    The following example to guide through the steps to create a working
    example of this.
    In this example, the checkbox is used to select the records. On clicking
    the update button, the pl/sql procedure is called which will update col1 to
    the string 'OK'.
    After the update is done, the PL/SQL procedure calls the report again.
    Since the report only select records where col1 is null, the updated
    records will not be displayed when the report is called again.
    Step 1 - Create Table
    From Sqlplus, log in as scott/tiger and execute the following:
    drop table chkbox_example;
    create table chkbox_example
    (id varchar2(10) not null,
    comments varchar2(20),
    col1 varchar2(10));
    Step 2 - Insert Test Data
    From Sqlplus, still logged in as scott/tiger , execute the following:
    declare
    l_i number;
    begin
    for l_i in 1..50 loop
    insert into chkbox_example values (l_i, 'Comments ' || l_i , NULL);
    end loop;
    commit;
    end;
    Step 3 -Create SQL Query based WEBDB report
    Logon to a WEBDB site which has access to the database the above tables are created.
    Create a SQL based Report.
    Name the report :RPT_CHKBOX
    The select statement for the report is :
    select c.id, c.comments, c.col1,
    htf.formcheckbox('p_qty',c.id) Tick
    from SCOTT.chkbox_example c
    where c.col1 is null
    In Advanced PL/SQL, (REPORT, Before displaying the form), put the following code
    htp.formOpen('scott.chkbox_process');
    htp.formsubmit('p_request','Update');
    htp.br;
    htp.br;
    Step 4 - Create a stored procedure in the database
    Log on to the database as scott/tiger and execute the following to create the
    procedure.
    Note: Replace WEBDB to the appropriate webdb user for your installation.
    In my database, I had installed webdb using WEBDB username, hence user webdb owns
    the packages.
    create or replace procedure chkbox_process
    ( p_request in varchar2 default null,
    p_qty in wwv_utl_api_types.vc_arr ,
    p_arg_names in wwv_utl_api_types.vc_arr ,
    p_arg_values in wwv_utl_api_types.vc_arr
    is
    i number;
    begin
    for i in 1..p_qty.count loop
    if p_qty(i) is not null then
    begin
    update chkbox_example
    set col1 = 'OK'
    where chkbox_example.id = p_qty(i);
    end;
    end if;
    end loop;
    commit;
    /* To Call Report again after updating */
    SCOTT.RPT_CHKBOX.show
    (p_request=>'Run Report',
    p_arg_names=>webdb.wwv_standard_util.string_to_table2(' '),
    p_arg_values=>webdb.wwv_standard_util.string_to_table2(' '));
    end;
    Summary
    There are essentially 2 main modules, The WEBDB report and the pl/sql procedure (chkbox_process)
    A button is created via the advanced pl/sql coding which shows on top of the report. (The
    button cannot be placed at the bottom of the report due to the way WEBDB creates the procedure
    internally)
    When any button is clicked on the report, it calls the pl/sql procedure chkbox_process.
    The procedure is called , WEBDB always passes the parameters p_request,p_arg_names and o_arg_values.
    p_qty is another parameter that we are passing additionally, This comes from the checkbox created
    using the htf.formcheckbox in the report select statement.
    The pl/sql procedure calls the report again after processing. This is done to
    show how to call the report.
    Restrictions:
    -The Next and Prev buttons on the report will not work.
    So it is important that the report can fit in 1 page only.
    (This may mean that you will not select(not ticked) 'Paginate' under
    'Display Option' in the WEBDB report. If you do this,
    then in Step 4, remove p_arg_names and p_arg_values as input parameters
    to the chkbox_process)

    If your not so sure you can use the instanceof
    insurance,
    Object o = evt.getSource();
    if (o instanceof Button) {
    Button source = (Button) o;
    I haven't thoroughly read the thread, but I use something like this:if (evt.getSource() == someObjRef) {
        // do that voodoo
    ]I haven't looked into why you'd be creating a new reference...

  • How to schedle the mapping in OWB?

    Can any please provide me link to see the steps to schedule the OWB mapping. My version is 11.1.0.7.0. The mapping is developed
    by some one. Now i need to take responsibility on this. I need to know how to schedule the mapping.I want to run this every day mighnight.
    In project explorer, I went into schedules. Then i created the schedule. After that, i am not sure, how to link the mapping on this scheduler.
    any help is highly appreciated.
    thanks.

    Hi ,
    Do you have metalink or my oracle support access ?
    If yes then check Note 444877.1 for OWB mapping or process flow scheduling .
    1. Verify the mapping or process flow completes successfully.
    2. Navigate to the Schedules node in the Design Center Console and create a new Schedules module
    called MY_SCHEDULES. For the location, select your TARGET_LOCATION, as the schedule will be deployed to the database.
    3. Create a new schedule, TEST_SCH, with time greater than current database machine time (server where the job executes).
    4. Associate your schedule with the mapping or process flow. Right click the mapping or process flow and select the option "Configure" and "set Referred Calendar" to TEST_SCH.
    5. In the Control Center Manager, navigate to your TARGET_LOCATION and note the Scheduled Job TEST_SCH_JOB under the Scheduled Jobs node. Deploy the job with action "Create".
    Using SQLPlus logged into the database as the TARGET user, verify the user has a job TEST_SCH_JOB, in state DISABLED:
    select job_name, state from user_scheduler_jobs;
    6. Use the Schedule tab on the Control Center Jobs panel in the Control Center Manager to schedule
    the job. Highlight, right click the job and from the pop-up menu select "start". Use the same query to check the current status:
    select job_name, state from user_scheduler_jobs;
    The above query will show whether the scheduled job is SCHEDULED, RUNNING or SUCCEEDED.
    http://download.oracle.com/docs/cd/E11882_01/owb.112/e10935/scheduling_etl.htm#CHDGEGJF
    Thanks,
    Sutirtha

  • Regarding oracle 10g express edition login problem

    Hi all,
    This morning, i downloaded 10g oracle express editon from oracle.com.. I installed sucessfully. i am able to login from the command line sucessfully..
    But when i am clicking on Goto database home page it is connecting http://127.0.0.1:8080/apex and it says page can not be displayed .. can anyone help me please its urgent
    Ganesh

    Hi Ganesh
    Try to chang your port - it worked on my installation see the following link:
    http://www.oracle.com/technology/tech/linux/install/files/el5_11g_sqldev_apex.txt
    Additionnally do Perform the following in sqlplus logged on as sys:
    show parameter dispatchers
    This should return something like:
    NAME TYPE VALUE
    dispatchers string (PROTOCOL=TCP) (SERVICE=<sid>XDB)
    max_dispatchers integer
    When in your case the value of dispatchers is empty, you have to do the
    following:
    Define an entry in the init.ora (<sid> must be replaced by the sid of your 11.1.0.6db):
    dispatchers="(PROTOCOL=TCP)(SERVICE=<sid>XDB)"
    for example:
    dispatchers="(PROTOCOL=TCP)(SERVICE=v111XDB)"
    After the change you have to restart the database.

  • Direct Path Insert into temporary table

    Hi,
    I made the following experiment (temp_idtable is a temp table with a single column id, V_PstSigLink is a complex View):
    14:24:28 SQL> insert into temp_idtable select id from V_PstSigLink;
    17084 Zeilen wurden erstellt. (in english: rows inswerted)
    Statistiken
    24 recursive calls
    52718 db block gets
    38305 consistent gets
    16 physical reads
    4860544 redo size
    629 bytes sent via SQL*Net to client
    553 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    4 sorts (memory)
    0 sorts (disk)
    17084 rows processed
    14:24:41 SQL> commit;
    Transaktion mit COMMIT abgeschlossen.
    14:25:29 SQL> insert /*+ APPEND*/into temp_idtable select id from V_PstSigLink;
    17084 Zeilen wurden erstellt. (in english: rows inswerted)
    Statistiken
    1778 recursive calls
    775 db block gets
    38847 consistent gets
    40 physical reads
    427408 redo size
    613 bytes sent via SQL*Net to client
    565 bytes received via SQL*Net from client
    3 SQL*Net roundtrips to/from client
    27 sorts (memory)
    0 sorts (disk)
    17084 rows processed
    As you can see, with /*+ APPEND*/ there will be much less REDO generated.
    How can it be?
    1. /*+ APPEND*/ only doesn't mean that there shouldn't be REDO generated, does it? For that one has to declare the table with NOLOGGING.
    2. In the doc there is a statement that for temp. tables there is no REDO log generated, just UNDO (and REDO only for UNDO).
    Where is the difference coming from?
    If I use Direct Path (APPEND) for a temp table, where will be the table populated - in the Buufer Cache or directly in a temporary segment on the disk?
    Balazs

    Hi John,
    I'm a little confused about your statement " Oracle does not cache data blocks until they are read from a table.". I wanted to make a little experiment with KEEP Buffer Cache to see weather I can 'pin' the content of a temp table. But before getting to pin I realized an interesting behavior. Please see this sqlplus log:
    SQL> create global temporary table temp_ins(id NUMBER);
    Table created.
    SQL> insert into temp_ins values (1);
    1 row created.
    SQL> insert into temp_ins values (2);
    1 row created.
    SQL> insert into temp_ins values (3);
    1 row created.
    SQL> set autotrace on explain statistics;
    SQL> select * from temp_ins;
    ID
    1
    2
    3
    Execution Plan
    0 SELECT STATEMENT Optimizer=CHOOSE
    1 0 TABLE ACCESS (FULL) OF 'TEMP_INS'
    Statistics
    0 recursive calls
    0 db block gets
    4 consistent gets
    0 physical reads
    0 redo size
    416 bytes sent via SQL*Net to client
    503 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    3 rows processed
    SQL>
    I realized exectly the opposit of your statement! Oracle apparently cached the content of the temp table before it read from it!! Could you please explain why? Now I'm going to try it with a normal table...
    Balazs

  • Select  doesnt work

    I have created tables by logging as a user 'dcl' when i go to sqlplus(logged as dcl)and query any table under the ownership of 'dcl' i get the error 'table or view not found'.if i query the same table through ENTERPRISE MANAGER logged as dcl
    it shows me the contents of all the table.The above problem also occurs while accessing through powerbuilder and any other application.I do not think select permissions must be given to dcl to run select query on tables created by him.

    When you say "does not work" what error message are you getting? It's virtually impossible to diagnose these problems without some specific information.
    cheers, APC

  • Create Multiple Developer logins with htmldb_util.create_user

    Need some help in creating about 100 user ID's..
    Using the htmldb_util.create_user process to do it and I keep getting an error about requiring ADMIN privs..
    Code looks like -
    DECLARE
    V_USER_ID varchar2(30);
    CURSOR names IS
    select upper(contact_last_name) || upper(substr(contact_first_name, 1, 1)) as USER_ID
    from contact
    where contact_first_name is not null;
    BEGIN
    OPEN names;
    LOOP
    wwv_flow_api.set_credentials(p_company => 'default',
    p_username => 'RNASSER',
    p_password => 'XXX');
    FETCH names into V_USER_ID;
    htmldb_util.create_user(p_user_name => V_USER_ID,
    p_web_password => 'XXX',
    p_web_password_format => 'HEX_ENCODED_DIGEST');
    EXIT WHEN names%NOTFOUND;
    END LOOP;
    CLOSE names;
    END;
    Can anyone fill me in on what I am missing here? The admin error happens at the call to the create_user, and I am an ADMIN for the application.
    Thanks
    Rob

    Sorry, in addition to my above statement:
    Here's my main conflict. From the HTMLDB_UTIL package, it says this:
    PROCEDURE create_user (
    -- Description:
    -- This procedure allows for programatic and bulk creation of users.
    -- Example:
    -- From sqlplus logged in as a schema assigned to the target workspace
    -- begin
    -- for i in 1..10 loop
    -- htmldb_util.create_user(
    -- p_user_name => 'USER_'||i,
    -- p_email_address => 'user_'||i||'@myworkspace.com',
    -- p_web_password => 'user_'||i) ;
    -- end loop;
    -- commit;
    -- end;
    -- /So it appears this can be called outside the APEX environment. But you cannot simply call this statement outside of APEX, or you'll first get an Unauthorized Access Error. Calling wwv_flow_api.set_credentials() before the loop above will get you past the Unauthorized Access exception, but you will hit User requires Admin privs. (Even if you use the credentials of a workspace administrator).
    Hope that helps in explaining how I've arrived at this point.
    (APEX 2.0, Oracle 10g)
    Chris

Maybe you are looking for

  • Hiding grand total value in pivot table view

    Hi, I have a pivot table in which i have 5 measures, out of these 5 measures i want to show the grand total for only the first one. How can this be done? Thx

  • Can't sync more than once - iTunes locks up

    For 3 days now I have been having problems with iTunes. In each case, I have been able to sync once and then iTunes locks up and becoames completely unresponsive. The only error message I get is not from iTunes, but from Windows XP OS saying somethin

  • Exception - when create a new factory by Persistence class

    Hey, I need to create factory in run time because i dont know the shema names. A new schema is allocated to the user after he register to the system. I am working in Jboss 4.2. I have a stateless session bean with the following method: public void cr

  • HT3748 mail requires force quit daily - advice

    I use the latest macbook air all uptodate. I use mail with my gmail account as well as three work related exchange addresses. After any period of time resting, it hangs and I have to force quit and re-start? Common problem?

  • Calling a DLL from XI

    Hi, We have an external system which is used to validate bank account numbers. To be able to use this functionality via XI a DLL needs to be called. Is this possible via XI using Java perhaps. Thanks Martin