crontab linux script sql together

Dear gurus

has an idea a tips to share with us, how can we achieve the task

-a test data export machine rcvd dump another machine, available from landfills (.dmp files)
-daily schedule of basic crontab define who should run a scrpt script needs to follow the task (EI jobs together and daily.sh script file created bash file crontab)
-by which it drops oracle say schema1, schema2, schema3 patterns (in the available sql script)
-then create scemas, assign roles for authorization that was (in the available sql script)
-After that, 2 diagrams need integration script (in sql available)

can someone give ideas of things, as I have experience with crontab, sql, bash script, but I have never combine. How to call and take this task. normally, I used to do this manually every week. I want to do Automation where I watch all the newspapers, once top say things made step by step

Kind regards
Shah

learn786 wrote:
Dear gurus

has an idea a tips to share with us, how can we achieve the task

-a test data export machine rcvd dump another machine, available from landfills (.dmp files)
-daily schedule of basic crontab define who should run a scrpt script needs to follow the task (EI jobs together and daily.sh script file created bash file crontab)
-by which it drops oracle say schema1, schema2, schema3 patterns (in the available sql script)
-then create scemas, assign roles for authorization that was (in the available sql script)
-After that, 2 diagrams need integration script (in sql available)

can someone give ideas of things, as I have experience with crontab, sql, bash script, but I have never combine. How to call and take this task. normally, I used to do this manually every week. I want to do Automation where I watch all the newspapers, once top say things made step by step

Kind regards
Shah

I have a blog combining crontab, shell script and sql
http://kamranagayev.WordPress.com/2009/02/23/using-Oracle-UTL_FILE-UTL_SMTP-packages-and-Linux-shell-scripting-and-cron-utility-together-2/

Tags: Database

Similar Questions

  • Linux Script - ORACLE_BASE environment variable is not shipped

    Hello

    I created a Linux script to execute a SQL statement and have several variables being passed in the script.  The script executes the SQL statement with no problems, but I see the following message in the log file:

    [/ u01/app/oracle/scripts/insert_asm_disk_usage.sh[8]:. : line 87: dbhome: not found

    ORACLE_HOME = []? ORACLE_BASE environment variable since it is not defined

    information is not available for the current user ID oracle.

    You can set ORACLE_BASE manually if necessary.

    The content of the script is:

    #!/bin/ksh
    
    
    # Declare variables
    export ORACLE_SID=$1
    export ORACLE_BASE=/u01/app/oracle
    BACKUP_MOUNT=$2
    export ORAENV_ASK=NO
    . /usr/local/bin/oraenv
    . $HOME/.env_variables
    HOST_NAME=$(hostname -s)
    LOG_DIR=/${BACKUP_MOUNT}/logs
    umask 022
    
    
    # Login to SQL Plus and execute the script
    sqlplus -s / @$SCRIPT_DIR/insert_asm_disk_usage.sql ${HOST_NAME}
    

    As I said, the script and SQL statement runs without any problem.

    Is there anyway around this message?

    Thank you

    Frank

    Frank.anellia wrote:

    I changed the script and way out the variables ORACLE_HOME and ORACLE_BASE instead of using .env_variables:

    1. #! / bin/ksh
    2. # Declaring variables
    3. export ORACLE_BASE = / u01/app/oracle
    4. export ORACLE_HOME=/u01/app/oracle/product/11.2.0/oracle
    5. export ORACLE_SID = $1
    6. BACKUP_MOUNT = $2
    7. Export ORAENV_ASK = NO
    8. . / usr/local/bin/oraenv
    9. #. $HOME/.env_variables
    10. HOST_NAME = $(nom d'hôte-s)
    11. LOG_DIR = / ${BACKUP_MOUNT} / logs
    12. MAIL_LIST =' [email protected]'
    13. umask 022
    14. # Connect to sqlplus and run the script
    15. sqlplus-s / @$ SCRIPT_DIR/insert_asm_disk_usage.sql ${HOST_NAME}

    It's not really help make the portable script, but no idea why it does not work with what is in the .env_variables?

    If you (you should be) using oraenv, do not set the oracle environment variables yourself. I put the following in each shell script that calls everything about oracle:

    # ------------------------------------------------------------------------

    # set the environment for ORACLE_SID

    # We assume that parm $1 was the name of the database, we work collaboratively with

    #

    export PATH = / usr/local/bin: $PATH

    export ORACLE_SID = $1

    Export ORAENV_ASK = NO

    . oraenv

    unset ORAENV_ASK

    I have seen the error that you report it.  I do remember not the exact fix, but what I do recall is that I found exactly the fix actually reading the oraenv script, focusing on where this particular error message is issued, then back followed the logic of there.  If I can do it, if you can, and it will be an exercise in good learning on several levels, not all of which relate to this specific problem.  I think SB has already referred to this approach.

    What else I remember correctly, is that the fix had to do with permissions... I think it was that I was connected the operating system with an account that did not have permissions to run certain process called oraenv.  But again, read the script and you should be able to get by.

  • SQLPLUS helps with a Linux Script

    I get an error SQLPLUS to 155.

    Apparently my SQL code is truncated (I think).

    Initially, I had all this code on separate lines to make it readable. Unfortunately for this test, I also received a return code of 155.

    I copied the SQL of my SQL DEVELOPER where this SQL works correctly.

    Can anyone make suggestions?

    BTW, I am newbie to Linux Shell, SQL and SQLPLUS Scripts.

    Here is the log of the execution of the script:


    SQL * more: Production release 11.2.0.2.0 on Friday, may 4, 17:49:38-2012

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

    SQL > SQL > connect.
    SQL > SQL > SQL > SELECT to_char (c.update_date, 'FMMonth, YYYY') 'Date of update of shipping' |' | ' || b.SHIPMENT_GID 'Expedition number' |' | ' || Count (distinct (b.SHIPMENT_GID)) 'of the expeditions' |' | ' || Count (distinct (a.i_transaction_no)) 'Auction by expedition' |' | ' || Count (*) 'notified carriers no' |' | ' || sum (where the a.responding_gl_user_gid is null then 0 otherwise 1 end) 'No bidders' |' | ' || min (numtodsinterval ((b.expected_response-b.insert_date),'day "")) 'Time of auction' |'| ' | min (numtodsinterval ((a.update_date-a.transaction_time),'day "")) 'Elapse time for first auction' |'| ' | Max (numtodsinterval ((a.update_date-a.transaction_time),'day "")) 'Elapse time for the last bid' |'| ' | NUMTODSINTERVAL ((Max (a.update_date) - min (a.update_date)), 'day') 'Elapse time of auction' |' | ' || NUMTODSINTERVAL ((Max (b.shipment_time) - max (c.insert_date)), 'day') 'Driving time to bid to P/U' |' | ' || (max (a.bid_amount) - min (a.bid_amount)) "High bid - low-bid Diff" of tender_collab_servprov a, tender_collaboration b, c of the expedition where a.i_transaction_no = b.i_transaction_no and b.shipment_gid not in (select sqa.shipment_gid from the sqa, CBRS tender_collab_servprov tender_collaboration where sqa.i_transaction_no = sqb.i_transaction_no and sqb.acceptance_code = 'A') and a.i_transaction_no in (select i_transaction_no from the tender_collaboration where tender_type = 'Offered Spot') and b.shipment_gid = c.shipment_gid AND c.update_date > = trunc (last_ day (to_date ((to_char (ADD_MONTHS (sysdate-2), 'DD-MM-YYYY')), "MM-DD-YYYY")) + 1) Group c.update_date, b.SHIPMENT_GID order of c.update_date, b.shipment_GID
    *
    ERROR on line 1:
    ORA-00923: THE KEYWORD not found where expected


    Disconnected from the database to Oracle 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    With partitioning, OLAP, Data Mining and Real Application Testing options


    Here is the Linux Shell script:

    / bin/sh
    LOGFILE = "$(date +" %A-%m-%j %H ") REPORT Oracle LOG. TXT ".
    FILENAME = "$(date +" %Y-m %-%d ")" PROD unfinished Spot Bids.CSV ""
    echo "filename for the coil is: ' '$FILENAME '.
    #spool "$FILENAME".
    sqlplus/nolog < < EOF > $LOGFILE
    whenever sqlerror exit sql.sqlcode
    connect glog_read/parker@OTMDEV
    coil PROD_Unfinished.CSV
    Set linesize 32000 trimspool on pagesize 3000
    SELECT to_char (c.update_date, 'FMMonth, YYYY') 'Date of update of shipping' |' | ' || b.SHIPMENT_GID 'Expedition number' |' | ' || Count (distinct (b.SHIPMENT_GID)) 'of the expeditions' |' | ' || Count (distinct (a.i_transaction_no)) 'Auction by expedition' |' | ' || Count (*) 'notified carriers no' |' | ' || sum (where the a.responding_gl_user_gid is null then 0 otherwise 1 end) 'No bidders' |' | ' || min (numtodsinterval ((b.expected_response-b.insert_date),'day "")) 'Time of auction' |'| ' | min (numtodsinterval ((a.update_date-a.transaction_time),'day "")) 'Elapse time for first auction' |'| ' | Max (numtodsinterval ((a.update_date-a.transaction_time),'day "")) 'Elapse time for the last bid' |'| ' | NUMTODSINTERVAL ((Max (a.update_date) - min (a.update_date)), 'day') 'Elapse time of auction' |' | ' || NUMTODSINTERVAL ((Max (b.shipment_time) - max (c.insert_date)), 'day') 'Driving time to bid to P/U' |' | ' || (max (a.bid_amount) - min (a.bid_amount)) "High bid - low-bid Diff" of tender_collab_servprov a, tender_collaboration b, c of the expedition where a.i_transaction_no = b.i_transaction_no and b.shipment_gid not in (select sqa.shipment_gid from the sqa, CBRS tender_collab_servprov tender_collaboration where sqa.i_transaction_no = sqb.i_transaction_no and sqb.acceptance_code = 'A') and a.i_transaction_no in (select i_transaction_no from the tender_collaboration where tender_type = 'Offered Spot') and b.shipment_gid = c.shipment_gid AND c.update_date > = trunc (last_ day (to_date ((to_char (ADD_MONTHS (sysdate-2), 'DD-MM-YYYY')), "MM-DD-YYYY")) + 1) Group c.update_date, b.SHIPMENT_GID order of c.update_date, b.shipment_GID;
    spool off
    EXPRESSIONS OF FOLKLORE
    RV = $?
    ECHO "fronm the sqlplus return code was: ' «$RV»»»

    HM wrote:


    @Billy: empty lines are possible in a query in sqlplus:

    set sqlblanklines on
    

    It is not enabled by default. I've never seen any SQL * more script start. :-)

  • Using the shell script sql variable

    OS: Oracle Linux 5.10

    DB Oracle 11.2.0

    I have need to query the database and assign the return value to a variable of shell, but it does not work.

    create table imr_env (key varchar2(1000), value varchar2(1000) ;
    insert into imr_env values('TblspcUsagePct','90');
    commit;
    

    Here is the shell script:

    #!/bin/bash
    echo "in script"
    ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 ; export ORACLE_HOME
    ORACLE_SID=IMR1 ; export ORACLE_SID
    export PATH=$PATH:$ORACLE_HOME/bin
    
    pct=`sqlplus -S app/manager <<END
           set serveroutput on
           declare
              output_val number ;
           BEGIN
              select value into output_val from imr_env where key = 'TblspcUsagePct' ;
              dbms_output.put_line('output_val: ' || to_char(output_val)) ;
           END ;
           /
           exit;
    END`
    
    ## another sqlplus connection, use $pct in the where clause
    
    echo "var value is $pct"
    
    

    Here is the result:

    SQL> ./test.sh
    in script
    var value is 
    
    output_val: 90
    

    Why isn't the shell variable is populated with the value retrieved from the database?

    I need to use $pct in another query that will be storage spaces that are at least 90% full.

    I had to change to a korn shell - I couldn't get the "READ" command in shell or bash.

    But it is not only "READ" command:

    SQL > select * from IMR_ENV;

    THE KEY VALUE

    ------------------------- -----

    TblspcWarningLimit 90

    TblspcUsagePct 50

    SQL > exit

    Disconnected from the database to Oracle 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production

    With partitioning, OLAP, Data Mining and Real Application Testing options

    $ cat test.sh

    VAL = $(sqlplus-S test/test)<>

    Set feedback off

    set the position

    Select (value) from imr_env, including the key to_number = "TblspcUsagePct";

    Select (value) from imr_env, including the key to_number = "TblspcWarningLimit";

    "exit";

    EXPRESSIONS OF FOLKLORE

    )

    set $VAL

    Echo $1

    Echo $2

    $./test.sh

    50

    90

    $ echo $SHELL

    / bin/bash

    $

  • Crontab Linux real time OR

    We have a chassis with NEITHER time NOR 9068 real Linux as OS.  Does anyone know how to properly configure and run a cron job?

    Other reference documents OR indicates that cron must be used to perform periodic commands the base OS and that cron is supplied with the package busybox.  The version of busybox running on the chassis is 1.20.2 and only compiled with crond and not crontab?

    I tried to install the cronie package using opkg. He have successfully installed and enabled me to run crontab.  However, when you try to run the crontab all the getting is a segmentation fault.

    Am I missing something?

    Thanks in advance!

    Thanks for the reply AGJ!

    I haven't posted this question to the community of Linux in real-time.  When I made the post, I tried a Linux forum but did not find one.  Thanks for the link.

    I actually solved the problem late last night.

    Out of the box, the init system running crond.  There is a crontab file for the root user, located at/etc/cron/crontabs.  This file can be edited with vi (or another editor if you have installed on the chassis).  The editing process is normally accomplished with the command crontab - e, but by directly modifying the file works.

    I hope this helps the next poor soul who needs to implement on the 9068 cron jobs.

    See you soon!

  • Script SQL Compact database in SQL Server 2008r2

    I am able to open the .sdf (SQL Compact Database) in Microsoft SQL Server 2008r2, but when I right click on the database, it won't let me preview the data, or the database script, so I can create a .mdf file

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Script Sql to run in the background

    Hi guys,.

    I will carry out two unix machine sql scripts by connecting through sqlplus in two sessions of PuTTY, I need to run the scripts background is there a way to run outside the sh script execution.

    SQL > @test.sql

    .

    .

    .

    Another session

    SQL > @test1.sql

    .

    .

    .

    actutally I need to run the sql in the background scripts so that my putty session will not cut

    Assuming that this is really what you want to do, use screen sessions.

    This puts the interactive session of ATS in the background, allowing you to reconnect to the it (another putty session, or of the same) to a later date to check the results manually intervene, etc.

    Install the screen on the server as root:

    yum-y install screen

    As the launch of PuTTY user session screen:

    screen

    Then start your session of sqlplus, script execution, etc.-, then press ALT-D to disconnect from the session.

    Start at any number of additional screen sessions.

    To list the sessions:

    Screen - ls

    To join your putty for a screen session session:

    session - dr

    Lose your PuTTY connection does not screen sessions you started. You can go home, in the Office VPN, mastic fire upwards and reconnect to sessions of your screen.

  • Else IF in a script sql condition

    Hi Experts,

    I have a scenario where I have to use if condition in a sql script, i.e. If a first condition is true, then run a particular file otherwise run a next file.

    Could you please let me know how we can do it.

    Example:

    I need to check a table_name in user_tables as:

    Select count (*) in the v_test from user_tables where table_name = 'Table_test ';

    IF v_test = 1 then

    @create_index.sql;

    on the other

    @create_table.sql;

    END IF;

    Thanks in advance

    Hi rv,.

    Maybe something like this can help you

    /*
    -- @2010_02_05_choice.sql
    create table kk_test ( wert varchar2(5), text varchar2(30));
    insert into kk_test values ( '1', 'single value');
    insert into kk_test values ( '2', 'One of three');
    insert into kk_test values ( '2', 'Two of three');
    insert into kk_test values ( '2', 'Seven of Nine');
    */
    set feedback off term off
    COL result  NOPRINT NEW_VALUE kk_script
    SELECT DECODE( COUNT(*), 0, 'show_message',
                             1, 'single_script',
                                'do_choice'     ) result
      FROM kk_test
     WHERE wert like '%'|| &1 || '%';                                                       
    
    set feedback on term on
    @&kk_script
    

    And who are my results:

    < sys:op13@syse > @2010_02_05_choice.sql 1
    here we are in single_script.sql
    
    < sys:op13@syse > @2010_02_05_choice.sql 2
    here we are in do_choice.sql 
    
    < sys:op13@syse > @2010_02_05_choice.sql 3
    here we are in show_message.sql
    

    Coming from an old thread MOSC Condition running script on the choice of the user of the result of a query

    concerning
    Kay

  • Script: SQL UPDATE

    Hi all

    Im trying to send a simple update (delete), but Im getting errors constantly. It seems to me that the ' are the problem, but I don't know how I can send these settings thru - that I have to pass the name of the location. Or maybe its something else...

    Script:

    Query = "" "delete from tdata_temp4 where partname = '?'. » » »

    params = [["LOCATION"] fdmContext]

    print fdmAPI.executeDML (query, params, False)

    fdmAPI.commitTransaction)

    Error:

    2015-06-19 19:58:02, 115 MORTALS [AIF]: error in Comm.executeJythonScript

    Traceback (most recent call changed):

    File '< string >", line 524, executeJythonScript

    File "D:\FDMEE\/data/scripts/custom/asdsad.py", line 3, in < module >

    print fdmAPI.executeDML (query, params, False)

    SQLException: java.sql.SQLException: [FMWGEN] [SQLServer JDBC Driver] Invalid parameter bindings.

    2015-06-19 19:58:02, 122 FATAL [AIF]: error in CommProcess.executeCustomScript

    Traceback (most recent call changed):

    File '< string >", line 59, in executeCustomScript

    File '< string >", line 482, executeCustomScript

    File '< string >", line 524, executeJythonScript

    File "D:\FDMEE\/data/scripts/custom/asdsad.py", line 3, in < module >

    print fdmAPI.executeDML (query, params, False)

    SQLException: java.sql.SQLException: [FMWGEN] [SQLServer JDBC Driver] Invalid parameter bindings.

    2015-06-19 19:58:02, 180 FATAL [AIF]: COMM error run a custom Script

    Thank you in advance!

    Vuk

    Hello

    you don't need quotes to place parameters in parameterized queries Jython.

    Query = "" "delete from tdata_temp4 where partname =?" » »

    params = [["LOCATION"] fdmContext]

    print fdmAPI.executeDML (query, params, False)

    fdmAPI.commitTransaction)

  • call scripts sql from a trigger

    I use Oracle Data Miner 11 g in Windows 8. I want to create a trigger that will instantiate some sql scripts when it is executed (that is, whenever I try to insert update a record)
    Relaxation where will call sql scripts. The whole purpose of this is to make some process when I add tuple in the table. Can someone please help me with the correct syntax for it?
    Thank you! ~

    I'm doing some data on my set of data mining techniques. I want to run the data mining process every time I add a new tuple (i.e. record) or update.  For the data extraction process, a script is called that makes data mining and stores the result in a table. That's why I came up with a solution to trigger which in my opinion; would be the perfect way to launch the script and perform the tasks of trigger (on the infeed table) too. The goal is to automate the script to data mining.  Here's my clear understanding?

    No - your 'understanding' is NOT clear or correct.

    1. a trigger runs as PART of a transaction. It was NOT what happens in the trigger and my never be, committed in the database.

    2. that means that the session LIKE NO other can see that data and a script will not be able to access these data until it was committed.

    3. a trigger and the transaction can be rolled back and restarted several times, or can be rollbacked and terminated without a commit never happening.

    4. If all the data your script would be given mine must already exist in the database BEFORE your races and even trigger.

    So these scripts must be a completely separate WORK that run AFTER any validation occurs and the data you want to "mine" actually exist.

    NONE of this is appropriate to be initialized by a trigger, because as I said above, the relaxing activity may not even engaged.

    You must create some PL/SQL (or other) code that controls the steps that must be taken

    1 insert/update data - including your stuff to trigger if there is

    2 validate this transaction

    3 run a DBMS_SCHEDULER job to run if necessary batch files/scripts.

  • Script SQL Developer runs all the lines

    I have a group of scripts that I want to execute in the order since a main script.  I created a file referencing these scripts as follows below.  My problem is that when I run this script (via F5 or another script referencing it), it runs only the first line and stops.  I have excluded questions with my references to file by changing the order - always the first runs and stops.  I have tried such as displayed below and with a semicolon; to separate each command.  I have scoured the web and can not find any reason why it does not work.  Each of the scripts listed below contains multiple statements separated by a; that wraps a file to a NAS where he is picked up by our external file transfer program.  It all works properly - the only thing that I have problems with using 1 script to call several files and run them in order.

    Any help is greatly appreciated!

    @EMSTATUS.sql

    @EMPLOYEE.sql

    @HREMPUSF.sql

    @HRHISTORY.sql

    @HRSUPER.sql

    @JOBCLASS.sql

    @JOBCODE.sql

    @PAACTREAS.sql

    @PAEMPLOYEE.sql

    @PAEMPPOS.sql

    @PCODES.sql

    @PCODESDTL.sql

    @PERSACTHST.sql

    @PRDISTRIB.sql

    @PRPAYCODE.sql

    @PSGRELATE.sql

    @REVIEW.sql

    Hello

    Note You can place in the path: Tools-> preferences-> database-> spreadsheet-> "path select default to search scripts"


    I tried the following:

    c:\tmp\calltwoscripts. SQL

    set echo on

    @zone.sql

    @ztwo.sql

    Select 'done' double.

    c:\tmp\zone. SQL:

    Select 'one' double;

    c:\tmp\ztwo. SQL:

    Select 'two' SQL;

    executed in a worksheet:

    @c:/tmp/calltwoscripts.sql

    Output:

    > @zone.sql

    > select "one" of the double

    'A '.

    -----

    one

    > @ztwo.sql

    > Select "both" of the double

    "TWO".

    -----

    two

    > select 'done' double

    'DONE '.

    ----------

    Finish

    The things that could go wrong:

    Your scripts could end with "quit".

    Paths can mingle: try (not @) and full of paths.

    You could hit a code issue, the spreadsheet does not recover-in which case you should get the output on the command line and or Page logging of messages in the view.

    Turloch

    SQLDeveloper - team

    http://www.thatjeffsmith.com/archive/2012/06/how-to-collect-Debug-Info-for-Oracle-SQL-Developer/

    http://totierne.blogspot.co.UK/2013/07/user-check-on-sqldeveloper-worksheet.html

  • Linux for SQL Server: ORA-28545: error diagnosed by Net8

    Hi guys,.

    I am getting confused with the steps to follow for this because the Oracle documentation is less than the normal ("HS_FDS_CONNECT_INFO = dns" is not enough for example) and different Articles/forum messages saying different things.

    I am trying to connect to Oracle 11.2.0.3 on Linux (64) to a SQL Server 2008 R2 on x 64 with a database named DBA_Housekeeping. Does anyone have a clear guide to the steps (and where)? Can you see what I'm doing wrong here?

    Oracle hostname: gblabl76

    SQL Server hostname: UKAHES066

    I did all the steps are on the Oracle server. I didn't something on the SQL Server (am I supposed to install a client/drivers there?):

    1 created initDBA_Housekeeping.ora in $ORACLE_HOME/hs/admin /.

    HS_FDS_CONNECT_INFO = "UKAHES066\\UKAHES066.DBA_Housekeeping"
    HS_FDS_TRACE_LEVEL = OFF
    #HS_FDS_SHAREABLE_NAME =
    
    

    2 added something to the listener.ora on the oracle server & then start the listener (of the said State UNKNOWN):

    MSSQL = (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = gblabl76)(PORT = 1523)))
    SID_LIST_MSSQL =
      (SID_LIST =
       (SID_DESC =
          (SID_NAME = DBA_Housekeeping)
          (ORACLE_HOME = /oracle/product/11.2.0.3/db_1)
          (PROGRAM = dg4odbc)
        )
      )
    
    

    3. Add a tnsnames file entry:

    DBA_Housekeeping =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
        (CONNECT_DATA = (SID = DBA_Housekeeping))
            (HS=OK)
        )
      )
    
    

    4 creates a connection to the SQL Server default for this database instance. Then, I created a link of database in Oracle:

    CREATE PUBLIC DATABASE LINK DBA_Housekeeping CONNECT TO "hkadm" IDENTIFIED BY "hkadm" USING 'DBA_Housekeeping';
    
    

    But when I try to query the database through a db connection I get the error listed. Anyone see where I am going wrong?

    Do I need to install the drivers on Windows Server (and requires a reboot?)?

    I have to create this DNS thing or matches the string in the hs .ora enough?

    Thanks for the tips: s I hope to connect to our SQL instances server so they can be monitored by their SUMMIT.

    Mike

    Those who seek to connect to Oracle & SQL Server I want to give you the best solution to your problem.

    Use a server linked server SQL for Oracle (push rather than pull).

    If you do just a server then you could do directly. However, if you plan to use several servers, then you must create a SQL Server repository (it could be the free Express version) that will store the data of all your SQL Server databases and then passes Oracle.

    The reason why I did this original post is because I want to store data in our Oracle APEX SQL Server monitoring system. I lost a day trying to trawl through the net for specific instructions for setting up (before Klaus answered me here). It took me less than an hour to select from & insert into an Oracle database in the opposite direction.

    1 install the Oracle client on the instance of SQL Server

    2. If suppliers (under related servers) does not list Oracle then reboot the server (ideally your new repository SQL Server); If she's already then skip this step.

    3. Add an entry for your new DB Oracle TNSNames file

    4 create a server associated with the oracle credentials

    That's all that is needed for a working solution. Yesterday I had nothing, today, I have a link will:

    Many MSSQL isntances-> repository MSSQL-> repository Oracle APEX

    Mike

  • Out of the script SQL more not displaying is not operating in SQL Developer

    Hello

    I have a script el_ccn.sql with the content...

    Select count (*) in the NCC;

    When I run @el_ccn.sql in a SQL Developer the option worksheet dependencies execute the Script (F5)

    all that is displayed is

    COUNT (*)
    ----------

    When I run it in SQL, I see...

    COUNT (*)
    ----------
    2285

    1 selected line.

    I can 'open' the script and then run OK but I test it before implementing more complex SQL script files, so would like to know if this is possible with SQL Developer. A colleague does not have access to SQL over, so I need to check they can do this with SQL Developer before you start a COMPUTER call helps bring sqlplus.

    There must be something simple, that I do not correctly.

    Thank you, Elaine

    Published by: E Langford on 5 June 2013 01:57

    Hi Elaine,.

    Whenever unexpected behavior occurs is not a known bug, I always suspect corruption in the migrated settings / preferences of the user. Is the best way to test this
    1. export definitions of connection, you do not want to lose.
    2. Add the following line to your sqldeveloper.conf file...

    AddVMOption - Dide.user.dir =

    3. restart the product without migrating all settings

    The conf file is \sqldeveloper\sqldeveloper\bin\sqldeveloper.conf. IDE.user.dir must be available in writing being given to whatever your username has privileges (and preferably on a drive off-grid) and must be different from the value default SQL Developer uses (for example, on Windows 7, C:\Users\Developer \AppData\Roaming\SQL).

    If el_ccn.sql script works correctly with the own user preferences, by default, then you can return to the editing of the conf file, delete or rename the folder system3.2.20.09.87 in the ide.user.dir original or default folder, and then restart the product, migrate or does not migrate settings from a previous installation as desired.

    Hope this helps,
    Gary

  • SQL workshop: Possibility to download scripts SQL from a URL (DropBox)

    Hello
    I'm under Oracle APEX in the Amazon Cloud and access it through an iPad. the iPad (on devices not jail-broken) browsers have not access to local files. Is there a way workshop SQL can access scripts by using a URL such as a SQL pointing to DropBox? Or would that be an enhancement request?

    Thank you

    Bo

    You can build the URL with just the name of the file.

    I think that the Dropbox URL will always be the same (until the name of the file).

    Something like this:

    declare
         u_rl varchar2(100):= 'http://dl.dropbox.com/u/1234/';
         content_clob CLOB;
    begin
         u_rl := u_rl || :P44_FILE_NAME;
         select httpuritype(u_rl).getclob() into content_clob dropbox from dual;
    end;
    

    Published by: taepodong on July 30, 2012 19:22

  • Using Crontab Linux backup schedule

    Hello
    My Script file works well, but when I use crontab for automatic backup is not
    work.
    my script file is
    [oracle@ab_in_02 ~] $ vi exptestrtc.sh
    export ORACLE_BASE = / opt/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
    export PATH = $ORACLE_HOME/bin: $PATH
    export ORACLE_SID = SIDRTC
    exp file = rtcadmin/rtcadmin / srinivas, backup, oracle, rtc$ (date +%d%m%y:%Hhrs).dmp log = / srinivas, backup, oracle, rtc$ (date +%d%m%y:%Hhrs).log full = y))
    echo 'export done. "

    It is very good.

    My crontab is
    [oracle@ab_in_02 ~] $ crontab-e

    00 11 * sh /home/oracle/exptestrtc.sh
    Somebody help me pls for the automatic backup.

    Thank you
    Srinivas

    Salvation;

    My crontab is
    [oracle@ab_in_02 ~] $ crontab-e

    00 11 * sh /home/oracle/exptestrtc.sh
    Somebody help me pls for the automatic backup.

    Here is the my cron:
    00 02 * /oracle/jobs/export_tables.sh 1 >/dev/null 2>/oracle/jobs/export_tables.err

    Respect of
    HELIOS

Maybe you are looking for

  • sbRIO 9606 links that disconnection

    Hi all I have the same phenomenon with http://forums.ni.com/t5/Real-Time-Measurement-and/cRIO-Connects-then-disconnects/td-p/1884039 and http://forums.ni.com/t5/Real-Time-Measurement-and/cRIO-9073-Disconnects/m-p/1751378#M10637 . But, my hardware is

  • Charge batteries 0%.

    Whenever I try to use my laptop away from a power source, it is quite dead. When I check my battery level, it says "0% - load." I use my laptop on AC all day and the battery level indicates "supported", but it always remains at 0%. Any ideas? I use a

  • Please help: System freezes with error message "generic host process for win32 services has encountered an error and needs to close."

    Please can anyone offer help - whenever I start my PC it freezesthen displays an error message "generic host process for win32 services has.encountered an error and needs to close. » In this error message, I get more information: szAppName: svchost.e

  • USB drivers for dv6-6c35dx

    I have problems getting my USB ports to register at all, it shows the usb controller drivers are installed and working properly, but when I plug something in it does not, please help

  • Higher of Windows Experience Index rating with OLD machines

    I'm a computer technician at the Brazil. I noticed that a few old machines, certain factors, have better performance than current. The difference is not visible in the points leader, but in use. Open programs or install a LOT more quickly. When this