How to using sqlplus to connect and run command ?

Hello,i have a small problem please help me
I want to use sqlplus to connect and run command
for example : sqlplus test/test@DB select sysdate from dual ;
and then it will show data (sysdate) to screen
what should i do ?
Thanks

kenshin19xx wrote:
Hello,i have a small problem please help me
I want to use sqlplus to connect and run command
for example : sqlplus test/test@DB select sysdate from dual ;
and then it will show data (sysdate) to screen
what should i do ?
Thanks
bcm@bcm-laptop:~$ echo "select sysdate from dual ;" > now.sql
bcm@bcm-laptop:~$ sqlplus user1/user1 @now
SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 14 20:41:33 2011
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYSDATE
2011-12-14 20:41:33

Similar Messages

  • How to use sqlplus with utf8 on windows command line

    I expected sqlplus to work interactively with the following settings:
    - Lucida Console font for command window
    - chcp 65001 (UTF8-Windows-Codepage)
    - set NLS_LANG=.AL32UTF8
    But it turned out that
    1) sqlplus apparently does not use WIN32-API function ReadConsoleW and WriteConsoleW (these wide char functions must be used instead of ReadFile and WriteFile for Console I/O)
    2) cmd silently ignores all .cmd and .bat files with codepage set to 65001.
    I fear that such a problem regarding a minority of command line freaks has low priority for Oracle and for Microsoft, so I wrote two small filters in C.
    rconsu8 passes keyboard input to stdout, using ReadConsoleW
    wconsu8 passes stdin to console, using WriteConsoleW
    both set the UTF8-codepage 65001 and restore the previous codepage at exit.
    Anybody interested?
    (Yes, I know that I could use sqldeveloper.)
    Sample session:
    C:\>set NLS_LANG=.AL32UTF8
    C:\>rconsu8 | sqlplus scott/tiger@DBUTF8 | wconsu8
    SQL> select '€' from dual;
    '€'

    SQL> select * from test_cyrillic;
    NAME
    Йозеф
    Euro €

    Console Output
    works for characters covered by Lucida Console font if the first character in a line is ASCII (code < 128, e.g. blank)
    CHCP 65001
    sqlplus
    SQL> select ' ', unistr('Josef \0419\043E\0437\0435\0444') from dual;
    Josef Йозеф
    SQL> select ' ',unistr('Euro \20AC') from dual;
    Euro €
    Sven, windows is able to render the output (as covered by Lucida Console), but there is a quirk in MSVCRTxx (C Runtime-Lib), function fwrite(). The first byte in a line is passed separately to an isolated single write() call, which causes conversion of an utf8 sequence to fail.
    Console Input
    For non-ascii characters (code >= 128), ReadConsoleW must be called, e.g. through a simple filter converting UTF-16 stdin to UTF-8 stdout.

  • How to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    how to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    Hi ,
     Have you got any additional public IP Address from your service provider , If yes on router you can have static route for those additional IP Address pointing to your ASA  outside interface . 
    Accordingly you can configure NAT 
    HTH
    Sandy . 

  • I don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    i don't know how to use the canlendars function and the notes are kind of messy code,anyone help me

    Step by step:
    1. On your main vi Front Panel, create your boolean indicator.
    2. On the block diagram, right click the new boolean indicator and select Create - Reference.
    3. On sub-vi front panel, create boolean indicator (or use one that is already created).
    4. On sub-vi front panel, create a reference (Controls Palette - Refnum - Control Refnum).
    5. Right click on the newly created Refnum and select Select Vi Server Class - Generic - GObject - Control - Boolean. The refnum label changes to BoolRefnum.
    6. On sub-vi block diagram, create Property Node (Functions - Application Control - Property Node). Find the BoolRefnum and move it close to the new Property Node.
    7. Wire the BoolRefnum to the reference input of the property node.
    8.
    Right click on the property node and select Change to All Write.
    9. Move mouse to point to Visible inside property node box, left click and select Value.
    10. Wire the boolean indicator from step 3 to the Value input of the property node.
    11. On sub-vi front panel, right click on icon and select Show Connector.
    12. Click on empty connector spot then click on the new BoolRefnum. Save your sub-vi.
    13. On main vi block diagram, connect refernece created in step 2 to the new connector terminal of sub-vi.
    14. Save and run.
    Here are the modified vi's.
    - tbob
    Inventor of the WORM Global
    Attachments:
    Pass_a_Reference.vi ‏20 KB
    GL_Flicker_mod.vi ‏83 KB

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • How to "telnet" and run commands on another computer?

    I have a Unix program. I need this to "telnet" to a Windows computer and run commands (via the prompt in Windows). Is there a way to do this in java?
    Also it is something that will be a cron job so the password will be stored in a file rather than the user typing it at the screen. There is no GUI. There is no server or java process running on Windows at the time. The Unix program needs to connect to Windows only when needed.

    Try enabling the Windows telnet server, use a regular telnet client and check if it is enough for your needs.
    Several commands in Windows apparently could be run in command-line mode using telnet, but for some reason they don't work very well. For instance, they could be using some special console-mode APIs for hiding the cursor or drawing characters in different colors, that simply will not be echoed by the telnet server.
    I remember when I've tried to use the osql tool (a command-line interface) of MS SQL Server in a Windows telnet server session. Some things simply didn't work.

  • Can i use my iphone connection to run ipod touch

    Can i use my iphone connection to run my ipod touch.  My ipod has more memory and i have had it for a few years.  All good apps and info on it.  Can i use the phone connection to run my ipod.  ext maps/ gps

    GPS information cannot be output from the iPhone to any other device.
    The only way to get Internet access on the iPod Touch is via Wi-Fi.  To get a Wi-Fi signal from the iPhone it must be running iOS4 and be an iPhone4.  This would also require a tethering capable data plan from the carrier.
    A simpler solution would be to upgrade to a larger capacity iPhone like the 32GB model.  Then there is only one device to be carried.

  • How to used the internet connection adsl on my com...

    how to used the internet connection adsl on my computer by nokia n73 me
    i whant used the adsl connection in nokia n73 me by Bluetooth or cable
    and thank you

    Hi Theo,
    There are several ways to implement this using simple timing features of LabVIEW.  Two fairly simple methods are comparing system time stamps or using the Wait VI provided in the Timing palette.  The time stamp comparison requires a little bit more programming, but can be included in your main program loop.  To use the Wait function, you will probably need to construct a new loop parallel to your main loop.  I have attached screenshots of these two implementations.  Please let me know if you have any more questions.
    Donovan
    Attachments:
    WaitDelay[1].Png ‏5 KB
    TimeStampFalse.Png ‏11 KB
    TimeStampTrue.Png ‏11 KB

  • How to use the selection profile and status profile for production order?

    Hi expert,
       I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
      Please help me.
      thanks in advance.
      george.shi

    Hi George,
    There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
    We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
    In this status profile,
    1.We define the sequence in which user statuses can be activated,
    2.We define initial statuses
    3. Allow or prohibit certain business transactions.
    Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
    Regards,
    Raja.
    Edited by: Rajarao on Oct 30, 2008 6:21 AM
    Edited by: Rajarao on Oct 30, 2008 6:22 AM

  • How to use external hard drive and iTunes together?

    how to use external hard drive and iTunes together?

    Yes I did get to that part.... I went trough external to retrive itunes folder... When I selected the folder, it said that it was locked, choose another folder... I then went to my external again to my itunes folder and and used command I to see if folder was locked and it wasn't.... it was suggested on another forum to reboot.. which I did and still same problem... All I want to do is link my external hard drive that has my itunes playlist from another Mac to my new one.. and to also use the external as the main source for adding new songs to my playlist...

  • My Macbook Pro (early 2011) has 4 gig of memory and is using all of it and running slow.

    My (early 2011) MacBook Pro has 4 gig of memory and is using all of it and running slow.  I am planning to double memory, but any ideas about why it's using all that memory?  (Yosemite 10.10.2). 

    When you see a beachball cursor or the slowness is especially bad, note the exact time: hour, minute, second.  
    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    Each message in the log begins with the date and time when it was entered. Scroll back to the time you noted above.
    Select the messages entered from then until the end of the episode, or until they start to repeat, whichever comes first.
    Copy the messages to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of it useless for solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

  • How to use real-time tracking and filing in EchoSign

    Click the link to learn how to use the notification, tracking, and filing features available in the Adobe electronic signatures service, EchoSign.

    Hi,
    You can observe the data for executables with the RTSM. Just be sure to
    first go to the Tolls>>RT Taget [x.x.x.x] Options and configure
    the VI Server to use TCP. Then add your desktop machine to the Access
    List on the TCP/IP Access tab. Now VI server should be able to export
    the info. about the executable.
    Richard
    Applications Engineer
    http://www.ni.com
    Richard
    Field Sales Engineer, New Jersey
    National Instruments

  • How to use a thirdparty look and feel

    how to use a thirdparty look and feel
    i download some from
    http://javootoo.l2fprod.com/
    but how to use?

    Include the downloaded jar file in your classpath.
    Then during startup of your application, call UIManager.setLookAndFeel(className) where className is the class name of your Look & Feel

  • How to use same Data Type and Length for two fields

    How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
    SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
    FROM bsik
    INTO TABLE it_bsik
    WHERE bukrs = p_bukrs
    AND lifnr IN s_lifnr.
    IF it_bsik IS NOT INITIAL.
    SELECT belnr gjahr awkey awtyp
    FROM bkpf
    INTO TABLE it_bkpf
    FOR ALL ENTRIES IN it_bsik
    WHERE belnr = it_bsik-belnr
    AND gjahr = it_bsik-gjahr.
    IF it_bkpf IS NOT INITIAL.
    SELECT belnr gjahr lifnr xblnr
    FROM rbkp
    INTO TABLE it_rbkp
    FOR ALL ENTRIES IN it_bkpf
    WHERE belnr = it_bkpf-awkey+0(10)
    AND gjahr = it_bkpf-awkey+10(4).
    ENDIF.
    ENDIF.
    Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
    Kindly clarify.

    Hi Saurabh,
    Please see the example code that I have developed for you. It will help you solve the problem.
    REPORT ZTEST_3 .
    tables : BKPF.
    data : begin of it_bkpf occurs 1,
             belnr type RE_BELNR,
             awkey type awkey,
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf.
    data : begin of it_bkpf1 occurs 1,
             belnr type RE_BELNR,
             awkey type gjahr,              " change the data type
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf1.
    data : begin of it_rbkp occurs 1,
             belnr type BELNR_D,
             gjahr type gjahr,
             lifnr type LIFRE,
             xblnr type XBLNR,
           end of it_rbkp.
    select belnr
           awkey
           awtyp
           gjahr
           from bkpf
           into table it_bkpf
           where BUKRS = 'TELH'.
    loop at it_bkpf.
    it_bkpf1-belnr = it_bkpf-belnr.
    it_bkpf1-awkey = it_bkpf-awkey+10(4).           "Here only append the required length.
    it_bkpf1-awtyp = it_bkpf-awtyp.
    it_bkpf1-gjahr = it_bkpf-gjahr.
    append it_bkpf1.
    clear it_bkpf1.
    endloop.
    select  belnr
            gjahr
            lifnr
            xblnr
            from RBKP
            into table it_rbkp
            for all entries in it_bkpf1
            where belnr = it_bkpf1-belnr
    This is just an example. Change the fields according to your requirement.
    Regards
    Abhii
    Edited by: Abhii on Mar 9, 2011 9:08 AM

  • I would like to leave my iMac on Snow Leapord to use Power PC software, and run Mountain Lion on my Macbook pro. I am getting an iPhone 5. Is there a way to use mail on all of them?

    I would like to leave my iMac on Snow Leapord to use Power PC software, and run Mountain Lion on my Macbook pro. I am getting an iPhone 5. Is there a way to use mail on all of them with the same accounts?

    Any IMAP e-mail account can be accessed from all devices just fine. You don't need to upgrade from Snow Leopard to be able to access an IMAP e-mail account. However, Snow Leopard won't have built-in support for iCloud. As mende1 points out, you can still read your iCloud e-mail from Snow Leopard, but you have to set it up manually. You won't be able to do things like sync your iCloud calendar or addresses with iCal or Address Book on the iMac, though.

Maybe you are looking for

  • HT4942 While on the ICloud Page, none of my pages docs are visible.

    Icloud set up on ipad and set to sync documents.  All other apps, (mail, contacts and calender) syncing fine.  However, when I click on the "iwork" icon, it just keeps bringing me back to install the Pages or Numbers applications.  Any idea why the i

  • Implement an authorization scheme using to check users

    Hello, I want to implement an authorization scheme for my application in which i want to give access to only threee users to view my application. Can anyone help me what would be my pl/sql expression. something like :APP_USER in ('R123',Y7654','TY789

  • Hoe do I get iMessage to work on my iPod?

    iMessage keeps saying that it's verifying but it doesn't send me a email or anything it just trys to load I guess- idk. I need help!! And I want to stop using textfree and things like that- after I found out about imeasssage I really wanted to use it

  • Where can I find a log of action center/security?

    I have a message in Action Center under security that says it has found a malware on my computer.  Where can I find a log of which file and location it was?  It only states the malware-name. No location or filename. Also note that this is not my anti

  • Forms Runtime Process and OC4J - Can I separate them?

    Hello, I was reading a Oracle Application Server Forms 10g material. One thing that come to my mind was that can Forms Runtime Process run in physically different host than OC4J J2EE Application Server? Does anyone have any information of this issue?