Newbie question: sql runs on sqlplus but not compile in pl/sql?

I have the following two tables I would like to put a sql statement into pl/sql packages so I can use dbms_jobs automate it however, I keep getting compile time error. It seems to me that pl/sql does not like my sql that runs fine in sqlplus. Below is the error message and my test case?
mdb_user@CMD> show error
Errors for PACKAGE BODY DATA_QUALITY_REPORT_P:
LINE/COL ERROR
10/1 PL/SQL: SQL Statement ignored
13/42 PL/SQL: ORA-00942: table or view does not exist
create table S_ORG_EXT
accnt_type_cd varchar2(100),
cust_stat_cd varchar2(100)
insert into s_org_ext
select column_name,data_type from user_tab_columns where rownum <= 100
select * from s_org_ext
create table data_quality_report
runid number not null,
report_type number not null, --report type such as dup or not dup or other metrics
org_level number not null, --organization level nsgn, sgn, shipto
loc_level number not null,--locale level by city, by country, by region, grand_total
name varchar2(100) not null,--the row output name of the agg
value number not null,-- the row output value of the agg
rundate date default sysdate
create sequence data_quality_report_seq start with 1000
INCREMENT BY 1
NOCACHE
NOCYCLE
insert into data_quality_report
select data_quality_report_seq.nextval,3,99,99,accnt_type_cd,cnt,sysdate from
select accnt_type_cd, count (*) cnt from S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd order by 2 desc
select * from data_quality_report
truncate table data_quality_report
CREATE or replace PACKAGE data_quality_report_p AS
function pull_data return data_quality_report.runid%type;
END data_quality_report_p ;
create or replace package body data_quality_report_p as
function pull_data return data_quality_report.runid%type is
new_rid data_quality_report.runid%type;
begin
select data_quality_report_seq.nextval into new_rid from dual;
insert into data_quality_report
select new_rid,3,999999,999999,accnt_type_cd,cnt,sysdate from
select accnt_type_cd, count (*) cnt from S_ORG_EXT where cust_stat_cd = 'VARCHAR2' group by accnt_type_cd order by 2 desc
return new_rid;
exception
when no_data_found then
DBMS_OUTPUT.PUT_LINE('Handling NO_DATA_FOUND exception.');
when others then
DBMS_OUTPUT.PUT_LINE('Handling OTHER exception.');
end; --end pull_data
end data_quality_report_p;
/

Hi,
A very common cause for ORA-00942 in a stored procedure (here I'm including packages and functions) is that you have privileges only through a role. Roles don't count in stored procedures if they are compiled with the default "AUTHID DEFINER". Either
(1) have whatever privileges you need (e.g. "INSERT ON data_quality_report" or "SELECT ON s_org_ext") granted directly to you (the package owner), or to the pseudo-user PUBLIC, and not merely to some role that you have, or
(2) create the package in the same schema as the tables, or
(3) create the package with "invoker's rights", like this
CREATE OR REPLACE PACKAGE data_quality_report_p
AUTHID CURRENT_USER       -- Added
AS
    FUNCTION pull_data ...'AUTHID CURRENT_USER" goes right before the keyword "IS" (or "AS") in the package spec; you don't have to do anything to the package body.
However, if you do this, then whoever runs the package will need to have those privileges, in addition to EXECUTE privileges on the package. Privileges granted through a role will be okay.
Usually, (1) is the best solution. Have the table owner(s), or someone with the proper authority, grant privileges directly to you.
By the way, there's no point in having an ORDER BY clause in a sub-query like you're doing, and there's no point in having ORDER BY in an INSERT statement. It's not causing the ORA_00932 error (or any other error), it's just wasting resources.
Edited by: Frank Kulash on Mar 23, 2011 4:02 PM
Change DEFINER to CURRENT_USER in a couple of places. (Bad mistake!)

Similar Messages

  • I want a user to use only import, it run with export but not import

    Hi,
    i create a user for use only for import and for export.
    batch_export with exp_full_database role <- It run
    batch_import with imp_full_database role <- don't run
    P:\>sqlplus batch_export/batch
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:21:58 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ERROR:
    ORA-00604: une erreur s'est produite au niveau SQL rÚcursif 1
    ORA-20000: Connexion refusee
    ORA-06512: Ó ligne 41
    Entrez le nom utilisateur :
    P:\>sqlplus batch_import/batch@rfsage
    SQL*Plus: Release 10.1.0.2.0 - Production on Lun. Ao¹t 21 17:03:36 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    ConnectÚ Ó :
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    the trigger as run
    create or replace trigger batch_export.check_connexion after logon on database
    declare
    V_MODULE SYS.V_$SESSION.module%TYPE;
    V_TERMINAL SYS.V_$SESSION.terminal%TYPE;
    V_SID SYS.V_$SESSION.SID%TYPE;
    V_SERIAL SYS.V_$SESSION.SERIAL#%TYPE;
    V_COMMAND varchar2(100);
    V_CURRENT_USER varchar2(20);
    V_CURRENT_SID SYS.V_$SESSION.SID%TYPE;
    cursor connexion is
    select substr(module,1,7) module, substr(terminal,1,12) terminal, sid, serial# from v$session T1 where schemaname='BATCH_EXPORT';
    cursor ID_CUR is
    select user from dual;
    cursor SID_CUR is
    select SYS_CONTEXT('USERENV','SID') sessionid from dual;
    --select SYS_CONTEXT('USERENV','CURRENT_USERID') current_userid from dual;
    Begin
    open SID_CUR;
    loop
    fetch SID_CUR into V_CURRENT_SID ;
    EXIT WHEN SID_CUR%NOTFOUND;
    dbms_output.put_line('V_CURRENT_SID:'||V_CURRENT_SID);
    end loop;
    close SID_CUR;
    open ID_CUR;
    loop
         fetch ID_CUR into V_CURRENT_USER ;
         EXIT WHEN ID_CUR%NOTFOUND;
         if V_CURRENT_USER='BATCH_EXPORT' then
         open connexion;
         loop
              fetch connexion into V_MODULE,V_TERMINAL,V_SID,V_SERIAL ;
              EXIT WHEN connexion%NOTFOUND;
              if V_MODULE<>'EXP.EXE' then
              dbms_output.put_line('V_SID:'||V_SID);
              dbms_output.put_line('V_CURRENT_USER:'||V_CURRENT_USER);
                   if V_CURRENT_SID=V_SID then
                   dbms_output.put_line('MODULE:'||V_MODULE);
                   RAISE_APPLICATION_ERROR (-20000,'Connexion refusee');
                   end if;
              end if;
         end loop;
         close connexion;
         end if;
    end loop;
    close ID_CUR;
    End;
    as the same for import user.
    I try with role in trigger but it don't, i see this in forum Oracle.
    But i think EXP_FULL_DATABASE have not DBA rule, but IMP_FULL_DATABASE have.
    How i do this ?
    I want just to use a user to imp utilities, but not connexion in sqlplus.
    Thanks for your help
    Christophe

    thanks for your help.
    it run !
    for example :
    as the system user
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'CONNECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    SQL> grant create session to batch;
    Autorisation de privilèges (GRANT) acceptée.
    SQL> INSERT INTO PRODUCT_USER_PROFILE values ('SQL*Plus', 'BATCH', 'SELECT',null,null, 'DISABLED', NULL, NULL);
    1 ligne créée.
    the result
    oracle@debian:~$ sqlplus batch/batch;
    SQL*Plus: Release 10.2.0.1.0 - Production on Mar. Août 22 06:53:00 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à :
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select user from dual;
    SP2-0544: Commande "select" désactivée dans le profil utilisateur du produit
    SQL>
    oracle@debian:~$ exp batch/batch owner=batch file=test.dump
    Export: Release 10.2.0.1.0 - Production on Mar. Août 22 06:54:32 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connecté à : Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Export fait dans le jeu de car WE8DEC et jeu de car NCHAR AL16UTF16
    le serveur utilise le jeu de caractères WE8ISO8859P1 (conversion possible)
    Prêt à exporter les utilisateurs spécifiés ...
    . export des actions et objets procéduraux de pré-schéma
    . export des noms de bibliothèque de fonctions étrangères pour l'utilisateur BATCH
    . export des synonymes de type PUBLIC
    . export des synonymes de type PRIVATE
    Thanks for all

  • Excel Import Fails in SQL Server Agent Job but not when executed in BIDS

    We have a SQL Server agent job that has ran successfully for the past 6 months.  It started failing about a week ago.  I don't believe anyone installed anything on the server.  The proxy account used to run the job is an admin on the server.   
    I've tried everything I can think of or that I found on searches.  I even changed the connection manager from an Excel source to using an Microsoft office 12.0 Access Database Engine OLEDB connection and it still runs in BIDs and not as an agent job. 
    I also setup my LANID as a proxy account to see if the job would run (checking security) -- and it fails with the same error.   I also made sure the path is
    \\server\share rather than a drive letter.   Any ideas?
    The package is executed in 32 bit mode.  The package still runs fine in BIDS (where BIDs is opened on the server) but fails in the SQL Agent job with:
    Executed as user: xxxxxx\xxxxxx. Microsoft (R) SQL Server Execute Package Utility  Version 11.0.2100.60 for 32-bit  Copyright (C) Microsoft Corporation. All rights reserved.    Started:  9:00:00 AM  Error: 2014-12-01 09:00:02.46    
    Code: 0xC0202009     Source: xxxxxx Connection manager "Excel Connection Manager"     Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE
    DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "External table is not in the expected format.".  End Error  Error: 2014-12-01 09:00:02.65    
    Code: 0xC020801C     Source: Load File to Staging Excel Source [43]     Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager
    "Excel Connection Manager" failed with error code 0xC0202009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error: 2014-12-01 09:00:02.77    
    Code: 0xC0047017     Source: Load File to Staging SSIS.Pipeline     Description: Excel Source failed validation and returned error code 0xC020801C.  End Error  Error: 2014-12-01 09:00:02.90    
    Code: 0xC004700C     Source: Load File to Staging SSIS.Pipeline     Description: One or more component failed validation.  End Error  Error: 2014-12-01 09:00:03.02     Code: 0xC0024107    
    Source: Load File to Staging      Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  9:00:00 AM  Finished: 9:00:03 AM 
    Elapsed:  2.761 seconds.  The package execution failed.  The step failed.

    I logged on to the server with the account that the SQL Agent runs under and ran the following from a command
    line to execute the package:
    "D:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTEXEC.exe" /FILE
    "\"K:\SSIS\xxxxxx\xxxxx.dtsx\"" /CHECKPOINTING OFF 
    /REPORTING EWCDI  /X86
    I wanted to see if it was a security issue with the agent account account - but
    this ran fine.
    I then updated the SQL Agent job to use an operating system command instead
    of a SSIS package on the job step.  This fails...
    The issue is definately with the SQL Server Agent

  • I can compile objects with SQL dev tool but not with a direct sql

    hi,
    This is a bit weird - I'm probably not familiar enough with Oracle's compilation process...
    I'm creating a some functions / procedures / triggers. When I run the script to create them with Oracle's SQL Developer tool, usually they become immediately valid, and if not then I can manually right click them and choose Compile, and they're compiled correctly and become valid.
    However, when running them with command line tools, they're uncompiled after created. I'm trying compile them with
    ALTER PROCEDURE / FUNCTION / TRIGGER MySchema.MyFunction COMPILE;
    and it always returns
    Error starting at line 1 in command:
    alter function MySchema.MyFunction compile
    Error report:
    SQL Command: alter function
    Failed: Warning: execution completed with warning
    alter function MySchema.MyFunction succeeded.
    and the object remains uncompiled / invalid.
    also tried with DBMS_... utils and got the same results.
    Same with adding things such as PLSQL_WARNINGS = 'ERROR:ALL' to the stmt
    But when I go in SQL Developer to the object, right click and click Compile, it compiles fine w/o warnings / errors and becomes valid.
    Is there anything else I should run other than this alter..compile? Is SQL Dev tool doing something different than "alter function ... compile" when right clicking and object and clicking "Compile"?
    thanks!

    hi,
    I'm having difficulties connecting with SQL Plus, since it seem to require at startup some admin user/password, which I don't have at the moment. Also tried to give it in command line the db name and params and it still require this pass... Will try to get it...
    But again, when I'm right clicking the object in SQL Developer and click Compile, it compiles fine and becomes valid. After doing that, running
    alter function mySchema.MyTestFunction compile;
    passes with
    "alter function mySchema.testfunction succeeded"
    If I run this sql before doing compile with SQL Developer, it fails with what I posted before.
    I wonder if SQL Developer does things other than the above compile stmt.
    If I right click on Functions in SQL Dev and click Compile All or Compile Invalid, I can see the sql it about to generate, and it's the same as I tried - and fails as well... Only when right clicking the object and Compile it works...
    A test func I tried, for example:
    create or replace
    FUNCTION testFunction(n in number)
    RETURN NUMBER
    IS
    BEGIN
    RETURN n + 1;
    END;

  • Can connect to local DB via SQLPlus but not via SQLDeveloper, all info incl

    Have a database running on a new local Windows 7 Professional Machine with data, users, etc from an db import. Able to access database via sqlplus, run queries, etc. Cannot run from Oracle SQL Developer. Trying to use Connection Type Basic, Hostname localhost, port *1521*.
    Using SID = xe I get:
    Status: Failure -Test failed: Listener refused the connection with the following error: ORA-12518, TNS:listener could not hand off client connection The Connection descriptor used by the client was localhost:1521:xe
    When I add a service in my listener.ora file for sid_name=xe and program_name=xe (which I include below), I get
    ORA-12518, TNS:listener could not hand off client connection. The connection descriptor used by the client was localhost:1521:xe
    Using Service name = xe I get:
    Status: Failure -Test failed: Io exception: the Network Adapter could not establish the connection.
    Here's every single piece of information I think you may possibly need to help me with the issue. [I've been trying to find the solution on these forums so I hope I haven't messed my settings up even more than they had been before.]
    TNSNAMES.ORA (XE is the name of my local database):
    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (service_name = XE)
    (SERVER = DEDICATED)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    LISTENER.ORA
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = extproc)
    (SID_DESC =
    (SID_NAME = XE)
    (ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
    (PROGRAM = XE)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    DEFAULT_SERVICE_LISTENER = (XE)
    C:\Windows\system32>sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 25 19:36:15 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select sysdate from dual;
    SYSDATE
    25-APR-10
    SQL> exit
    Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Produ
    ction
    C:\Windows\system32>tnsping xe
    TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-APR-2
    010 19:43:02
    Copyright (c) 1997, 2005, Oracle. All rights reserved.
    Used parameter files:
    C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos
    t)(PORT = 1521)) (CONNECT_DATA = (service_name = XE) (SERVER = DEDICATED)))
    OK (20 msec)
    C:\Windows\system32>lsnrctl services
    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-APR-2010 19:46
    :20
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    Services Summary...
    Service "CLRExtProc" has 1 instance(s).
    Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:0
    LOCAL SERVER
    Service "XE" has 1 instance(s).
    Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
    Handler(s):
    "DEDICATED" established:0 refused:10
    LOCAL SERVER
    The command completed successfully
    Edited by: user1966631 on Apr 25, 2010 4:59 PM

    Got it. No, no virtualization. Just Win7 64-bit computer running XE.
    C:\Users\Gil>sqlplus ccxreg/ccxreg@XE
    SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 25 21:23:20 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    listener.log
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-APR-2010 19:54:10
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=760
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    25-APR-2010 19:55:46 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=null))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51031)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 19:56:11 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51040)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 19:56:18 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51043)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 19:56:31 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51048)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 19:56:34 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))(SERVICE_NAME=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51050)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 19:56:37 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=51052)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 20:42:45 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=null))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=52547)) * establish * xe * 12518
    TNS-12518: TNS:listener could not hand off client connection
    TNS-12560: TNS:protocol adapter error
    TNS-00530: Protocol adapter error
    32-bit Windows Error: 2: No such file or directory
    25-APR-2010 20:43:08 * (CONNECT_DATA=(SID=@xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=52558)) * establish * @xe * 12505
    TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
    25-APR-2010 20:43:13 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))(SERVICE_NAME=@xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=52562)) * establish * @xe * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    25-APR-2010 21:03:00 * ping * 0
    25-APR-2010 21:03:17 * ping * 0
    TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production on 25-APR-2010 21:06:07
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    System parameter file is C:\oraclexe\app\oracle\product\10.2.0\server\network\admin\listener.ora
    Log messages written to C:\oraclexe\app\oracle\product\10.2.0\server\network\log\listener.log
    Trace information written to C:\oraclexe\app\oracle\product\10.2.0\server\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=6836
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC_FOR_XEipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    25-APR-2010 21:06:11 * service_register * CLRExtProc * 0
    25-APR-2010 21:06:11 * service_register * CLRExtProc * 0
    25-APR-2010 21:06:11 * service_update * CLRExtProc * 0
    25-APR-2010 21:07:04 * (CONNECT_DATA=(SID=xe)(CID=(PROGRAM=)(HOST=__jdbc__)(USER=null))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=53945)) * establish * xe * 12505
    TNS-12505: TNS:listener does not currently know of SID given in connect descriptor
    25-APR-2010 21:07:55 * service_update * CLRExtProc * 0
    25-APR-2010 21:09:35 * service_update * CLRExtProc * 0
    25-APR-2010 21:11:15 * service_update * CLRExtProc * 0
    25-APR-2010 21:12:55 * service_update * CLRExtProc * 0
    25-APR-2010 21:14:35 * service_update * CLRExtProc * 0
    25-APR-2010 21:16:16 * service_update * CLRExtProc * 0
    25-APR-2010 21:17:56 * service_update * CLRExtProc * 0
    25-APR-2010 21:19:38 * service_update * CLRExtProc * 0
    25-APR-2010 21:21:21 * service_update * CLRExtProc * 0
    25-APR-2010 21:23:02 * service_update * CLRExtProc * 0
    25-APR-2010 21:23:20 * (CONNECT_DATA=(service_name=XE)(SID=XE)(SERVER=DEDICATED)(CID=(PROGRAM=C:\oraclexe\app\oracle\product\10.2.0\server\bin\sqlplus.exe)(HOST=WIN7X64)(USER=Gil))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=54388)) * establish * XE * 12514
    TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
    25-APR-2010 21:24:43 * service_update * CLRExtProc * 0

  • IMAP Mail question (d/l to MacPro but not MBP)?

    i have a ton of email accounts and have a really dumb question.
    i am accessing all of these accounts via IMAP on my Mac Pro my MacBook Pro and my iPhone. this is great since i can delete emails from my Mac Pro where i work a lot of the time and they will no longer clutter up my mail on my other devices. it obviously has other benefits in that i can see it all the same on all devices.
    i am wondering if there is a setting in Mail that downloads the email to my LOCAL HARD DRIVE and if so if i can check this for the Mac Pro but not for the MacBook Pro. i have 2 TB HD's on the Mac Pro but the laptop is running out of space with just 250 GB.
    i know this database is a big honking spacehog so i just got to thinking and wanted to ask.
    also, does anyone know if having Thunderbird email client and/or Sparrow email client on both of these computers causes large databases for each of these software programs as well? if so i should probably also delete all of this off the laptop.
    TIA

    Yes.
    In Mail->Preferences->Accounts, select the IMAP account you're concerned with.  In the advanced tab, there is a "keep copies of messages for online viewing" setting.  Choose "All messages and their attachments" on your Mac Pro, and choose something else that's a better fit in the list on your MacBook Pro.
    Also, yes, every IMAP client has its own local database.

  • Query running in Quality but not in Production

    Hi Folks,
    we are running a query AQICSDUSERS=====MOVEMENTLIST4= which used to get executed previously,but all of a sudden now after running for an hour or so it is coming back to  sap easy access screen without displaying the report.It is running and giving the report in Quality but not in Production.
    What could be the reason?
    K.Kiran.

    Hi Folks,
    From DUMP I got this:-
    <b>You should usually execute long-running programs as batch jobs.
    If this is not possible, increase the system profile parameter
    "rdisp/max_wprun_time".</b>
    I want to know how to increase the system profile parameter
    "rdisp/max_wprun_time".
    Thanks,
    K.Kiran.

  • SQL Devloper working fine but not SQL Plus

    Hi,
    I am facing a problem that I can connect to oracle server via SQL Developer but cannot connect to the same using SQL*Plus.
    ORA-12154: TNS:could not resolve service name
    I checked many forums and followed each advices but in vein. To make sure that I have got only one instance of tnsnames.ora file, I removed oracle completely from my system and did the fresh installation of the same.Again, SQL Developer worked but not SQL*Plus.
    Also, I updated dummy value in the tnsnames.ora file to check if SQLDeveloper is pointing to correct ora file, it failed means that its pointing to correct one only.
    Also, this is not the problem with single machine rather my colleague is also facing the same problem while connecting to the same oracle. It suggest me that its rather problem with server side then client one but what do you people think the actual problem can be.
    Kindly advice
    I am using oracle 10.2 and OS window server 2003 standard edition.
    Cheers,
    D
    Edited by: user9022426 on 20-Jan-2010 14:25

    The problem is client side.
    The error message means that you're not getting
    Are you using a TNS connection for SQL Developer?
    If so, this error suggests that SQL Developer and SQL*Plus are not going through the same ORACLE_HOME and/or TNSNAMES.ORA.
    For example, do you have the environment variable TNS_ADMIN set?
    If you have metalink access, then there is a troubleshooting guide for ORA-12154 in Metalink note 114085.1

  • Non-UB runs on Intel but not as plugin?

    I was under the impression that AU was the requisite format to run a plugin within Logic and universal binary was additionally required for anything to run on Intel macs. Zero-G Vocal Forge is stated as being AU but not necessarily UB. The stand alone version works fine on my Intel iMac however, the plugin does not show up in my Logic 8 or Ableton Live 6 plugin menus. I tried the AU scanner in Logic to no avail. The component does show up in the correct folder. I thought that if something wasn't UB, it just wouldn't run at all on an intel Mac but it runs fine, just not as a plugin. I wouldn't even bother asking, except that the stand alone is operational. Will I have to wait for UB, or am I doing something wrong? Thanks. - Emile

    Hi,
    The reason the Stand=Alone version of your plugin works, is that under an Intel mac, there is a shell, called "Rosetta". What this does, is that when you open a non-Intel, or non-Universal Binary version of a software, the computer tries to open it, and runs it inside the Rosetta shell. This is not a very efficient way of running software, but it allows you to open things that are not yet Universal Binaries.
    The Audio Unit portion of your plugin, is NOT Universal binary, and because it is not, it does not show up when you open Logic, which IS Universal binary. Logic is not being run under the Rosetta shell, because it does not need to.
    If you want to use it as a Plugin-In inside of Logic, you will have to wait until the company releases a UB version.
    Cheers

  • Semantics of running with DB_INIT_TXN but not DB_INIT_LOCK

    What are the semantics of enabling the logging and transactional subsystems, but not the locking subsystem? Ideally this would give the write ahead logging properties of running with transactions, but no isolation or atomicity guarantees. Is this, in fact, what will happen, or will this configuration lead to something else?
    Thanks!

    I'm not totally clear here though, does BDB provide isolation and atomicity guarantees even if I don't enable the locking subsystem? No exaclty. BDB provides those guarantees to ensure that every single method in the API works well. But it doesn't take care of concurrency control for your own application. I guess it might help you understand better if you refer to http://www.oracle.com/technology/documentation/berkeley-db/db/ref/lock/intro.html.
    That seems odd as it would have to be using some internal locking system for that. What I'd like is for BDB to provide me write ahead logging but no concurrency control and I'll provide my own concurrency control above BDB so I can ensure that only one thread will be reading/writing a key at the same time. Does DB_INIT_TXN, DB_INIT_LOG give me that?Yes, you could use DB_INIT_TXN, DB_INIT_LOG and write your own concurrency control.
    Regards,
    Emily Fu, Oracle Berkeley DB

  • App is running on simulator but not in Playbook device

    Hi,
    I have developped an app that has been approved and it's present on app world.
    The app is running perfectly on the simulator but customers write reviews saying that they can't save data on the device and no error message is displayed.
    I have used AIR SDK and a SQLIte database.
    As I'm in Europe and Playbook is not available, I can't debug the app on a real device.
    Has anybody an idea about why the app work on the simulator but not on the real device.
    Thanks.

    Scocam - that's not a particularly helpful comment. A great deal of the apps in AppWorld have not been tested on the PlayBook yet as there ard a number of developers still waiting to receive their PlayBooks.
    If they live outside of North America then they have no other way of getting one except for waiting for RIM to ship them out. In the meantime, we use the simulators that RIM provide us and hope the apps behave the same on the real devices. This isn't always the case.
    But a great way to demonstrate your ignorance with an unhelpful pithy comment. Well done.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!

  • Newbie question - how to format timeline to not show hours?

    Hello - trying out Premiere after giving up on (gasp) iMovie
    I make very short videos - from 30+sec to 5 minutes.  I don't need the timeline to show so much detail.  The hours are meaningless. I also am not yet trying to sync audio with precision I don't need the fractions of seconds.
    Can I control that in the display is Premier 2014?
    Thanks!!
    Katie

    Yes you can controle the timeline but not the way you want.
    Its either timecode (more options rightclick on playhead position) or audiounits (1/48000 per second).
    Its default set to hours-minutes-seconds-frames.
    The more you zoom in on the timeline the more specific it gets.

  • Getting an error when running my program but it compiles.

    Hey guys, I'm having a problem running the program. Everything compiles correctly, but then I get the error code linked below. Everything I think is correct here. Any ideas? I posted CinReader as well in case you wanted to try compiling and running it yourself.
    Thanks
    public class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    public class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    import java.io.*;
    import java.util.*;
    public class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i<errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;

    Ok, here's what I did using the JSE 8.1 IDE.
    1) I copied your code into a .java file named "TextShuffleGame".
    It generated about half a dozon errors.
    There are three classes in the program:
    TextShuffleLevel
    TextShuffleGame
    CinReader
    Each of these classes is declared "public" and I got the same error message on each one:
    "class ... is public, should be declared in a file name ... .java"
    so, I...
    2) tried changing them to "private".
    It then said: "modifier private not allowed here".
    so, I...
    3) deleted the modifiers for these three classes and left them as just class. No errors.
    The next two errors had to do with the two import statements:
    "import java.io.*;" and "import java.util.*;".
    It said: "'class' or 'identifier' expected" for both. So, I...
    4) moved them to the top of the source file.
    Didn't help at first. So, I...
    5) fiddle around with them a bit.
    I tried "java.io;" and "java.util;" and then "java.*;" by itself. Still got errors. So, I put them back as you had them and for some mysterious reason, my editor decided they were fine. oO
    This also corrected the last errors in the "CinReader" class. Here is the error-free code I now have in my "TextShuffleGame.java" file:
    import java.io.*;
    import java.util.*;
    class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages[i]);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i < errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;
    Hope that helps.

  • SSIS Package Runs OK Manually But Not From SQL Server Agent...Permissions?

    I have a problem where I have an SSIS package (SQL Server 2005) that won't run properly from SQL Server Agent, but it runs fine when kicked off manually from Integration Services -> Run Package or when run in debug from Visual Studio.
    The first step in the package checks for the existance of a file via a script task.  The script looks like this...
    Code Block
    Public Sub Main()
    Dim TaskResult As Integer
    Dim ImportFile As String = CStr(Dts.Variables("BaseDirectory").Value) + CStr(Dts.Variables("ImportDirectory").Value) + CStr(Dts.Variables("ImportFile").Value)
    If Dir(ImportFile) = "" Then
    Dts.TaskResult = Dts.Results.Failure
    Else
    Dts.TaskResult = Dts.Results.Success
    End If
    Return
    End Sub
    This script runs fine and the file is seen as expected when I run the package manually.  But as a step in a SQL Server Agent job, it doesn't see the file.
    The SQL Server Agent service is set to start up / log on as a Local System Account.  I've also tried setting up a credential / proxy (using an account that I know can see and even move / rename the file) to run the job as but that didn't seem to help.
    The package is being run from SQL Server (stored in MSDB) and is set to rely on SQL Server for sensitive information, so I don't think that's an issue; other packages are set up like this in terms of sensitive data and run fine.
    Any ideas why my script can't "see" the file I'm looking at when it's kicked off by SQL Server agent?  I've looked and looked...I can't seem to figure this out.  I would really appreciate any help you might be able to offer up.

    If the variables are fine, then I think it is very likely that this is security related. Since the Agent is running under the local system account, have you verified that the local account can access the file? When you tried the proxy account, are you positive that it was set up properly, and that the account had the permissions to read the file?
    Another thing to check - is this a local file or is on another computer? If it is on another computer, make sure you are using a UNC path and not a mapped drive.

  • Newbie here, i have a question, i was looking for but not sure how to ...

    hi guys, i have a question, hope i'm not doing something wrong here...
    well i was wondering if i put all my songs, on itunes, and than transfer to ipod... could i erase all the tunes i have on my computer? i mean, i would love to be able to free the space on my hard drive...
    I was wondering if i also remove the songs from my itunes, it would erase the songs on my Ipod as well?
    thanks in advance.

    You can delete songs from your iTunes/computer hard drive after transferring them to the iPod, and for this you need to set your iPod to manage the songs manually.
    However, this is an extremely risky option because when (and not if) there comes a time to restore your iPod, which is a very common fix for iPod problems, then all the music would be erased. If you no longer have the music in iTunes (or any other back up), then all that music would be lost.
    What if the iPod were lost/stolen/needed repair? Again, the music would lost. I strongly recommend a back up, and if computer hard drive space is in short supply, you should seriously consider an external hard drive. They are not expensive, and the cost is well worth it when compared to the loss of all your precious music.
    At the very least back up your music to either cd or dvd before deleting it, particularly any purchased music/videos, as this would have to be bought again if it were lost. See this.
    How to back up your media in iTunes.

Maybe you are looking for

  • Error while cancelling the material document.

    HI, while cancellation of material document thru MIGO screen getting error Deficit of PU IR quantity 20.000 EA Message no. M7021 Diagnosis Shortfall below the specified stock level or quantity amounting to 20.000 EA. Diagnosis Shortfall below the spe

  • Help with adobe shotoshop elements 10

    can I remove photo shop 3 using windows add and remove after transfering photos to elements 10. Will I lose any of these photos in elements 10?

  • IBAN number issue in IT0009

    Hi experts, im facing an issue when updating the IBAN number in infotype 0009 for an employee. That is, im using HR_INFOTYPE_OPERATION to modify the IBAN number. This FM updates the IBAN number and it gets stored in PA0009 table. But if i view the sa

  • Highlight counts as search modification?

    Hi. I use Acrobat 7. I'm an indexer, and usually I'm working from a pdf of the book. I do a lot of searching for all occurrences of a word or phrase to decide what to include. And of course, I want to highlight the words I've looked at as I go as a v

  • Attaching dtstyles.css in Dreamweaver CC

    In CS6 I could just right click properties and then attach the design-time file.  Doesn't work that way in CC. Can someone help?