SQL*Plus sysdba remote connection

Hello all,
I'm attempting to connect to a remote database via splplus as the sys as sysdba user and am unable to do so. However, I am able to connect as a non-sysdba user. When I attempt to connect as sysdba, I receive no error but only the sqlplus Usage message. Here is some initial information:
Client
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
U:\>sqlplus regular_user/password@mySID
SQL*Plus: Release 9.2.0.1.0 - Production on Thu Jul 2 10:05:29 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
U:\>sqlplus sys/password@mySID as sysdba
Usage: SQLPLUS [ [<option>] [<logon>] [<start>] ]
where <option> ::= -H | -V | [ [-L] [-M <o>] [-R <n>] [-S] ]
      <logon>  ::= <username>[/<password>][@<connect_string>] | / | /NOLOG
      <start>  ::= @<URI>|<filename>[.<ext>] [<parameter> ...]
        "-H" displays the SQL*Plus version banner and usage syntax
        "-V" displays the SQL*Plus version banner
        "-L" attempts log on just once
        "-M <o>" uses HTML markup options <o>
        "-R <n>" uses restricted mode <n>
        "-S" uses silent modeServer
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.
U:\>sqlplus sys/password@mySID as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 2 10:21:01 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>Based upon what I read here: I've found that the server has a PWDmySID.ora file in %ORACLE_HOME%\database. I've updated the %ORACLE_HOME%\database\initmySID.ora file to include the REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE line and have restarted the database.
Any thoughts? Apparently I'm making some sort of syntax error logging in but I don't know what it is? :) Thanks.
Edited by: nmd on Jul 2, 2009 9:43 AM

HI,
can you please try it like first entrying into the sqlplus and then enter the username and password..
Also it should be sqlplus "sys/password as sysdba"
Regards

Similar Messages

  • The SQL*PLUS cannot be connected

    The SQL*PLUS cannot be connected.
    When I try to connect to sqlplus, I get the following error message: ORA-12560: TNS:protocol adapter error
    I trouble shoot it according to the following steps, but have not found any problems:
    C:\Documents and Settings\Administrator>sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue Apr 27 09:45:51 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    ERROR:
    ORA-12560: TNS:protocol adapter error
    Enter user-name:
    C:\Documents and Settings\Administrator>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 11.1.0.6.0 - Production on 27-APR-2010 09:37:56
    Copyright (c) 1991, 2007, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 11.1.0.6.0 - Production
    Start Date                27-APR-2010 09:35:08
    Uptime                    0 days 0 hr. 2 min. 48 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Listener Log File         f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Services Summary...
    Service "db1" has 1 instance(s).
      Instance "db1", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    C:\Documents and Settings\Administrator>tnsping db1
    TNS Ping Utility for 32-bit Windows: Version 11.1.0.6.0 - Production on 27-APR-2010 09:38:46
    Copyright (c) 1997, 2007, Oracle.  All rights reserved.
    Used parameter files:
    F:\app\oracle\product\11.1.0\db_1\network\admin\sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = host1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICA
    TED) (SERVICE_NAME = db1)))
    OK (500 msec)
    C:\Documents and Settings\Administrator>echo %oracle_sid%
    db1Both the OracleServiceDB1 service and the OracleOraDb11g_home1TNSListener service are already started.

    The following is from F:\app\oracle\diag\tnslsnr\HOST1\listener\trace\listener.log
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_2020_1660.trc
    Trace level is currently 0
    Started with pid=2020
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:21:18 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_1984_2004.trc
    Trace level is currently 0
    Started with pid=1984
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:35:08 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_3740_3788.trc
    Trace level is currently 0
    Started with pid=3740
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 09:37:56 2010
    WARNING: Subscription for node down event still pending
    27-APR-2010 09:37:56 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=Administrator))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=185599488)) * status * 0
    Tue Apr 27 09:38:49 2010
    27-APR-2010 09:38:49 * ping * 0
    Tue Apr 27 10:48:44 2010
    27-APR-2010 10:48:44 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db1)(CID=(PROGRAM=F:\app\oracle\product\11.1.0\db_1\bin\sqlplus.exe)(HOST=HOST1)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=2030)) * establish * db1 * 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
    Tue Apr 27 10:49:26 2010
    System parameter file is F:\app\oracle\product\11.1.0\db_1\network\admin\listener.ora
    Log messages written to f:\app\oracle\diag\tnslsnr\HOST1\listener\alert\log.xml
    Trace information written to f:\app\oracle\diag\tnslsnr\HOST1\listener\trace\ora_3948_1304.trc
    Trace level is currently 0
    Started with pid=3948
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOST1)(PORT=1521)))
    Listener completed notification to CRS on start
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    Tue Apr 27 10:50:24 2010
    27-APR-2010 10:50:24 * (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=db1)(CID=(PROGRAM=F:\app\oracle\product\11.1.0\db_1\bin\sqlplus.exe)(HOST=HOST1)(USER=Administrator))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.2)(PORT=2045)) * establish * db1 * 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

  • SQL*Plus hangs when connecting to remote DB (Solaris, 10gR2)

    First of all the particulars:
    Local System:
    Solaris 8, Oracle 10.2.0.4, October CPU
    Remote System:
    Solaris 10, Oracle 10.2.0.4, July CPU
    We are trying to initiate a connection from our local system to our remote system using a DB Link. After opening SQL*Plus, we log in with <user>@<dblink>, are asked for a password, and after entering the password, SQL Plus hangs indefinitely (we typically have to kill the sqlplus process to regain our session). Also, logging into the local system with a local account, and then querying using the db link (select * from dual@<link>) gives the same result.
    From the remote system, we CAN log into the local system using the same process, and we can also query the local system. in other words, it works in one direction, but not the other.
    We have checked all the usual suspects: tnsnames, sqlnet, db_domain, global_names, and all are set correct for our setup (although I of course welcome suggestions to check something else in the files). Also have confirmed validity of /etc/hosts entries, and permissions on those files for the 'oracle' user. A 'tnsping' and 'ping' are both successful in both directions, though I understand these only check the listener and hardware layer.
    Our Sys Admin has checked firewall connections between the two systems, and stated that they're open on the listener port (1521).
    Listener log files on the remote host, when the hang happens, show an established connection from the local host.
    Does anyone have any suggestions as to what to check for next?
    Thank you in advance for the assist!

    Whew, that truss output is enough to make your eyes bleed!
    This system is on a closed network, so I cannot post the files here, nor would I wish reading those things on anyone nice enough to spend a minute here helping me out!@
    But comparing the truss from the "broken" system, and the working one, the sqlplus that hangs returns a:
    ERR #134 ENOTCONN on a getpeernam() thread.
    The other truss (working side), does not throw that particular line, and the truss output varies widely after that line in the output fille.
    After a few moments letting the sqlplus process "hang", I get:
    ERR #62 ETIME
    Outside of that, lust a lot of hex values!

  • What is SQL Plus trying to connect to? I don't have a database on my machine.

    Strange because I don't know what I'm doing.  I have a Linux box.  It has a fresh install of 11gR2 for learning.  I'm now on my Windows machine.  I thought I could connect to the Linux machine.  On the Windows machine when I start SQL Plus it is asking for a username and password.
    Why is it doing this? I'm not connected to anything that I know of.  There is a production site and I have tnsnames.ora for other things like ODBC, JDBC, etc. but I've never even used SQL Plus on this machine (Windows).  Thanks for help.
    It is from instant client 11.2.

    user5381503 wrote:
    Ok.  Thanks.  I'm trying to locate the manual so I don't ask any more stupid questions.
    In addition to the official docs at docs.oracle.com, you might find the following enlightening for your current issue:
    see: http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/  (Help! I can’t connect to my database  )
    see: http://edstevensdba.wordpress.com/2011/02/16/sqlnet_client_cfg/  ( Help! I can’t connect to my database (part duex) )

  • SQL Server Express Remote Connection is an Official Function or Not

    There are lots of guide on internet about this topic or in the forum.
    And I have already tested SQL Server 2008 R2 Express Remote Connection successfully, for usage of an application server.
    But I am not sure about this function is Ok or not for production environment, as someone said Remote Connection with SQL Express is not an official function and not supported by Microsoft. Is it true?
    Is there some white paper or official function spec about SQL Express to clarify it?

    Sure it's an official function of the SQL Server Express Edition.
    By default it's only disabled by security reasons, because in common the Express Edition is used for smaller applications running on one machine.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Sql plus can't connect to server From windows vista - VISTA 2007

    ERROR-12154:TNS Could not resolve service name
    SERVER OPERATING SYSTEM UNIXWARE 7.1.4
    ORACLE 8i
    D2K- RELEASE 2.1- SQL Plus 3.3
    Loaded in front end on VISTA
    NET EASY CONFIGURATION Closes, can't configure
    I have done configuration manually.
    I thing VISTA Not supporting or some protocol to be configured in VISTA
    Please help me to solve the poblem.

    So your 8i db is on unixware and you are trying to connect to it from you local vista machine ?
    What Oracle client version are you using on vista ?
    Lowest 8i that support 10g client connection is 8 1 7 3 , 11g will not connect at all, and i think all 9i's will work,
    but it seems that you have wrongly defined entry in tnsnames for the db you are trying to connect to.

  • SQL Server Plugin - Remote Connections to Monitor Targets

    Hi,
    We have OEM 10.2.0.4.0 on MS Windows Server 2003 Service Pack 1. Trying to configure SQL Server Plugin Release 6 (microsoft_sqlserver_database version 3.2.3.1.0). No issues monitoring SQL Server 2005 SP2 installed on same box the Grid. Next test - monitoring SQL Server 2005 SP2 installed on a remote box H2UA62218F7.ad2.prod, tcpip port 4334. On "Add Microsoft SQL Server" screen:
    Add Microsoft SQL Server
    Properties
    * Name
    Type Microsoft SQL Server
    Name                                                          Value
    JDBC URL (Example : jdbc:sqlserver://<host>:<port>)           jdbs:sqlserver://H2UA62218F7.ad2.prod:4334
    JDBC Driver (Optional)                                        com.microsoft.sqlserver.jdbc.SQLServerDriver
    Database Username                                             sa
    Password of Database User                                     sa_password
    System Username (Needed when SQLServer is at remote location) domain_user_with_admin_privs_to_sql_server_box
    System Password (Needed when SQLServer is at remote location) domain_user_password
    Role (Optional)
    The following errors are returned when testing connection:
    MSSQLInstance_TestMetric_DynamicProperty - Failed to connect, reason : No suitable driver
    MSSQLExistence_TestMetric - Missing Properties : [STDINWBEM_HOST,servername_from_jdbc]
    OSType_TargetHost_DynamicProperty - Missing Properties : [STDINWBEM_HOST] <br>
    <br>
    Event Viewer on remote box does not show any login attempts. I am confused why it can not find same jdbs driver it finds to monitor local SQL Server 2005 instance? It should look in same %Agent_Home%\sysman\config\classpath.lst and should see same entry C:\OracleHomes\agent10g\sysman\jdbcdriver\sqljdbc_1.2\enu\sqljdbc.jar. Any thoughts?
    <br>
    <br>
    Thanks,
    <br>
    <br>
    SY.

    Metric "Space Available %" in Metric and Policy Setting page has default warning threshold of 20% and critical threshold of 10%. You can change this, as required.

  • Can SQL*Plus connect via ODBC to NON-Oracle data source?????

    I am struggling to understand something. I downloaded Oracle instance client, SQL*Plus and ODBC components with the hopes of being able to connect via SQL*Plus to a non-Oracle/ODBC compliant database.
    Is this possible? Or is SQL*Plus ability to connect via ODBC only to an Oracle data source??
    Thanks...

    sqlplus only connects to oracle. you can use the odbc driver from instant client to allow other applications to access oracle via odbc (e.g. excel). if you need to connect to non-oracle odbc database (ms-access, foxpro, etc.) you need odbc driver for those sources.
    you can use sqldeveloper to connect to oracle and non-oracle databases. check otn product info for sqldeveloper for more details.

  • Could not connect to SQL Server 2012 Remotely

    Hello, 
    I have a situation as follows:
    The Server
    SQL Server 2012 Standard Edition installed on Windows Server 2012 Standard Edition
    Active Directory is installed on the same server as well
    Remote Access Role added and configured to connect VPN 
    DNS Role added
    Windows Firewall is disabled
    The Server is connected to the internet 
    SQL Server Service & SQL Browser both are running under domain accounts
    SQL Server allows remote connections
    The Router
    The router that connects the server to the Internet is configured to:
    Enable VPN Tunnels Protocols (PPTP, L2TP and IPSec)
    Forwarding > Virtual Servers (all requests on TCP and UDP on all ports to the server local IP)
    The Client
    PC running Windows 7 SP1 with SQL Server 2012 Express 
    Joined AD on the server
    Connected to the internet
    VPN Connected to the Server
    Can Remote Desktop the Server
    Can ping the server host name
    Can nslookup the server host name
    The Problem
    If Both the Server and the Client are connected in the same Local Area Network, Client can connect to the SQL Serve
    Once the Client is placed in different location connected to the Interent, VPN connected as described above, I could not connect to the Server using:
    Windows Authentication Domain Users or
    SQL Server users
    and the error message is:
    Cannot connect to SERVER\SQLINSTANCE.
    ADDITIONAL INFORMATION:
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476
    Any thoughts
    Thanks in advance
     

    Hello Hilary,
    I have been working on a small replication test.
    On the Publisher, things went smooth and the Snapshot Agent was able to work and produce a snapshot written in a shared folder located on the Publisher
    On the Subscriber, as I am testing from SQL Server Express, I had run the following command:
    replmerg.exe -Publisher [SERVER\SQLInstance] -PublisherDB [dbRepl] -PublisherSecurityMode 0 -PublisherLogin rplMergeAgent -PublisherPassword p@ssw0rd -Publication [TEST Publication] -Distributor [SERVER\SQLInstance] -DistributorSecurityMode 0 -DistributorLogin
    rplMergeAgent -DistributorPassword p@ssw0rd -Subscriber [SUBSCRIBER\SQLInstance] -SubscriberSecurityMode 0 -SubscriberLogin rplMergeAgent -SubscriberPassword p@ssw0rd -SubscriberDB [dbRepl] -SubscriptionType 1 -OutputVerboseLevel 2 -Output C:\TEMP\mergeagent.log 
    Where 
    SERVER
    Publisher and Distributor
    dbRepl
    Database to replicate
    Merge Agent
    rplMergeAgent
    Subscriber
    SUBSCRIBER
    dbRepl
    Subscriber Database
    Merge Agent
    rplMergeAgent
    Password
    p@ssw0rd
    rplMergeAgent
    SQL Login defined in both Publisher and Subscriber with same password
    Granted the following at Publisher:
    Login to Publication Database (dbRepl)
    Login to Distribution Database (distribution)
    Member of PAL
    Granted the following at Subscriber:
    db_owner fixed database role in Subscription database (dbRepl)
    I couldn't grant rplMergeAgent Read Permission on SnapshotFolder as it is only a SQL Login.
    When I ran the above command line, I received the following error:
    Message: The schema script 'Person_2.sch' could not be propagated to the subscriber.
    I am pasting below the whole log file written by the above command:
    2014-04-11 15:38:07.205 Microsoft SQL Server Merge Agent 11.0.2218.0
    2014-04-11 15:38:07.342 Copyright (c) 2008 Microsoft Corporation
    2014-04-11 15:38:07.389 
    2014-04-11 15:38:07.406 The timestamps prepended to the output lines are expressed in terms of UTC time.
    2014-04-11 15:38:07.433 User-specified agent parameter values:
    -Publisher SERVER\SQLInstance
    -PublisherDB dbRepl
    -PublisherSecurityMode 0
    -PublisherLogin rplMergeAgent
    -PublisherPassword **********
    -Publication TEST Publication
    -Distributor SERVER\SQLInstance
    -DistributorSecurityMode 0
    -DistributorLogin rplMergeAgent
    -DistributorPassword **********
    -Subscriber SUBSCRIBER\SQLInstance
    -SubscriberSecurityMode 0
    -SubscriberLogin rplMergeAgent
    -SubscriberPassword **********
    -SubscriberDB dbRepl
    -SubscriptionType 1
    -OutputVerboseLevel 2
    -Output C:\TEMP\mergeagent.log
    2014-04-11 15:38:07.497 Percent Complete: 0
    2014-04-11 15:38:07.517 Connecting to Subscriber 'SUBSCRIBER\SQLInstance'
    2014-04-11 15:38:07.518 Connecting to OLE DB Subscriber at datasource: 'SUBSCRIBER\SQLInstance', location: '', catalog: 'dbRepl', providerstring: '' using provider 'SQLNCLI11'
    2014-04-11 15:38:07.608 OLE DB Subscriber: SUBSCRIBER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 10.50.4000
    catalog name: dbRepl
    user name: rplMergeAgent
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:38:07.613 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': select SERVERPROPERTY ('ProductVersion') 
    2014-04-11 15:38:07.617 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select
    collationproperty(@collation, N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) &
    0x1 = 0x1 then 0 else 1 end as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
    2014-04-11 15:38:07.637 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {?=call sp_helpsubscription_properties (N'SERVER\SQLInstance', N'dbRepl', N'TEST Publication')}
    2014-04-11 15:38:07.681 Distributor security mode: 0, login name: rplMergeAgent, password: ********.
    2014-04-11 15:38:07.682 Percent Complete: 0
    2014-04-11 15:38:07.683 Connecting to Distributor 'SERVER\SQLInstance'
    2014-04-11 15:38:07.684 Connecting to OLE DB Distributor at datasource: 'SERVER\SQLInstance', location: '', catalog: '', providerstring: '' using provider 'SQLNCLI11'
    2014-04-11 15:38:25.062 OLE DB Distributor: SERVER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 11.00.2100
    catalog name: 
    user name: guest
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:38:28.887 OLE DB Distributor 'SERVER\SQLInstance': select SERVERPROPERTY ('ProductVersion') 
    2014-04-11 15:38:29.842 OLE DB Distributor 'SERVER\SQLInstance': {call sp_helpdistpublisher (N'SERVER\SQLInstance') }
    2014-04-11 15:38:32.198 OLE DB Distributor 'SERVER\SQLInstance': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'SERVER\SQLInstance')
    2014-04-11 15:38:33.199 OLE DB Distributor 'SERVER\SQLInstance': {call sp_MShelp_merge_agentid (0,N'dbRepl',N'TEST Publication',null,N'dbRepl',100,N'SUBSCRIBER\SQLInstance')}
    2014-04-11 15:38:34.451 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:34.560 OLE DB Distributor 'SERVER\SQLInstance': {call sp_MShelp_profile (23, 4, N'')}
    2014-04-11 15:38:36.189 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:36.499 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_get_redirected_publisher(N'SERVER\SQLInstance',N'dbRepl',0)}
    2014-04-11 15:38:37.396 Percent Complete: 0
    2014-04-11 15:38:37.396 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:37.399 Initializing
    2014-04-11 15:38:37.401 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:37.403 Connecting to OLE DB Publisher at datasource: 'SERVER\SQLInstance', location: '', catalog: 'dbRepl', providerstring: '' using provider 'SQLNCLI11'
    2014-04-11 15:38:38.427 Percent Complete: 0
    2014-04-11 15:38:38.428 Validating publisher
    2014-04-11 15:38:38.429 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:39.455 Percent Complete: 0
    2014-04-11 15:38:39.456 Connecting to Publisher 'SERVER\SQLInstance'
    2014-04-11 15:38:39.457 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:38:46.548 OLE DB Publisher: SERVER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 11.00.2100
    catalog name: dbRepl
    user name: rplMergeAgent
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:38:50.282 OLE DB Publisher 'SERVER\SQLInstance': set nocount on declare @dbname sysname select @dbname = db_name() declare @collation nvarchar(255) select @collation = convert(nvarchar(255), databasepropertyex(@dbname, N'COLLATION')) select collationproperty(@collation,
    N'CODEPAGE') as 'CodePage', collationproperty(@collation, N'LCID') as 'LCID', collationproperty(@collation, N'COMPARISONSTYLE') as 'ComparisonStyle',cast(case when convert (int,databasepropertyex (@dbname,'comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end
    as bit) as DB_CaseSensitive,cast(case when convert (int,serverproperty ('comparisonstyle')) & 0x1 = 0x1 then 0 else 1 end as bit) as Server_CaseSensitive set nocount off
    2014-04-11 15:38:57.393 OLE DB Publisher 'SERVER\SQLInstance': select SERVERPROPERTY ('ProductVersion') 
    2014-04-11 15:38:59.236 Connecting to OLE DB Publisher at datasource: 'SERVER\SQLInstance', location: '', catalog: 'dbRepl', providerstring: '' using provider 'SQLNCLI11'
    2014-04-11 15:39:07.271 OLE DB Publisher: SERVER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 11.00.2100
    catalog name: dbRepl
    user name: rplMergeAgent
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:39:45.229 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:39:45.234 Percent Complete: 0
    2014-04-11 15:39:45.235 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:39:45.236 Retrieving publication information
    2014-04-11 15:39:45.238 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:39:46.287 Percent Complete: 0
    2014-04-11 15:39:46.288 Retrieving subscription information.
    2014-04-11 15:39:46.290 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:40:00.472 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:40:00.478 Percent Complete: 0
    2014-04-11 15:40:00.479 Applying the snapshot to the Subscriber
    2014-04-11 15:40:00.480 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:40:02.535 OLE DB Distributor 'SERVER\SQLInstance': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'SERVER\SQLInstance')
    2014-04-11 15:40:03.559 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_mergesubentry_indistdb (0,N'SERVER\SQLInstance',N'dbRepl',N'TEST Publication',N'SUBSCRIBER\SQLInstance',N'dbRepl',1,1,0,N'',?,90)}
    2014-04-11 15:40:04.600 Connecting to OLE DB Subscriber at datasource: 'SUBSCRIBER\SQLInstance', location: '', catalog: 'dbRepl', providerstring: '' using provider 'SQLNCLI11'
    2014-04-11 15:40:04.609 OLE DB Subscriber: SUBSCRIBER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 10.50.4000
    catalog name: dbRepl
    user name: rplMergeAgent
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:40:04.611 OLE DB Subscriber: SUBSCRIBER\SQLInstance
    DBMS: Microsoft SQL Server
    Version: 10.50.4000
    catalog name: dbRepl
    user name: rplMergeAgent
    API conformance: 0
    SQL conformance: 0
    transaction capable: 1
    read only: F
    identifier quote char: "
    non_nullable_columns: 0
    owner usage: 15
    max table name len: 128
    max column name len: 128
    need long data len: 
    max columns in table: 1000
    max columns in index: 16
    max char literal len: 131072
    max statement len: 131072
    max row size: 131072
    2014-04-11 15:40:07.454 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': sp_MSacquiresnapshotdeliverysessionlock
    2014-04-11 15:40:07.526 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': sp_MStrypurgingoldsnapshotdeliveryprogress
    2014-04-11 15:40:07.530 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': sp_MSissnapshotitemapplied @snapshot_session_token = N'\\SERVER\Snapshot\unc\SERVER$SQLInstance_DBREPL_TEST PUBLICATION\20140411082109\', @snapshot_progress_token = N'\\SERVER\Snapshot\unc\SERVER$SQLInstance_DBREPL_TEST
    PUBLICATION\20140411082109\Person_2.sch'
    2014-04-11 15:40:24.659 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': sp_MSreleasesnapshotdeliverysessionlock
    2014-04-11 15:40:24.663 The schema script 'Person_2.sch' could not be propagated to the subscriber.
    2014-04-11 15:40:24.665 OLE DB Subscriber 'SUBSCRIBER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:40:24.690 Percent Complete: 18
    2014-04-11 15:40:24.692 The schema script 'Person_2.sch' could not be propagated to the subscriber.
    2014-04-11 15:40:24.693 OLE DB Distributor 'SERVER\SQLInstance': {call sys.sp_MSadd_merge_history90 (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}
    2014-04-11 15:40:27.541 Percent Complete: 0
    2014-04-11 15:40:27.542 Category:NULL
    Source:  Merge Replication Provider
    Number:  -2147201001
    Message: The schema script 'Person_2.sch' could not be propagated to the subscriber.
    2014-04-11 15:40:28.563 Percent Complete: 0
    2014-04-11 15:40:28.565 Category:AGENT
    Source:  SUBSCRIBER\SQLInstance
    Number:  0
    Message: The process could not read file '\\SERVER\Snapshot\unc\SERVER$SQLInstance_DBREPL_TEST PUBLICATION\20140411082109\Person_2.sch' due to OS error 1326.
    2014-04-11 15:40:28.566 Disconnecting from OLE DB Subscriber 'SUBSCRIBER\SQLInstance'
    2014-04-11 15:40:28.568 Disconnecting from OLE DB Subscriber 'SUBSCRIBER\SQLInstance'
    2014-04-11 15:40:28.569 Disconnecting from OLE DB Subscriber 'SUBSCRIBER\SQLInstance'
    2014-04-11 15:40:28.570 Disconnecting from OLE DB Subscriber 'SUBSCRIBER\SQLInstance'
    2014-04-11 15:40:28.571 Disconnecting from OLE DB Publisher 'SERVER\SQLInstance'
    2014-04-11 15:40:28.573 Disconnecting from OLE DB Publisher 'SERVER\SQLInstance'
    2014-04-11 15:40:28.575 Disconnecting from OLE DB Publisher 'SERVER\SQLInstance'
    2014-04-11 15:40:28.577 Disconnecting from OLE DB Publisher 'SERVER\SQLInstance'
    2014-04-11 15:40:28.578 Disconnecting from OLE DB Distributor 'SERVER\SQLInstance'
    2014-04-11 15:40:28.579 Disconnecting from OLE DB Distributor 'SERVER\SQLInstance'
    I can say it is about how can the rplMergeAgent read the Shared folder.
    What do you think?

  • An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,
    error: 40 - Could not open a connection to SQL Server)

    An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named
    Pipes Provider, error: 40 - Could not open a connection to SQL Server)
    Hello,
    Make sure your SQL Server service is started.
    Make sure TCP\IP and names pipes protocol is enabled
    Make sure you have made an exception in firewall for SQL Server connection
    Make sure SQL Server browser service is enabled
    Make sure you connect with correct name hostname\instance name for named instance,MSSQLSERVER for default instance and Hotname\SQLEXPRESS for express edition.
    Please make sure you use port no when connecting to SQL server listeing on different port (hostname\instance ,portno)
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Connection string equivalent to SQL*PLUS nolog

    Hello there.
    I have a bit of a problem
    I want to run some sql statements on the oracle itself (no specified database to connect to)
    I'm now using the "SQL*PLUS /NOLOG" option, which does this great, but since I want the whole process to be automatic (programatically), I want to know how to run these commands without SQL*PLUS (using a connection string)
    I tried many variations for the connection string, but since I always got the error: "listener was not given the SERVICE_NAME in CONNECT_DATA" (again - I want to statements to be processed by the oracle server itself, without connecting to a database)
    How can I do this?
    Thanks in advance
    Tsuria

    I need a connection string to connect first.
    so what is the connection string I need to provide in order to do so?There isn't a "default" connection string, it depends on the database(s) you have to connect to. If you are working locally, that is, on the same machine where your DB is running, you can set ORACLE_SID environment variable, without using connection strings.
    Otherwise you have to create one, you can use Net Configuration Assistant for that.
    BTW, you didn't answer all my questions....

  • Seek help to format spool file from SQL*PLUS

    I am running a Unix shell script to call a Oracle 11g SQL script from a Oracle database. In this SQL script, I need to connect to many different remote databases to select data, then sool these records as one big text file to a directory. Then email the file to related Group users. In the spool file, there is a line on the top of each page like this:
    DUMMY
    DB_NAME
    I know this is caused by connect to remote database in SQL*PLUS. My connection string is like this:
    Conn system/password@Oracle_SID
    How can I remove these lines or how to skip these lines into spool file? Please advise. Thanks in advnce. Wish all of you Happy New Year!!!

    Hi,
    It sounds like you have some kind of formatting (such as SQL*Plus TTITLE) producing the output you don't want. If that's the case, temporarily stopping the spooling might not help you. Find out what is causing the output that you don't want. You say that you know it is caused by the CONNECT statements, but it must be more than that. I've written scripts with CONNECT statements that don't have anything like what you reported at the top of each page; in fact, they don't even have pages: the output is one continuous stream. Find out what's putting the unwanted output there, and that will be a big clue as to how you can stop it.
    You say that you know the unwanted titles are there because of the CONNECT statements. If so, use database links instead of CONNECT. You don't have to use dbms_scheduler or utl_file; just eliminate the CONNECT statements. (I'm not saying that there's anything wrong with dbms_scheduler or utl_file; you should definitely investigate those tools. I'm just saying that using database links is independent of them.)
    What would happen if you did all your connecting to different databases at the OS level? Can you write a shell script that connects to each database in turn, and runs a SQL*Plus script in each one. Each SQL*Plus script would have a SPOOL or SPOOL ... APPEND command, or maybe you could build the SPOOL into a LOGIN.SQL script.

  • Oracle 11g - Listen for remote connections

    Hi all,
    I recently installed Oracle 11.1.0.7.0 on a Windows Server 2008 standard server 6.0 service pack 2. Everything is working as it should.
    I can open the database control web page on the local computer.
    I can connect locally to the database from SQL Plus
    I can connect locally to the database from Oracle SQL Developer
    The database control web page shows the database is up and running as well as the listener. All is good! As the status shows:
    C:\>lsnrctl status
    LSNRCTL for 32-bit Windows: Version 11.1.0.7.0 - Production on 11-APR-2012 07:24
    :02
    Copyright (c) 1991, 2008, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.1.0.7.0 - Produ
    ction
    Start Date 10-APR-2012 16:58:34
    Uptime 0 days 14 hr. 25 min. 33 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File F:\app\oracle\product\11.1.0\db_2\network\admin\listen
    er.ora
    Listener Log File f:\app\oracle\diag\tnslsnr\SLOTH\listener\alert\log.xm
    l
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SLOTH.qmuzik.local)(PORT=1521)))
    Services Summary...
    Service "qmzorcl" has 1 instance(s).
    Instance "qmzorcl", status READY, has 1 handler(s) for this service...
    Service "qmzorclXDB" has 1 instance(s).
    Instance "qmzorcl", status READY, has 1 handler(s) for this service...
    Service "qmzorcl_XPT" has 1 instance(s).
    Instance "qmzorcl", status READY, has 1 handler(s) for this service...
    The command completed successfullyBut when I open Oracle SQL Developer from another PC and try to connect, I am unable to do so!
    I keep getting the following error:
    Status: Failure - Test failed: IO Error: The Network Adapter could not establish the connection.What do I need to do, so that I can connect from a remote computer?
    Can anyone please assist me in this matter?
    Many thanks in advance!
    Kind regards,
    Richard

    Vishwanath wrote:
    Open Listener .ora and tnsnames .ora on server and match the below parameters with the connection form of SQL developer.Check one by one they should match to establish the connection to the database.
    HOSTNAME, PORTNUMBER and SERVICE_NAME.Hi,
    Many thanks for the response! I am sure that the connection parameters are correct.
    Client PC:
    Hostname: SLOTH.qmuzik.local
    Port: 1521
    SID: qmzorcl (I even tried the QMZORCL - but that did not make a difference)
    Server listener.ora File:
    # listener.ora Network Configuration File: F:\app\oracle\product\11.1.0\db_2\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = SLOTH.qmuzik.local)(PORT = 1521))
    Server tnsnames.ora File:
    # tnsnames.ora Network Configuration File: F:\app\oracle\product\11.1.0\db_2\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    QMZORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = SLOTH.qmuzik.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = qmzorcl)
    )Any suggestions?
    Thanks again!

  • Tracking the order of execution of sql scripts in SQL*Plus

    In our production environment we sometimes have to run some .sql scripts in a particular order. Since the order of execution is important , i have created another .sql file caller caller.sql(shown at the bottom) which will call all the scripts in the right order.
    i thought of putting a exec DBMS_LOCK.SLEEP (5); after the end of every execution of the script so that i can see the
    'Ending script1'message .
    The spooling within the caller script(execute_stack.log) has become meaningless because each script has a spool <filename.log> and spool off within it. These spool logs (for every script) is important for tracking purposes as each script belongs to a different development team and i have to send them the spooled log file after the execution.
    I don't want to see the entire scripts running by in my screen. Since these scripts have their own spooling, i can later check the logs if the scripts where executed properly.
    So i need two things.
    1.I just need to see the following and nothing else in the screen.
    Ending script1
    Ending script2
    Ending script3
    .2. I need to log the order of execution. ie. the execute_stack.log should look like the above.Since there is a spool off within each script, this wouldn't be possible.Right?
    Ending script1
    Ending script2
    Ending script3
    .The caller.sql script which calls all the scripts in the right order
    alter session set nls_date_format = 'DD-MON-YYYY hh24:MI:SS';
    set serveroutput on
    set echo on;
    set feedback on;
    spool execute_stack.log
    @script1.sql
    exec dbms_output.put_line ('Ending script1');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script2.sql
    exec dbms_output.put_line ('Ending script2');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script3.sql
    exec dbms_output.put_line ('Ending script3');
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec DBMS_LOCK.SLEEP (5);
    @script4.sql
    dbms_output.put_line(chr(10)||chr(10)||'.'||chr(10)||'.'||chr(10));
    exec dbms_output.put_line ('Ending script3');
    commit;
    spool off;Is this a professional way of tracking the execution of .sql scripts?

    Pete_Sg1 wrote:
    Is this a professional way of tracking the execution of .sql scripts?No. There is very little professional about using .sql scripts on a production system - when stored procedures are safer, more robust, easier managed and controlled and secure.. and where a log table can be used to properly log the runtimes (and other stats) of each processing step.
    Let's just take a look at the number of moving parts you need to schedule and run a .sql script. A cron job needs to be configured with the proper environment setting. It needs to run a shell script. That shell script needs to load SQL*Plus. SQL*Plus needs to connect to the database (starting a dedicated server process most likely). SQL*Plus then needs to read a .sql file, parse these commands and either execute these locally (SQL*Plus commands) or remotely (PL/SQL and SQL commands).
    How can this be considered professional when the very same can be achieved with a
    - stored procedure
    - using DBMS_JOB to schedule the procedure for execution
    There are so many things that can go wrong with the first method. And so few things that could go wrong with the last one. No contest as to which method is not only better, but also professional.
    PS. See that you use Windows to run these scripts. It is even worse as it introduces another hardware and software layer making the scenario even more insecure & unsafe with more moving parts that can go wrong or simply fail.

  • SQL*Plus with Oracle 10g Express Edition

    How Can I do to log in using SQL*Plus into Oracle 10g?
    My Schema is: Banco.Global
    My Password is: 111111
    I need to write SET SERVEROUTPUT ON to get answer?
    I opened the Prompt, but i don't know to log in.
    Thanks and my english is not as well as you.

    If i write:
    SQL>connect "Banco.Global"/111111
    a error message is raised: Invalid username/password; logon denied
    but if I log in into Home Page with the same Username and Password, I get to log in.
    There is difference to connect SQL*Plus and the connect with Home Page the Oracle?
    I need to connect with SQL*Plus, because i need to make a test.

Maybe you are looking for

  • Windows 7 x64 can't install anything.

    Hello guys! I have just bought a new MacBook Pro 13'' (2010) and I wanted to install my games via Bootcamp. So I set up bootcamp and install a copy of Win7 x64, but when the drivers were ready and I tried to install any game it now says - "The versio

  • FCP won't play mixed resolution timeline

    Trying to play a ProRes 422 sequence with mixed resolutions (AIC, HDV, ProRes) and keep getting the Dropped Frames warning. I have closed all other sequences, turned off "unlimited RT", gotten down to two audio tracks. I am on Dynamic Video Quality a

  • FAQ or "how to" connect to iMac with Airport????

    Is there a checklist or such that shows how to allow a Windows laptop to connect with the Airport Extreme on an iMac? It works fine with multiple iPod touches and a Sony PSP but I'm unable to solve why the Windows laptops won't connect. Each laptop (

  • Movie to TV Show disappears

    This week I upgraded to iOS5 on my iPad1 and iTunes 10.5 on Windows.  I have iTunes set for me to manually manage my music and movies. If I copy an *.mp4 file to the iPad, as before it shows up as a movie and plays fine on the iPad.  But episodes of

  • "iTunes Cannot be Read ..Newer Version of iTunes"

    My daughter's iTunes library does not come up....God knows what she did. She claims innocence! The following error message displays "The file iTunes Library cannot be read because it was created by a newer version of iTunes". Can someone please give