DBCONNECt to MS SQLSERVER

Hi,
I have a request to install/configure the kernel extension to allow our BI (7.0, V5R4) system to read an MS SQLSERVER database. I've read a bunch of notes but am still uncertain as to what is required. I know the link does not exist in our exe/run directory.
Any insight?
Thanks,
Craig

This is not possible.
To make that possible there would need to be an SQL Server database client for i5 - which is not existing.
You can, however, install a Windows application server into your instance and make the connection from there.
Markus

Similar Messages

  • Com.microsoft.jdbc.sqlserver.SQLServerDriver

    Hi all,
    i'm trying jsp and ms sql 200 connection...
    here is the code i use:
    <html>
    <head>
    <%@ page
         import = "java.io.*"
         import = "java.lang.*"
         import = "java.sql.*"
    %>
    <title>ma quanto so bravo</title>
    </head>
    <body>
    <%
         String     place;
         Connection dbconn;
         ResultSet results;
         PreparedStatement sql;
         //SQL server 2000
         String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
    String sourceURL = "jdbc:microsoft:sqlserver://192.168.0.14:31000;databasename=prova";
    String username = "sa";
    String password = "riccio72";
         try
              //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
              try
                   int     latitude,longitude,easting,northing;
                   boolean     doneheading = false;
                   //dbconn = DriverManager.getConnection("jdbc:odbc:;DRIVER=Microsoft Access Driver (*.mdb);DBQ=E:\\ATTENTATO\\Pubblicazione\\vecchia pubblicazione\\jsp\\collegamento a db\\prova.mdb");
                   dbconn = DriverManager.getConnection(sourceURL, username, password);
                   place = request.getParameter("place");
                   sql = dbconn.prepareStatement("SELECT * FROM info WHERE name = '" + place + "'");
                   results = sql.executeQuery();
                   while(results.next())
                        if(! doneheading)
                             doneheading = true;
    latitude = results.getInt("latitude");
    longitude = results.getInt("longitude");
    easting = results.getInt("easting");
    northing = results.getInt("northing");
                        out.println("<table border=2>");
                        out.println("<tr><td>" + latitude);
                        out.println("<td>" + longitude);
                        out.println("<td>" + easting);
                        out.println("<td>" + northing);
                        out.println("</tr></table> <br>");
                   //if(doneheading)
                   results.close();
                   dbconn.close();
                   if(! doneheading)
                        out.println("No matches for " + place);
              catch (SQLException s)
                   out.println("SQL Error<br>");
                   out.print(s);
         catch (ClassNotFoundException err)
              out.println("Class loading error");
    %>
    </body>
    </html>
    Place is a variable from anothe page
    i have this error Class loading error
    How can i set this problem'?
    i have installed jrun4 sql 2000 and jdbc driver from microsoft
    i have read that i have to set the classpath and register the driver but i need particular description on how to do it
    thx

    Hi all,
    I am facing some serious problem regarding the same,
    I have done the SQL server connectivity successfully.
    But when I create the executable file of the class file, it gives me error.
    I am sending the code,
    *************** DBInterface.java ***********************
    import java.*;
    import java.sql.*;
    import javax.swing.*;
    import java.util.*;
    import com.microsoft.jdbc.sqlserver.SQLServerDriver;
    public class DbInterface
      //Connection Parameters
        protected static java.sql.Connection  con = null;
        protected final String url = "jdbc:microsoft:sqlserver";
        protected final String serverName= "localhost";
        protected final String portNumber = "1433";
        protected final String databaseName= "DBCONNECT";
        protected final String userName = "sa";
        protected final String password = "PASSWORD";
        // constructor
        protected DbInterface()
         try
            con= this.getConnection();     
            if(con!=null)
         System.out.println("Successfully connected!");
           else
          System.out.println("Error: No active Connection");
       catch(Exception e)
                  e.printStackTrace();
    // returns url string
    protected String getConnectionUrl()
      {             return url+"://"+serverName+":"+portNumber+";databaseName="+databaseName;
       // function which connects to database
      protected java.sql.Connection getConnection()
           try{
                    Driver d = (Driver)Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                     Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                     con = DriverManager.getConnection(getConnectionUrl(),userName,password);
                    if(con!=null) System.out.println("Connection Successful!");
              }catch(Exception e){
               JOptionPane.showMessageDialog(new JFrame(), e.getMessage(), "Error Message", JOptionPane.ERROR_MESSAGE);
                   e.printStackTrace();
                   System.out.println("Error Trace in getConnection() : " + e.getMessage());
              return con;
    protected void closeConnection()
              try{
                   if(con!=null)
                        con.close();
                   con=null;
                   System.out.println("Close Connection");             
              catch(Exception e)
                   e.printStackTrace();
    ********* TestConnection.java************************
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class  TestConnection
       public static void main(String[] args)
               DbInterface getlive = new DbInterface();
               if(DbInterface.con != null)
                 JOptionPane.showMessageDialog(new JFrame(), "Successfully Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
                  getlive.closeConnection();
              else
         JOptionPane.showMessageDialog(new JFrame(), "Not Connected!", "Error Message", JOptionPane.ERROR_MESSAGE);
               System.exit(0);
    }Both this files are compiled well.
    Now when I create an excutable file for this, it unable to connect sql server.
    (Note : I have created executable file using JSmooth & also tried with manually jar executable.)
    Can somebody focus on this issues?
    Thanx & Regards,
    Mahesh

  • DBConnect Error while installing SAP ABAP Engine DBInstance

    My environment is as follows
    Windows 2003 (SP1) Server
    SQL Server 2000 (SP3 + hotfix + unicodecp850bin2)
    SAP XI 3.0 Installation
    Central Instance Installation was successful and trying to install DB Instance but somehow all scripts throwing same error DBConnect rc=256 DBError rc=20;
    Are there any special setup needed for sql server user setup. I am using same windows authentication for sqlserver admin

    Patch sql server to sp4 ( 8.00.2040).
    Also do you have a named instance of sql server?

  • DB_Connect Error connecting to SqlServer

    We have a BI Netweaver 7.0 system running on Itanium with an Oracle Database.
    Using tcode RSA1 I wanted to create a remote connect to a SqlServer database.
    The DBMS type is MSS. The error message we are getting is "No shared library found for the database"
    Is this possible?

    SQL server must be possible using dbconnect, a checklist for you to review in case you missed out on something:-
    1. Check:-
    If the source DBMS and BI DBMS are different - {your case (Oracle and sql server) }:
    &#9675;       You have installed the database-specific DB client software on your BI application server. You can get information about the database-specific DB client from the respective database manufacturers.
    &#9675;       You have installed the database-specific DBSL on your BI application server.
    2. Procedure for Installing DBSL: [http://help.sap.com/saphelp_nw70/helpdata/EN/50/63d6b37bda7f4a92e2dec21b14ceee/frameset.htm]
    3. List and specifications (supported databases)
    [http://help.sap.com/saphelp_nw70/helpdata/EN/50/63d6b37bda7f4a92e2dec21b14ceee/frameset.htm]
    This links hints at some pre-requisites for the connection, check if you satisfy all.
    Hope this helps.
    Cheers,
    Sumit

  • SqlServer 2008 Express Install error

    Guys, any one know how to fix this ?
    I installed the SqlServer Express 2008 on top of WinXp sp2 with .net framework and sdk 3.5
    Now when I try to start the sqlexpress service it does not start and event log has following exception..
    FileMgr:tartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql10_main_t\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
    Now on my system I have only c:\ drive no e:\
    Does any one know how to fix this ?
    Is there a way to create this master database somehow using command line?
    I really don't want to uninstall/install ?

    I had the same problem and could fix it with the above script.
    Now I can run the sql server service but I can not login!!
    I had enabled the mix mode auth. during installation. but I can't login with local Administrator or sa user.
    My configuration:
    - a fresh installation of Win 2k3 sp2
    - Win installer 4.5
    - Powershell 1.0
    - sql server 2008 express with adv.
    - nothing more!!!!
    Management Studio shows me following error:
    ===================================
    Es kann keine Verbindung mit 'xxx\SQLEXPRESS' hergestellt werden.
    ===================================
    Login failed for user 'xxx\Administrator'. (.Net SqlClient Data Provider)
    Hilfe erhalten Sie durch Klicken auf: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
    Servername: xxx\SQLEXPRESS
    Fehlernummer: 18456
    Schweregrad: 14
    Status: 1
    Zeilennummer: 65536
    Speicherort des Programms:
       bei System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
       bei System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       bei System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       bei System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
       bei System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
       bei System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
       bei System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
       bei System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
       bei System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
       bei System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
       bei System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
       bei System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       bei System.Data.SqlClient.SqlConnection.Open()
       bei Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorer.ValidateConnection(UIConnectionInfo ci, IServerType server)
       bei Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

  • Upgrade Error - DBConnect fails EC 00256

    Hi,
          the upgrade from 4.6c to Ecc6 failed at step StartSap_Dual with following error
    System start failed code - 2
    - 2 the test rfc did not work
    try to login in with the ddic user. this error shows up on the upgrade screen.
    we are using
    Windows 2000 sp3,oracle 9.02,kernel 700 patch 102
    wen manually tried to connect using management console it gives the error DBConnect fails Ec 00256
    The DB log mode is now changed to Archive log mode.\
    Kindly help if this is a known issue
    thanks
    John
    the dev_w0 log is shown below
    trc file: "dev_w0", trc level: 1, release: "700"
    ACTIVE TRACE LEVEL           1
    ACTIVE TRACE COMPONENTS      all, MJ

    B Wed Aug 01 12:03:53 2007
    B  create_con (con_name=R/3)
    B  Loading DB library 'I:\usr\sap\U46\SYS\exe\run\dboraslib.dll' ...
    B  Library 'I:\usr\sap\U46\SYS\exe\run\dboraslib.dll' loaded
    B  Version of 'I:\usr\sap\U46\SYS\exe\run\dboraslib.dll' is "700.08", patchlevel (0.102)
    B  New connection 0 created
    M sysno      00
    M sid        U46
    M systemid   560 (PC with Windows NT)
    M relno      7000
    M patchlevel 0
    M patchno    102
    M intno      20050900
    M make:      multithreaded, Unicode, optimized
    M pid        5908
    M
    M  kernel runs with dp version 224000(ext=109000) (@(#) DPLIB-INT-VERSION-224000-UC)
    M  length of sys_adm_ext is 572 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 5908) [dpxxdisp.c   1301]

    I Wed Aug 01 12:03:54 2007
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          24344     (1432)
    M  DpShMCreate: sizeof(tm_adm)          4232256     (21056)
    M  DpShMCreate: sizeof(wp_ca_adm)          24000     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     8000     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    M  DpShMCreate: sizeof(slock_adm)          0     (96)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1520)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 08D10040, size: 4897456)
    M  DpShMCreate: allocated sys_adm at 08D10040
    M  DpShMCreate: allocated wp_adm at 08D11E80
    M  DpShMCreate: allocated tm_adm_list at 08D17D98
    M  DpShMCreate: allocated tm_adm at 08D17DC8
    M  DpShMCreate: allocated wp_ca_adm at 09121208
    M  DpShMCreate: allocated appc_ca_adm at 09126FC8
    M  DpShMCreate: allocated comm_adm at 09128F08
    M  DpShMCreate: system runs without slock table
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 091A9DC8
    M  DpShMCreate: allocated gw_adm at 091A9E08
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 091A9E38
    M  DpShMCreate: allocated wall_adm at 091A9E40

    X Wed Aug 01 12:03:55 2007
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation view
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.
    M  ThInit: running on host SAPUPG46
    M  calling db_connect ...
    C  CLIENT_ORACLE_HOME is not set as environment variable or
    C  DIR_CLIENT_ORAHOME is not set as profile parameter.
    C    assuming using instant client with unspecified location.

    C Wed Aug 01 12:03:56 2007
    C  Oracle Client Version: '10.2.0.2.0'
    C  Client NLS settings: AMERICAN_AMERICA.UTF8
    C  Logon as OPS$-user to get SAPU46's password
    C  Connecting as /@U46 on connection 0 (nls_hdl 0) ... (dbsl 700 010307)
    C  Nls CharacterSet                 NationalCharSet              C      EnvHp      ErrHp ErrHpBatch
    C    0 UTF8                                                      1   07443638   07448CD4   0744855C
    C  Attaching to DB Server U46 (con_hdl=0,svchp=074484A8,srvhp=0745A0A4)

    C Wed Aug 01 12:03:59 2007
    C  Starting user session (con_hdl=0,svchp=074484A8,srvhp=0745A0A4,usrhp=0747CD78)
    C  Now '/@U46' is connected (con_hdl 0, nls_hdl 0).
    C  *** ERROR => Cannot decrypt password I got from table vzxvb
    [dbsloci.c    11430]
    C  Disconnecting from connection 0 ...
    C  Closing user session (con_hdl=0,svchp=074484A8,usrhp=0747CD78)
    C  Now I'm disconnected from ORACLE
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1426]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10240]

    M  Info for wp 0

    M    stat = WP_RUN
    M    waiting_for = NO_WAITING
    M    reqtype = DP_RQ_DIAWP
    M    act_reqtype = NO_REQTYPE
    M    rq_info = 0
    M    tid = -1
    M    mode = 255
    M    len = -1
    M    rq_id = 65535
    M    rq_source =
    M    last_tid = 0
    M    last_mode = 0
    M    semaphore = 0
    M    act_cs_count = 0
    M    csTrack = 0
    M    csTrackRwExcl = 0
    M    csTrackRwShrd = 0
    M    control_flag = 0
    M    int_checked_resource(RFC) = 0
    M    ext_checked_resource(RFC) = 0
    M    int_checked_resource(HTTP) = 0
    M    ext_checked_resource(HTTP) = 0
    M    report = >                                        <
    M    action = 0
    M    tab_name = >                              <
    M    vm = no VM

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server SAPUPG46_U46_00 on host SAPUPG46 (wp 0)
    M  *  ERROR       ThInit: db_connect
    M  *
    M  *  TIME        Wed Aug 01 12:03:59 2007
    M  *  RELEASE     700
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          13
    M  *  MODULE      thxxhead.c
    M  *  LINE        10439
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  PfStatDisconnect: disconnect statistics
    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c   720]
    M  *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c  260]
    M  Entering ThSetStatError
    M  ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
    M  Entering ThReadDetachMode
    M  call ThrShutDown (1)...
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 5908) [dpnttool.c   327]

    Hi John
    Did you check the env variables??
    Error "CLIENT_ORACLE_HOME is not set as environment variable"
    Define ORACLE_HOME as <drive>:\oracle\<SID>\<oracle_version>
    or CLIENT_ORACLE_HOME as <drive>:\<oracle client location>
    Regards
    Juan
    Please reward with points if helpful

  • Problem in Accession inner join with [Microsoft][SQLServer 2000 Driver

    Hi
    Can you tell me what can be cause my sql statement is correct gives result but
    if i used below statement in my JSP ,cause error
    1)
    ps1=connection.prepareStatement("select RQM_IN_RQSTN_ID_PK,RQD_IN_ITM_ID_FKPK,RQD_VC_ITM_DSCRPTN,RQD_IN_STTS_ID_FK,C.SMT_VC_STTS_NM,a.RQM_DT_PRPSD_DLVRY_DT"+
    "from PAS_RQM_RQSTN_MSTR a "+
    "inner join PAS_RQD_RQSTN_DTLS b on a.RQM_IN_RQSTN_ID_PK = b.RQD_IN_RQSTN_ID_FKPK and RQD_IN_STTS_ID_FK = 4"+
    "INNER JOIN PAS_SMT_STTS_MSTR C ON C.SMT_IN_STTS_ID_PK=B.RQD_IN_STTS_ID_FK" +
    "where a.RQM_VC_DTRTMNT_INVLV='Technology' ");
    2) Error Generate
    java.sql.SQLException
    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Line 1: Incorrect syntax near 'a'.
    What can be the cause
    Thanks

    ps1=connection.prepareStatement("select
    RQM_IN_RQSTN_ID_PK,RQD_IN_ITM_ID_FKPK,RQD_VC_ITM_DSCRP
    TN,RQD_IN_STTS_ID_FK,C.SMT_VC_STTS_NM,a.RQM_DT_PRPSD_D
    LVRY_DT"+
    "from PAS_RQM_RQSTN_MSTR a "+
    "inner join PAS_RQD_RQSTN_DTLS b on
    a.RQM_IN_RQSTN_ID_PK = b.RQD_IN_RQSTN_ID_FKPK and
    RQD_IN_STTS_ID_FK = 4"+
    "INNER JOIN PAS_SMT_STTS_MSTR C ON
    C.SMT_IN_STTS_ID_PK=B.RQD_IN_STTS_ID_FK" +
    "where a.RQM_VC_DTRTMNT_INVLV='Technology' ");This is a problem due to not providing spaces where they are needed. See the places where I have highlighted.
    A better way is to generate the String first [use StringBuffer as a good practice for appending instead of String "+"] and print it out to check if it is correct.
    ***Annie***

  • Publishing to Azure Web App when using nuget "Microsoft.SqlServer.Types" crashes WebDeploy

    I have a project where I use "Microsoft.SqlServer.Types" that loads an assembly manually as part of the package.
    The problem arises when I publish this via Visual Studio. I get an error that the file is already in use from WebDeploy. This is probably because of how the assemblies are loaded or something that makes them locked.
    Repro steps:
    Create an ASP.NET web and add nuget package "Microsoft.SqlServer.Types" and make sure you load the assembly using the provided ReadMe.txt in your App_Start.
    Deploy to Azure Web App.
    Deplay again when the app is up and running - you'll get the error.
    Does WebDeploy have an option for shutting down the site when updating or something like that? This error also apply to any WebJobs that also use the "Microsoft.SqlServer.Types" package.

    there is a way to take the site down during publishing please read through this blog post 
    http://blogs.msdn.com/b/webdev/archive/2013/10/30/web-publishing-updates-for-app-offline-and-usechecksum.aspx
    please read the part about appoffline
    Thanks, Hosam

  • Anyone using ms sqlserver standard edition with XI 3.0

    wondering if anyone is successfully using ms sqlserver standard edition (not enterprise edition) with XI 3.0. I would like to set up a dev/test XI system and the standard sqlserver edition is less expensive than enterprise edition. I would like to confirm that it works ok first.
    thanks-

    Henry,
    I haven't tried but I think it will be successful with mssql server standard edition also. The following link gives the key difference between standard and enterprise edition.
    http://www.databasejournal.com/img/RS_servereditions_code.html
    Best of luck!
    regards,
    Felix

  • How to pivot using pivot clause of sqlserver 2005 for three values

    Dear all
                Is it possible to formulate the query using pivote clause of sqlserver 2005.
    ( Table name is) BridgeHawra
    ReportDate,                 , Pole, DiameterCost,Flag,OuterDiaCost
    01 jan 2014,               ,1     ,   4.5      ,yes,6
    01 jan 2014,               ,2     ,   4.5        ,no,6
    01 jan 2014,               ,3    ,  5.5         ,no,6
    02 jan 2014,               ,4     ,  5.5        ,no,5.9
    02 jan 2014,               ,5     ,  5.5        ,no,6
    1)Pole Col will have unique value.
    o2)One pole will have one DiameterCost, but n number of DiameterCost can be there.
    I have to show a report which should show , count of poles and cost(DiameterCost* pole count of the day of each DiameterCost) for each date and DiameterCost.
    as following
    DateOfReport            ,  PoleCountofDiameterCost4.5, DiameterCost4.5, PoleCountOfDiameterCost5.5,DiameterCost5.5
    01 jan 2014              , 2                                      
          ,(2*4.5)                        ,1                                   
    ,(1*5.5)
    02 jan 2014              , 0/null                                      ,0/null
                              ,2                                
       ,(2*5.5)
    yours sincerely

    Yes it is possible though you need to use dynamic pivot technique. Dynamic pivot allow you to select/display column names dynamically.
    Below example does not use dynamic pivot,
    --create table #temp(ReportDate datetime,Pole int, DiameterCost decimal(5,2),Flag varchar(3),OuterDiaCost decimal(5,2))
    --insert into #temp values('01 jan 2014',1,4.5,'yes',6)
    --insert into #temp values('01 jan 2014',2,4.5,'no',6)
    --insert into #temp values('01 jan 2014',3,5.5,'no',6)
    --insert into #temp values('02 jan 2014',4,5.5,'no',5.9)
    --insert into #temp values('02 jan 2014',5,5.5,'no',6)
    ;with cte as (
    select ReportDate,
    DiameterCost * PoleCount as DiameterCost,
    PoleCount ,
    'PoleCountofDiameterCost'+cast(DiameterCost as varchar) column1,
    'DiameterCost'+cast(DiameterCost as varchar) column2
    from (
    select ReportDate,DiameterCost,Count(Pole) as PoleCount from #temp
    group by ReportDate,DiameterCost
    ) x
    ),cte1 as (
    select * from cte
    pivot( max(PoleCount) for column1 in ([PoleCountofDiameterCost4.50],[PoleCountofDiameterCost5.50])
    ) pvt
    pivot( max(DiameterCost) for column2 in ([DiameterCost4.50],[DiameterCost5.50])
    ) pvt1
    select ReportDate,
    Max([PoleCountofDiameterCost4.50]) [PoleCountofDiameterCost4.50],
    Max([DiameterCost4.50]) [DiameterCost4.50],
    Max([PoleCountofDiameterCost5.50]) [PoleCountofDiameterCost5.50],
    Max([DiameterCost5.50]) [DiameterCost5.50] from cte1
    group by ReportDate
    Regards, RSingh

  • SharePoint 2010 Excel Services with SQLserver 2012 cubes

    I have two tier sharepoint 2010 enterprise setup
    1)wfe  and app server
    2) sqlserver
    I also have a sqlserver 2012 which hosts all our BI cubes .
    is it possible to connect excel (office 2010)  to sql 2012 BI and save that in my sharepoint 2010 server  under shared documents and expect it to refresh when aall authenticated users hit " refresh all connections"
    It is not able to hit refresh . I get a " unable to refresh data for  a data connection in this notebook" the following connections fail to refresh.
    Interesting when I do the same this using sql server 2008 r2 BI , everything works fine

    Hi,
    According to your description, my understanding is that the SharePoint 2010 Excel Service cannot work with SQL Server 2012.
    Did you install Service Pack 1 for SharePoint 2010?
    SharePoint 2010 Service Pack 1 is required for SQL Server 2012 PowerPivot for SharePoint features.
    Please check if the Service Pack 1 is installed for SharePoint 2010. If not, please download it from the link below and install it:
    http://www.microsoft.com/en-hk/download/details.aspx?id=26623
    More references:
    http://msdn.microsoft.com/en-us/library/ee210708(v=sql.110).aspx
    http://msdn.microsoft.com/en-us/library/6d61be91-0396-443c-a7f4-02dcf973775e(v=sql.110)
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • PLEASE HELP!!!  Problem with Java and SQLServer Text data type

    Hi there,
    I have a java app. that reads from an MS SQLServer database. Originally, all long text fields were declared as NVARCHAR(200). The program worked fine.
    Someone then advised that I change all long text fields to the TEXT data type. The program now crashes out with the following Exception:
    "java.sql.SQLException: [JRun][SQLServer JDBC Driver]This ResultSet can not re-read row data for column 25."
    Basically, I have a method that retrieves a resulset and iterates through it. The resultset is passed to another method during each iteration. In the example below, the 'specialNote' field used to be NVARCHAR(200). The code worked fine. Then when it was changed to TEXT, the program no longer works with the above Exception thrown.
    Anyone know any special way SQLServer TEXT data types need to be handled?
    Thanks for any advice!
    The code looks something like this in functionality:
    <CODE>
    public void method1 (Connection conn)
    Resultset rs = conn.createStatement().executeQuery("SELECT * FROM ProductBB");
    while (rs.next())
    method2(rs);
    public void method2 (ResultSet rs)
    String str = rs.getString("specialNote");
    </CODE>

    Hi JWoods,
    Thanks for the suggestion. I originally had the code do what you suggested, ie, get the resultset then retrieve the data all within the same method. The data is then used to set properties in an object.
    When I had to create another method that also retrieved a resultset but using a different primary key, then also use the returned data to set the properties in the same type of object, I didn't want to repeat the setter code. That's why I decided to pass the resultsets to the same method that did the property setting.
    Unfortunately, it stopped working with the data type change.
    Any other thoughts?

  • Locks made against source database (SQLServer 6.5 to 9.0.1.2 migration)

    I was wondering if there is any information about the types of locks that OMWB will take out on the source SQLServer database in a migration. From what I can tell these locks occur on the source database while the table data is loaded in to the target Oracle database. Are they taken at any other time during the migration process? How does OMWB determine what locks to take?
    I need to migrate several production SQLServer 6.5 databases and I need to understand how OMWB will perform locks so I don't bottleneck our production SQLServer databases while they are converted to Oracle. Most of the migration work will be performed off hours, but I still would like some insight into the locking. In a related question, how does OMWB maintain consistency between tables during the migration process?
    Thanks in advance for your help.
    -Reid

    Hi,
    You will be able to migrate from 6.5 to 9.3.1, if the 6.5 version is on a seperate server from the planned 9.3.1 version then you can use the migration wizard to do so.
    If you want to migrate users and groups make sure the 9.3.1 version is still in native security mode, otherwise you will need to use esscmd/maxl to extract user information and then import.
    The migration wizard will not take the data so you should really export that from your source.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • DBConnect with SQL Server

    Hi,
    we have a dbconnect source system with sql server.
    The installation is correct and we have the list of tables and views.
    We can get a list of table/view content too.
    But, when we make an infopackage request there is no idoc generated and the status color of the request get yellow.
    Tips:
    - We have in SQL the user with permissions to do selects and create views.
    - The list of tables/views in source system not extract this user owner. Only extracts the sa owner.
    - We connect with our user, not with sa.
    Any one have an idea
    Tanks
    Xavo

    Hi,
    This is some sort of privileges problem . The user which is used in  the Source system definition ,Should have Atleast select statement privileges on the table and view. If you are using view you can change the owner of this view to user , which is used in the Source system definition .
    With rgds,
    Anil Kumar Sharma .P

  • How pass ext characters to a stored proc by odbc when enable sqlserver syntax is on??

    how pass french characters or extended characters to a stored procedure by odbc
    error: ORA-01756: quoted string not properly terminated
    une chaine entre apostrophhes ne se termine pas correctement
    oracle Retrieving extended characters thru ODBC
    PL/SQL procedure parameters
    hi, i hope you can help to me.
    I have a problem with french and german characters.
    i have a little stored procedure than return what i'm passing to him.
    see these example: (the second one work fine on plsql)
    first exemple:
    1) i created a new odbc dsn
    2) i'm going into sqlserver migration tab to choose
    Enable Exac Syntax.
    3) i'm open Winsql (this is a odbc tools)
    http://www.indus-soft.com/winsql/
    4) i'm write
    exec ksp_test 0,'HiLLO ORACLE'
    i receive this error:
    Error: ORA-01756: quoted string not properly terminated
    (State:S1000, Native Code: 6DC)
    I trying to changed too the NLS_LANG in the registry
    like FRENCH_CANADA.WE8ISO8859P1
    French_France.WE8ISO8859P1
    but without any success..
    i got the same problem with
    oracle 9 database with utf8 characters set.
    oracle 8.1.7 with iso8859p1 characters set.
    i trying all latest odbc driver from oracle website.
    second exemple:
    SQL> variable mytest refcursor;
    SQL> exec ksp_test (0,'HiLLO ORACLE',:MYTEST);
    PL/SQL procedure successfully completed.
    SQL> PRINT MYTEST;
    Your Database Value
    HiLLO ORACLE
    CREATE OR REPLACE PACKAGE KSP_PLSQLRSETPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    END;
    CREATE OR REPLACE PROCEDURE KSP_TEST (
    PATCH INT DEFAULT 0,
    PONC VARCHAR2,
    RC1 IN OUT KSP_PLSQLRSETPkg.RCT1
    AS
    BEGIN
    OPEN RC1 FOR
    SELECT PONC "Your Database Value" FROM DUAL;
    FROM DUAL;
    RETURN ;
    END;
    i'm trying also different nls setting but no good result.
    AMERICAN_AMERICA.US7ASCII
    AMERICAN_AMERICA.WE8MSWIN1252
    FRENCH_CANADA.WE8DEC
    FRENCH_CANADA.UTF8
    FRENCH_CANADA.WE8MSWIN1252
    FRENCH_FRANCE.WE8DEC
    FRENCH_FRANCE.UTF8
    FRENCH_FRANCE.WE8MSWIN1252
    is working well on sqlplus but not by odbc..
    also..
    i'm declare a variable and
    i set
    v_variable := 'id'
    and the procedure return the good syntax...
    i think is a odbc driver problem....
    the driver don't want to accept a extended characters set by a parameters coming from the procedure.
    can you confirm to me ..this is a major bug for the driver..
    my procedure is very basic to make a little test.
    did you try my procedure to be sure you have the same problem?
    i try with a oracle instance utf8,WE8MSWIN1252 and
    i got always the same problem.
    if i write insert into test values ('di');
    everything is fine...but when i call the procedure...
    the procedure don't want to accept any german..french or any extended characters...
    our application is working by odbc driver.
    i'm pretty sure is a bug in the driver ...the bug is coming only when i select "ENABLE EXEC SYNTAX" IN THE DSN (SQLSERVER MIGRATION SECTION) ... i try with Shema Database and Owner and Empty and i got
    always the same problem
    exec KSP_TEST 0,'TiEST'
    ------------------------>>>>>>>NOT WORKING.
    BUT IF I WRITE
    CALL KSP_TEST (0,'TiEST')
    ------------------------->>>>IS WORKING
    if i select enable exec or i unselect enable exec...
    the CALL KSP_TEST...... is always working properly.
    BETWEEN THESE SYNTAX THE NLS_LANG IS NEVER CHANGED....
    IS WORKING.....THE NLS_LANG IS GOOD.......because i make a little modification in procedure to be sure the INSERT IS inside the database CORRECTLY.
    CREATE OR REPLACE PROCEDURE KSP_TEST
    PATCH INT,
    PONC VARCHAR2
    AS
    v_test varchar2(100);
    BEGIN
    v_test := 'test';
    INSERT INTO YYY VALUES (PONC);
    END;

    If  "just using Crystal Reports XI R2" means using Crystal Report Viewer and do not want to see the prompt, please follow the below steps.
    1. Select the report you want to see
    2. Select "Process" tab
    3. Select Parameters menu under the process tab.
    4. You would see two date parameters there.
    Select the [Empty] value for each parameter and fill out the value you want.
    Hope this would help.

Maybe you are looking for