Firing SQL Server Job Through Java

Hi All
How can I fire a SQL Server Job from Java. I am from data warehousing background and new to java. I process my cubes though a package in DTS and have encapsulated the package in a job.
I can connect to the SQL Server where the package & job reside.
Regards
Abhinav

Can it be called like a stored procedure? If so (and probably it can) look into CallableStatement... a good first step would be to see how to run it through SQl statements in an admin tool (like QueryAnalyzer) to see how it can be invoked.
If it can be invoked through SQL at all you can call it in Java. Also be aware of permission issues.

Similar Messages

  • SQL server 2000 with Java Problems

    Dear Sir.
    I am a new user for SQL server 2000 with java. Nevertheless, I developed an application for store images and text data into SQL 2000 database using java. Presently my system is running 12-client computer with one server computer, I installed SQL server 2000 into server then I access (save, insert, select, and get report) through ODBC diver to server using java application, system is ok but some time the server computer is getting struck.
    Please let me know if there is a solution to overcome this problem.
    My client computer configuration
    Windows xp
    1.8 MHz CPU � 512 � 768 RAM
    My Server computer configuration
    3.0 Dual core Intel - 1 GB RAM
    Window 2000 server

    but some time the server computer is getting struck.Can you measure which application is eating up the resources? Anyway, the hardware sounds OK for that number of clients, but of course it depends on the intensity they work with.
    The suspicious part is the ODBC driver. Is there a reason not to use the JDBC driver for SQL server provided by microsoft? I guess it will speed things up.
    Mike

  • What is the commands for SQL server job to ftp file to remote server?

    I created the job to bcp data out and create file on file system. after that, I need to ftp the file over to another box. how can I do it from sql server job?
    JulieShop

    I would like to suggest a SSIS package with a
    FTP Task instead.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Oracle 10g connectivity with sql server 2000 through oracle transpa gateway

    dear gurus.
    i am to connecto oracle 10g with sql server 2000 through oracle transparent gateway.
    i have installed transparent gateway and proper configured. also link is created.
    but when i execute query "select * from city@inventory" , so an error displayed.
    ORA-12500: TNS:listener failed to start a dedicated server process.
    kindly suggest me what could be the cause.
    regards,

    if the listener fails to spawn a dedicated server process it is commonly indicating an issue with the listener. So posting the listener and also a listener trace including a description of the env where you installed the gateway into which directory would be helpfull. Please keep also in mind if you have for example a 10.2.0.3 database and you install into this directoty a 10.2.0.1 gateway you have to reapply the patchset again do get consistent file version.
    So please describe more detailed your env.

  • SQL Server 2000 - JDBC + Java Applet problem

    Hai
    I have some problem connecting my SQL server database with Java.
    I use Applet to make my interface.
    I use Windows 2000 server.
    Here is my program listing :
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.sql.*;
    public class VLookup extends JApplet {
    String database = "jdbc:odbc:Driver={SQL Server};SERVER=Windows2000;uid=sa;pwd=;Database=User-Phone Database";
    String user = "sa";
    String password = "";
    Statement s;
    Connection c;
    JTextField searchFor = new JTextField(10);
    JLabel completion = new JLabel(" ");
    JTextArea results = new JTextArea(40, 20);
    public void init() {
    searchFor.getDocument().addDocumentListener(new SearchL());
    JPanel p = new JPanel();
    p.add(new Label("ID to search for :"));
    p.add(searchFor);
    p.add(completion);
    Container cp = getContentPane();
    cp.setLayout(new BorderLayout());
    cp.add(p, BorderLayout.NORTH);
    cp.add(results, BorderLayout.CENTER);
    try {
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    c = DriverManager.getConnection(database, user, password);
    s = c.createStatement();
    } catch(Exception e) {
    results.setText(e.getMessage());
    class SearchL implements DocumentListener {
    public void changedUpdate(DocumentEvent e){}
    public void insertUpdate(DocumentEvent e){
    textValueChanged();
    public void removeUpdate(DocumentEvent e){
    textValueChanged();
    public void textValueChanged() {
    ResultSet r;
    if(searchFor.getText().length() == 0) {
    completion.setText("");
    results.setText("");
    return;
    try {
    r = s.executeQuery("SELECT " + "Tipe " + "FROM " + "Time " + "WHERE " + "(Tipe Like '" + searchFor.getText() + "%') "
    + "GROUP BY " + "Tipe " + "ORDER BY " + "Tipe " );
    if(r.next())
    completion.setText(r.getString("Tipe"));
    r = s.executeQuery("SELECT " + "ID_Pengguna, Phone_Number, Tipe " + "FROM " + "Time "
    + "WHERE " + "(Tipe ='" + completion.getText() + "') "
    + "GROUP BY " + "ID_Pengguna, Phone_Number, Tipe "
    + "ORDER BY " + "ID_Pengguna, Phone_Number " );
    } catch(Exception e) {
    results.setText(searchFor.getText() + "\n");
    results.append(e.getMessage());
    return;
    results.setText("");
    try {
    while(r.next()) {
    results.append(r.getString("ID_Pengguna") + ", " + r.getString("Phone_Number") + ", " + r.getString("Tipe") + "\n");
    } catch(Exception e) {
    results.setText(e.getMessage());
    public static void main(String[] args) {
    JApplet applet = new VLookup();
    JFrame frame = new JFrame("User ID");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e){
    System.exit(0);
    frame.add(applet);
    frame.setSize(500, 200);
    applet.init();
    applet.start();
    frame.setVisible(true);
    } ///:~
    And java catch error like this : access denied (java.lang.RuntimePermission access ClassInPackage.sun.jdbc.odbc)
    What is wrong ??
    Is there any problem with my DNS ? 'cos I don't know how to set up my DNS.
    Can u help my with this problem ??
    Thank's

    You need to read up on what applets are capable of. Applets generally cannot open connections to things like databases due to sandboxing. There are a couple of ways to get around this. The applet can connect to a servlet on the same machine from which it came and have the servlet do the database accesses. Alternately, you can create a signed applet which allows you to get around some of these sandboxing issues.If tried to make localhost on my computer ( by setting my IIS configuration setting, and using Configure SQL XML Support in IIS I've created a new http://localhost/skripsi to my SQL database.
    Is there any command that I have to add to my program listing so the applet can work as I wish ??
    Is there any way to use applet to connect my database withaout using servlet, and can u explain siggned applet to mey ??
    Sorry, I don't really know java very well.
    driver type 4 ??

  • SQL Server jobs fail if I signout the Remote Desktop connection

    I have some SSIS jobs running in the production server which we usually take that server by Windows' Remote Desktop Connection to monitor the jobs. The problem in our case is If we sign out the server in remote connection, all the sql server jobs getting failed
    until we reestablish a remote connection but the jobs work fine if we close the remote connection explicitly by the (x) mark on the Remote Connection interface
    Any idea on this issue

    always same error like the following
    Code: 0xC0014009     Source: Connection manager "Invoice"     
    Description: There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.  End Error  Error: 2015-01-12 08:00:05.26     Code: 0x0000020F     Source: DFT GetData  [2]  
    Description: The AcquireConnection method call to the connection manager Invoice failed with error code 0xC0014009.  There may be error messages posted before this with more information on why the AcquireConnection method call failed.  End Error  Error:
    2015-01-12 08:00:05.26     
    Code: 0xC0047017     Source: DFT GetData SSIS.Pipeline     
    Description:  Data failed validation and returned error code 0x80004005.  End Error  Error: 2015-01-12 08:00:05.27     
    Code: 0xC004700C     Source: DFT GetData SSIS.Pipeline     
    Description: One or more component failed validation.  End Error  Error: 2015-01-12 08:00:05.28     
    Code: 0xC0024107     Source: DFT GetData      
    Description: There were errors during task validation.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  8:00:00 AM  Finished: 8:00:06 AM  Elapsed:  5.678 seconds.  The package execution
    failed.  The step failed.

  • SQL Server interfaces through Schduler Agent

    Hi All,
    I have a SQL server source and 1 oracle source.For running the SQL server through agent , I have updated the odiparams.sh file as
    ODI_SECU_DRIVER=oracle.jdbc.driver.OracleDriver
    ODI_SECU_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
    ODI_SECU_URL=jdbc:oracle:thin:@<hostno>:1521:DWHPROD1
    ODI_SECU_URL=jdbc:sqlserver://<hostno>:1433
    ODI_SECU_USER=odimaster
    ODI_SECU_ENCODED_PASS=aYyXCYqP5mHizfQzZJqURp
    ODI_SECU_WORK_REP=WORKREP
    ODI_USER=SUPERVISOR
    ODI_ENCODED_PASS=a7yXqYMFSzGapZjJUIq7CQ4np
    I'm able to execute the SQL server interfaces through this using the listener agent.
    I start the agent using
    ./agent.sh -port=20911
    ANd the agent starts.
    However when I try to start the scheduler agent using
    ./agentscheduler.sh -name="Test_Agent" -port=20911
    it gives me error
    com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user odimaster
    Now if i remove the sql related things from the odiparams i.e remove these statements
    ODI_SECU_DRIVER=com.microsoft.sqlserver.jdbc.SQLServerDriver
    ODI_SECU_URL=jdbc:sqlserver://<hostno>:1433
    After removing these statements,the scheduler agent works fine.
    I want to start the scheduler agent for SQL SERVER interfaces as well.Please let me know if you have any pointers for the same.
    Thanks,
    Pritika

    Hi ,
    ODI_SECU_DRIVER and ODI_SECU_URL is related to ODI master repository .
    You can have single master repository only which in turn can have multiple work repository .
    So odiparams.sh file can have only 1 entry for ODI_SECU_DRIVER and ODI_SECU_URL.
    You define your source and target data server information in Topology which will be stored in ODI repository .
    You don't have to specify the data server information in odiparams.sh .
    Regarding "whereas with these statements in odiparams.sh,Im able to execute the SQL Server interfaces using an agent"
    agent will not look into odiparams.sh file for repository parameters .. that is why it is working .
    But agentscheduler looks for repository parameters in odiparams.sh .. and your odiparams.sh file is not correct .. that is why it is failing .
    Thanks,
    Sutirtha

  • SQL Server Job Monitoring

    Hi,
    I am looking at implementing Grid Control monitoring on our SQL Server estate.
    One of the items we need to monitor for is SQL Server jobs which have failed (including job name and date).
    Does anyone have an idea of how this can be done. I'm sure I must be missing a trick here as it would seem strange that this information is being collected but can't be put into a metric or notification.
    Any assistance or pointers greatly appreciated!

    Could you please clarify what exactly is your question and what phase are you in implementing monitoring SQL Server usign Grid Control?
    Are you just about to install the plug-in for SQL Server or you are already trying to configure monitoring SQL Server jobs? I'm asking this because you mentioned "I am looking at implementing Grid Control monitoring on our SQL Server estate." which implies you are just planning to implement.
    Try reading metalink note 367797.1. You'll find lots of information and other metalink notes which may resolve your problem.
    If you can clarify your exact problem, the better.

  • Sql server job is succeeding even though it should fail

    Hi,
    I created a sql server job with one job step for a SSIS package using Powershell.
    When I run the job (manually), it shows "success" state, but it should fail (because of the bad configuration parameters).
    But if I go to job properties, and then edit job step properties (don't have to make any changes here, just clicking ok button is enough)
    then the job run will fail as expected.
    I am not sure why it is not failing first time?
    Any help is appreciated.
    Thanks
    -Bhargavi

    I set "QuitWithFailure" option for the 'OnFailAction' of the job.
    $jobStep.OnFailAction = "QuitWithFailure" 
    Here is the code:
           write-Host ""
            Write-Host "Create job for $tenantid"
            $jobName = "Auto-"+$tenantid
            $job = New-Object Microsoft.SqlServer.Management.SMO.Agent.Job($server.JobServer,$jobName)
             #Delete the job if it already exists
            if($Server.JobServer.Jobs.Contains($jobName))
                 write-host "Deleting job $jobName"             
                $sqlCommand.CommandText = "EXEC msdb.dbo.sp_delete_job @job_name = N'$jobName', 
               @delete_unused_schedule=1;"
                $result = $sqlCommand.ExecuteNonQuery()               
            $job.Create()
            #Create job step
            Write-host "Creating job step for $jobName"
            $jobStep = New-Object Microsoft.SqlServer.Management.Smo.Agent.JobStep($job, $jobName)
            $jobStep.Subsystem= [Microsoft.SqlServer.Management.Smo.Agent.AgentSubSystem]::SSIS                                                                                                                                     
            $jobStep.Command = "/ISSERVER \SSISDB\"+$ssisFolderName+"\"+$ssisProjectName+"\Test.dtsx"+" /SERVER "+$instanceName
            $jobStep.OnSuccessAction = "QuitWithSuccess"
            $jobStep.OnFailAction = "QuitWithFailure"     
            $jobStep.Create()
            $job.ApplyToTargetServer($instanceName)
            $job.StartStepID =$jobStep.ID
            $job.Alter()

  • Connet sql server 2008 to java with sqljdbc

    I'm trying to connect sql server 2008 with java and I tired to read from microsft documentation and other internet sites to do it and always get an mistake. I used sqljdb, sqljdb4, sqljdb4.1 and any
    the most simple codec is:
     public static void main(String[] args) throws SQLException{
            try {
                String connectionUrl = "jdbc:sqlserver://localhost.\\SQLEXPRESS:1433;" +
                "databaseName=hackeadorazodb;user=hacker;password=;integratedSecurity=true";
                Connection con = DriverManager.getConnection(connectionUrl);
                if(con != null){
                    System.out.println("exito");
            } catch (Exception e) {
                System.out.println("error: "+e.toString());

       
    Hi hackeadorazo,
    Could you please post the full error message?
    From your description, it seems that you are connecting to a named SQL Server instance locally.
    Firstly, please make sure the following things.
        1. SQL Server is running in SQL Server Configuration Manager (SSCM)
        2. TCP/IP is enabled in SSCM.
        3. SQL Server is listening on port 1433. Right-click "TCP/IP" in SSCM > SQL Server Network Configuration > Protocols for SQLEXPRESS, then choose "Properties" and click "IP Addresses" tab, you
    can check the port from “IPAll/TCP Port”.
    Secondly, if you use current Windows user account (Windows authentication) to log on SQL Server, the
    connection URL should be as follows.
    String connectionUrl = "jdbc:sqlserver://localhost\\SQLEXPRESS:1433;" + "databaseName=hackeadorazodb;integratedSecurity=true";
    If you use a SQL Server account (SQL Server authentication) to
    log on SQL Server. You need to specify username and password in the
    connection URL as follows. In addition, please make sure that SQL Server is configured as “SQL Server and Windows Authentication Mode “in SQL Server Management Studio (SSMS) and the login ‘hacker’ exists in SQL Server Instance>Security>Login.
    String connectionUrl = "jdbc:sqlserver://localhost\\SQLEXPRESS:1433;" + "databaseName=hackeadorazodb;user=hacker;password=<Password>";
    For more details, you can review the following blogs.
    http://blogs.msdn.com/b/brian_swan/archive/2011/03/02/getting-started-with-the-sql-server-jdbc-driver.aspx
    http://www.codejava.net/java-se/jdbc/connect-to-microsoft-sql-server-via-jdbc
    Thanks,
    Lydia Zhang

  • Alternative step on Biztalk "terminator" process, regarding disabling all sql server jobs prior to running.

    I am getting errors in one of the BT jobs, they recommend running a terminator tool available from MS ... One of the requirements is to disable all the sql server jobs, my question is: Can I just stop the sql server agent? Or this won't do it ....
    Thanks
    Bico Bielich

    Hi,
    I assume that you are talking about issue identified by Monitor BizTalk Server job.
    Why you want to stop the sql server agent? There could be other Non-BizTalk jobs running too.
    You just need to make sure that you have a BizTalk Backup of your databases, all the BTS hosts have been stopped,
    BTS SQL Agent jobs have been disabled.
    Refer: 
    http://blogs.msdn.com/b/biztalkcpr/archive/2011/02/10/using-biztalk-terminator-to-resolve-issues-identified-by-biztalk-msgboxviewer.aspx
    Pls follow the link and perform action based on the respective issue reported by the
    Monitor BizTalk Server job.
    Rachit

  • Executing SSIS packages through SQL Server Jobs.

    Hi,
    I have an SSIS package which generates xml and text files and ftps it to an ftp site. When i run the package from BIDS it works successfully but when i run it from a job it fails. My SSIS package connects to DB server A and though i'm creating a job on DB
    server A but my folder structure and the package resides in server B from where i'm connecting to DB server A through Management Studio. I'm using File system in SQL server Agent Job to call the package. When i execute the job i get following error:
    Executed as user: I\A. ...er Execute Package Utility  Version 9.00.3042.00 for 64-bit  Copyright (C) Microsoft Corp 1984-2005. All rights reserved.    Started:  5:08:05 PM  Error: 2011-06-21 17:08:05.11         
    Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted.  End Error  Error: 2011-06-21 17:08:05.11         Description:
    Failed to open package file "E:\P\H\R\Tools\R\R\R.dtsx" due to error 0x80070003 "The system cannot find the path specified.".  This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the
    result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has .  The step failed.
    Could you please tell me where am i going wrong?
    Thanks,
    Deepti
    Deepti

    Hi Christa Kurschat,
    I'm running the job under proxy account. And that account has sysadmin permissions.
    I used following script to create proxy account and run my package under that account:
    I. Create job executor account
    Highlight Security->New Login, say to make login as devlogin, type your password, default database can be your target database.
    Server roles: check �sysadmin�
    User mapping: your target database
    Msdb database: you make sure to include
    SQLAgentUserRole, SQLAgentReaderRole,  SQLAgentOperatorRole
    Then click OK
    II. Create SQL proxy account and associate proxy account with job executor account
    Here is the code and run it the query window.
    Use master
    CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
    Use msdb
    Sp_add_proxy @proxy_name='MyProxy', @credential_name='MyCredential'
    Sp_grant_login_to_proxy @login_name=' devlogin', @proxy_name='MyProxy'
    Sp_grant_proxy_to_subsystem @proxy_name='MyProxy', @subsystem_name='SSIS'
    III. Create SSIS package
    In MS SQL Server Business Intelligence Development Studio, you use job executor account devlogin to create the SSIS package (DTS) and make sure you can execute this package
    in SQL Server Business Intelligence Development Studio. Compile/build this package.
    IV. Create the job, schedule the job and run the job
    In SQL Server Management Studio, highlight SQL Server Agent -> Start. Highlight Job ->New Job�, name it , myJob.
    Under Steps, New Step, name it, Step1,
    Type: SQL Server Integration Service Package
    Run as: myProxy
    Package source: File System
    Browse to select your package file xxx.dtsx
    Click Ok
    Schedule your job and enable it
    I followed these steps.
    Thanks,
    Deepti
    Deepti

  • Not able to connect to database(MS SQL Server 2000) through JSTL tag

    Hi,
    I just want to retrieve some data from the database through a JSP page.I am using JSTL tags the code is as shown below. Whenever i execute this code i get an error message like this
    My Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource"
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:mssqlserver:sqlserver://SYS57:1433;DatabaseName= sree"
         user=" "
         password=" "/>
    <sql:query var="res" dataSource="${datasource}">
    SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>error is this:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:93)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:308)
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:192)
         org.apache.jsp.firstdb_jsp._jspx_meth_sql_query_0(org.apache.jsp.firstdb_jsp:132)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I am not clear with url attribute of setDatasource tag... I feel the error is because of that line only..... Kindly tell me how to specify the jdbc URL for MS SQL Server 2000 while using JSTL tags for connection.
    Thanks,
    Akshatha

    unable to rectify the error........ tried lot but all in vain...still trying........
    my current code is:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource" driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://SYS57:1433;databaseName=sree" user="sa"
             password="dfgdfg"/>
    <sql:query var="res" dataSource="${datasource}">
      SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>Thanks,
    Akshatha

  • Permissions needed for sql server job to execute stored procedure on linked server?

    Hi all
    I have a job step which attempts to call a stored procedure on a linked server.
    This step is failing with a permission denied error. How can I debug or resolve this?
    The job owner is sysadmin on both servers so should have execute permission to the database/proc I'm calling, right?
    The error is:
    The EXECUTE permission was denied on the object 'myProc', database 'myDatabase', schema 'dbo'. [SQLSTATE 42000] (Error 229).  The step failed.
    My code is:
    EXEC [LinkedServer].myDatabase.dbo.myProc
    Also tried:
    SELECT * FROM OPENQUERY([LinkedServer], 'SET FMTONLY OFF EXEC myDatabase.dbo.myProc')
    With the same result.
    Any help appreciated.

    The job owner may be sysadmin on the remote server. The service account for SQL Server Agent may not. And it is the latter that counts, since the it the service accounts that logs in and impersonates the job owner. But the impersonation inside SQL Server
    does not count much in Windows, and it is through Windows connection is made to the other site.
    One way to resolve this is to set up a login mapping for the job owner. The login mapping must be for an SQL login on the remote server.
    You can verify the theory, but running this query from the job:
       SELECT * FROM OPENQUERY([LinkedServer], 'SELECT SYSTEM_USER')
    By the way, putting SET FMTONLY OFF in OPENQUERY is a terrible idea. This has the effect that the procedure is executed twice. (Unless both servers are SQL 2012 or higher in which case FMTONLY has no effect at all.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Accessing Sql Server from AS400 Java program

    Hi everybody,
    I am trying to access Sql Server from an AS400 Java program. I have tried various Sql Server JDBC drivers including the Microsoft one but no luck yet. When i try to compile my Java program (with driver file in the classpath) it gives some errors on the driver jar file and also it throws out lots of unreadable text characters. This gave me a feeling that probably its a character coding issue with the jar file, so i tried ftp the file in binary mode as well as copying through the Operations Navigator. But still compilation is giving the same kind of errors.
    Do I need to have some special JDBC Drivers compiled for AS400 specifically. My understanding was that Java is platform independent so any JDBC Type 4 driver will work.
    We are running Java 1.3 on the AS400. Any help on this issue would be great.
    Thanks
    Inder

    Thanks for the help. I am writing a Java program after a long time that's why was making that mistake. Now the program gets compiled correctly but on running the program i am getting the following error message:
    java 001-0070: Exception JVAB544 not expected
    /myjava/test/msbase.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/msutil.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/mssqlserver.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    I have no idea what is this error about. Though the same driver files don't give any error when running on a Windows machine.
    Thanks

Maybe you are looking for

  • Disable "undo" button in pages for iPad

    Hi! Is there any way to disable the "undo" button that appears in the on-screen keyboard in Pages for iPad? I can't count the number of times I have been furiously typing away when I accidentally hit that and undid paragraph upon paragraph of work! O

  • [Fix Request] qt4-qtruby

    I've been trying to get qt4-qtruby to build, without much success. The error I get seems to be well documented, but nobody knows how to fix it as far as I can tell. [ 33%] Generating smokedata.cpp, x_1.cpp, x_2.cpp, x_3.cpp, x_4.cpp, x_5.cpp, x_6.cpp

  • Unhandled Exception Installing JRE 1.4.1

    When I try installing the JRE I get the following unhandled exception: Error Number: 0x80070725 Description: Incompatible version of the RPC stub Any ideas how I can fix this? Or can anyone point me in the right direction to figure it out? Thanks!

  • Image Capture freezes

    I use image capture to scan documents and pictures. It used to work perfect, but recently it started hanging up on me, usually after the first scan. If I try to close it and open it back up it says that the "scanner is in use", the only way to get it

  • Condotion working strange

    Hello I noticed strange way of working of the condition in my query. I built the report which contains two characteristics in lines (shop, article) and three columns (value 1, value 2, difference). I built the condition like "difference <> 0" do pres