Using DB Link for SQL Server

Hi All,
When I query the SQL server table from Oracle using DB Link, it works fine for any table:
select * from testtable@DBLINK test -- This statement works fine because I am giving * i.e. all columns
But when I try to query specific columns like
Select test.status from testtable@DBLINK test
then it gives me error ORA-00904: "test.Status invalid Identifier", I can see this particular column when I query the testtable for all of the columns.
I don't know what to do.
Thanks

You need to use quoted names. SQL Server data dictionary stores names in same case they were entered while Oracle in upper case. So when you issue
Select test.status from testtable@DBLINK test Oracle parser will look for column STATUS while on SQL Server side it could be stored, for examle, as Status or status. Check column names on SQL Server side and use quoted names. Assuming column name is Status:
Select test."Status" from testtable@DBLINK test SY.

Similar Messages

  • Can't select char type columns using ODBC link to SQL Server 2K

    I have set up a db link using hsodbc from 8.1.7 to SQL Server 2000. I can select numeric and date columns from the
    SQL Server table with no problem. But any character datatype (nchar or nvchar) column name included in the query
    returns an ORA-00904 ("invalid column name"). I know the column names are valid for SQL Server and can access
    these columns via EXCEL using the same user id and data source that is used for the link. I don't have a clue as to why ORACLE can't "see" the character type columns. Following is the hs trace file (HS_FDS_TRACE_LEVEL = debug) generated for "select assay_name from bio_assay@sqlsrvl":
    FRIDAY SEP 05 2003 10:39:47.674
    (0) hoagprd(2); Entered.
    (0) [Generic Connectivity Using ODBC] version: 2.0.4.0.0010
    (0) connect string is:
    (0) YEAR2000_POLICY=-1;CTL_DEBUG=T;CONSUMER_API=1;SESSION_BEHAVIOR_FLAGS=4;PARSER_-
    (0) DEPTH=2000;EXEC_FLAGS =
    (0) 131080;defTdpName=SQLSRVL;binding=(SQLSRVL,ODBC,"LIBERTY");
    (0) ORACLE GENERIC GATEWAY Log File Started at 05-Sep-03 10:39:47
    (0) Class version: 65
    (0) hoagprd(2); Exited with retcode = 0.
    (0) hoainit(3); Entered.
    (0) hoainit(3); Exited with retcode = 0.
    (0) hoalgon(7); Entered. name = XXXXXXXXXXX.
    (0) Created new ODBC connection (28382608)
    (0) Silent DB Function!!
    (0) (Last message occurred 4 times)
    (0) hoalgon(7); Exited with retcode = 0.
    (0) hoaulcp(4); Entered.
    (0) hoaulcp(4); Exited with retcode = 0.
    (0) hoauldt(5); Entered.
    (0) hoauldt(5); Exited with retcode = 0.
    (0) hoabegn(9); Entered. formatID = 306206, hoagttid
    (0) =XXXXXXXXXXXXXXXXXXXXXXXX, hoagtbid = , tflag = 0, initial = 1
    (0) hoabegn(9); Exited with retcode = 0.
    (0) hoapars(15); Entered. stmtType = 0, id = 1.
    (0) nvOUT (P:\Src\QP\QP_SQTXT.C 55): SELECT * FROM "BIO_ASSAY"
    (0) odbc_rec: select * from "BIO_ASSAY"
    (0) Silent DB Function!!
    (0) nvOUT (P:\Src\QP\QPT2SEXE.C 929):
    (0) SELECT "T0000"."WH_ADDED_DATE" AS c00010, "T0000"."ASSAY_MODIFIED_TIME" AS c0009, "T0000"."ASSAY_CREATED_TIME" AS c0008, "T0000"."ASSAY_DATE_COMPLETED" AS c0007, "T0000"."ASSAY_DATE_PLANNED" AS c0006, "T0000"."ASSAY_DATE_STARTED" AS c0005, "T0000"."ASSAY_STATUS_NO" AS c0004, "T0000"."TIMEFRAME_KEY" AS c0003, "T0000"."TARGET_KEY" AS c0002, "T0000"."ENVIRONMENT_KEY" AS c0001, "T0000"."ASSAY_KEY" AS c0000 FROM "BIO_ASSAY" T0000
    (0) nvOUT (P:\Src\QP\QPT2SEXE.C 932):
    (0) <<<<<<<<<<<<<<<<<<< Execution Strategy Begin <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    (0) Original SQL:
    (0) SELECT * FROM "BIO_ASSAY"
    (0)
    (0)
    (0) Accessing Database "SQLSRVL" with SQL:
    (0) SELECT "T0000"."WH_ADDED_DATE" AS c00010, "T0000"."ASSAY_MODIFIED_TIME" AS c0009, "T0000"."ASSAY_CREATED_TIME" AS c0008, "T0000"."ASSAY_DATE_COMPLETED" AS c0007, "T0000"."ASSAY_DATE_PLANNED" AS c0006, "T0000"."ASSAY_DATE_STARTED" AS c0005, "T0000"."ASSAY_STATUS_NO" AS c0004, "T0000"."TIMEFRAME_KEY" AS c0003, "T0000"."TARGET_KEY" AS c0002, "T0000"."ENVIRONMENT_KEY" AS c0001, "T0000"."ASSAY_KEY" AS c0000 FROM "BIO_ASSAY" T0000
    (0)
    (0)
    Execution Strategy End >>>>>>>>>>>>>>>>>>>>>>>>>>>>(0) hoapars(15); Exited with retcode = 0.
    (0) hoaopen(19); Entered. id = 1.
    (0) hoaopen(19); Exited with retcode = 0.
    (0) hoadscr(16); Entered. id = 1.
    (0) hoastmt(195); Array fetch size is: 1.
    (0) ------ hoadscr() -------:
    (0) hoadamsz: 11, hoadasiz: 11, hoadambr: 1, hoadabrc: 1
    (0) row 0 - hoadambl: 20, hoadadty: 134, hoadaprc: 19, hoadacst: 0
    (0) row 0 - hoadascl: 0, hoadanul: 0, hoadanml: 9, hoadanam: ASSAY_KEY, hoadabfl:
    (0) 20, hoadamod: 0
    (0) row 1 - hoadambl: 20, hoadadty: 134, hoadaprc: 19, hoadacst: 0
    (0) row 1 - hoadascl: 0, hoadanul: 0, hoadanml: 15, hoadanam: ENVIRONMENT_KEY,
    (0) hoadabfl: 20, hoadamod: 0
    (0) row 2 - hoadambl: 20, hoadadty: 134, hoadaprc: 19, hoadacst: 0
    (0) row 2 - hoadascl: 0, hoadanul: 1, hoadanml: 10, hoadanam: TARGET_KEY,
    (0) hoadabfl: 20, hoadamod: 0
    (0) row 3 - hoadambl: 20, hoadadty: 134, hoadaprc: 19, hoadacst: 0
    (0) row 3 - hoadascl: 0, hoadanul: 0, hoadanml: 13, hoadanam: TIMEFRAME_KEY,
    (0) hoadabfl: 20, hoadamod: 0
    (0) row 4 - hoadambl: 2, hoadadty: 7, hoadaprc: 5, hoadacst: 0
    (0) row 4 - hoadascl: 0, hoadanul: 1, hoadanml: 15, hoadanam: ASSAY_STATUS_NO,
    (0) hoadabfl: 2, hoadamod: 0
    (0) row 5 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst: 0
    (0) row 5 - hoadascl: 0, hoadanul: 1, hoadanml: 18, hoadanam: ASSAY_DATE_STARTED,
    (0) hoadabfl: 7, hoadamod: 0
    (0) row 6 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst: 0
    (0) row 6 - hoadascl: 0, hoadanul: 1, hoadanml: 18, hoadanam: ASSAY_DATE_PLANNED,
    (0) hoadabfl: 7, hoadamod: 0
    (0) row 7 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst: 0
    (0) row 7 - hoadascl: 0, hoadanul: 1, hoadanml: 20, hoadanam:
    (0) ASSAY_DATE_COMPLETED, hoadabfl: 7, hoadamod: 0
    (0) row 8 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst: 0
    (0) row 8 - hoadascl: 0, hoadanul: 0, hoadanml: 18, hoadanam: ASSAY_CREATED_TIME,
    (0) hoadabfl: 7, hoadamod: 0
    (0) row 9 - hoadambl: 7, hoadadty: 167, hoadaprc: 0, hoadacst: 0
    (0) row 9 - hoadascl: 0, hoadanul: 1, hoadanml: 19, hoadanam: ASSAY_MODIFIED_TIME,
    (0) hoadabfl: 7, hoadamod: 0
    (0) row 10 - hoadambl: 0, hoadadty: 0, hoadaprc: 0, hoadacst: 0
    (0) row 10 - hoadascl: 0, hoadanul: 0, hoadanml: 13, hoadanam: WH_ADDED_DATE,
    (0) hoadabfl: 0, hoadamod: 0
    (0) hoadscr(16); Exited with retcode = 0.
    Note, the query I entered doesn't appear and I never entered the query "select * from bio_assay" - it appears that this is
    automatically generated by the hsodbc process and raises other questions (like wouldn't this return a lot of unneeded
    data ?). It also appears that the "select * from bio_assay" gets translated somehow into a select statement listing each column - however, non of the columns listed are character type columns like assay_name.
    Does this make sense to anyone? Any ideas ? HELP !

    Remote view gives the same error. I think the problem has to do with nchar and nvchar fields. It seems that the hsodbc agent issues a "select * from bio_assay" at the beginning of the session (see above trace).
    0) odbc_rec: select * from "BIO_ASSAY"
    (0) Silent DB Function!!
    (0) nvOUT (P:\Src\QP\QPT2SEXE.C 929):
    (0) SELECT "T0000"."WH_ADDED_DATE" AS c00010, "T0000"."ASSAY_MODIFIED_TIME" AS c0009, "T0000"."ASSAY_CREATED_TIME" AS c0008, "T0000"."ASSAY_DATE_COMPLETED" AS c0007, "T0000"."ASSAY_DATE_PLANNED" AS c0006, "T0000"."ASSAY_DATE_STARTED" AS c0005, "T0000"."ASSAY_STATUS_NO" AS c0004, "T0000"."TIMEFRAME_KEY" AS c0003, "T0000"."TARGET_KEY" AS c0002, "T0000"."ENVIRONMENT_KEY" AS c0001, "T0000"."ASSAY_KEY" AS c0000 FROM "BIO_ASSAY" T0000
    Apparently, the list of fields that is returned from the "select *" does not include any of the nchar or nvchar type columns. After this initial "select *" the oracle server only looks at the initial list of columns and gives an "invalid column" error for any fields that are not in this initial list. So the question is: how do I make the hsodbc agent see the nchar/nvchar type fields and include them in the initial list ? I've tried setting the HS_NLS_LANGUAGE and HS_NLS_NCHAR parameters but these seem to have no effect.
    Any clue as to what's going on ?

  • Error during DatabaseCopy using SAP tools for SQL Server (v7.12)

    I'm trying to perform a system copy from PRD to QAS.  The database has been mounted to QAS via detach and attach method.  I did a DBCC on the database and everything looks OK.  I'm running SAPINST (SAP Tools for MSSQL) and selecting the Database Copy option.  The source database has a schema of DBO.  Both PRD and QAS are running SAP 4.7/Basis 620.  The target schema is QAS.  SAPINST fails in step 2 (Define Params) with:
    "This service cannot be used for a system with SAP ABAP release 620"
    Is this message misleading?  Has anyone receive this message before.
    UPDATE:
    I donwloaded the latest version of SAP Tools for MSSQL and now it failes during the execution phase on step, "Convert DB objects to new schema".
    Here is the log:
    Process environment
    ===================
    Environment Variables
    =====================
      =::=::\
      =C:=C:\Program Files\sapinst_instdir\MSS\CPY
      ALLUSERSPROFILE=C:\Documents and Settings\All Users
      APPDATA=C:\Documents and Settings\r3tadm.STAG\Application Data
      CLIENTNAME=TRAIMONOTEBOOK
      ClusterLog=C:\WINDOWS\Cluster\cluster.log
      CommonProgramFiles=C:\Program Files\Common Files
      COMPUTERNAME=STAG
      ComSpec=C:\WINDOWS\system32\cmd.exe
      DBMS_TYPE=MSS
      FP_NO_HOST_CHECK=NO
      HOMEDRIVE=C:
      HOMEPATH=\Documents and Settings\r3tadm.STAG
      LOGONSERVER=
    STAG
      MSSQL_DBNAME=R3T
      MSSQL_SERVER=stag
      NUMBER_OF_PROCESSORS=4
      OS=Windows_NT
      Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Dell\SysMgt\RAC5;C:\Program Files\Dell\SysMgt\oma\bin;C:\Program Files\Dell\SysMgt\oma\oldiags\bin;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\usr\sap\R3T\SYS\exe\run
      PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
      PROCESSOR_ARCHITECTURE=x86
      PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 6, GenuineIntel
      PROCESSOR_LEVEL=6
      PROCESSOR_REVISION=0f06
      ProgramFiles=C:\Program Files
      SAPINST_EXEDIR_CD=C:/STM/I386
      SAPINST_JRE_HOME=C:/WINDOWS/TEMP/3/sapinst_exe.3012.1234409473/jre
      SAPLOCALHOST=stag
      SESSIONNAME=RDP-Tcp#25
      SystemDrive=C:
      SystemRoot=C:\WINDOWS
      TEMP=C:\WINDOWS\TEMP\3
      TMP=C:\WINDOWS\TEMP\3
      USERDOMAIN=STAG
      USERNAME=r3tadm
      USERPROFILE=C:\Documents and Settings\r3tadm.STAG
      windir=C:\WINDOWS
    User: STAG\r3tadm, Id: S-1-5-21-2727398557-1322528747-1943968026-1019
    Working directory: C:/Program Files/sapinst_instdir/MSS/CPY
    Current access token
    ====================
    Could not get thread token. Last error: 1008. I assume that no thread token exists.
    Got process token.
    Privileges:
      Privilege SeBackupPrivilege, display name: Back up files and directories, not enabled.
      Privilege SeRestorePrivilege, display name: Restore files and directories, not enabled.
      Privilege SeShutdownPrivilege, display name: Shut down the system, not enabled.
      Privilege SeDebugPrivilege, display name: Debug programs, not enabled.
      Privilege SeAssignPrimaryTokenPrivilege, display name: Replace a process level token, not enabled.
      Privilege SeSystemEnvironmentPrivilege, display name: Modify firmware environment values, not enabled.
      Privilege SeIncreaseQuotaPrivilege, display name: Adjust memory quotas for a process, not enabled.
      Privilege SeChangeNotifyPrivilege, display name: Bypass traverse checking, enabled.
      Privilege SeRemoteShutdownPrivilege, display name: Force shutdown from a remote system, not enabled.
      Privilege SeTcbPrivilege, display name: Act as part of the operating system, not enabled.
      Privilege SeUndockPrivilege, display name: Remove computer from docking station, not enabled.
      Privilege SeSecurityPrivilege, display name: Manage auditing and security log, not enabled.
      Privilege SeTakeOwnershipPrivilege, display name: Take ownership of files or other objects, not enabled.
      Privilege SeLoadDriverPrivilege, display name: Load and unload device drivers, not enabled.
      Privilege SeManageVolumePrivilege, display name: Perform volume maintenance tasks, not enabled.
      Privilege SeSystemProfilePrivilege, display name: Profile system performance, not enabled.
      Privilege SeImpersonatePrivilege, display name: Impersonate a client after authentication, enabled.
      Privilege SeSystemtimePrivilege, display name: Change the system time, not enabled.
      Privilege SeCreateGlobalPrivilege, display name: Create global objects, enabled.
      Privilege SeProfileSingleProcessPrivilege, display name: Profile single process, not enabled.
      Privilege SeIncreaseBasePriorityPrivilege, display name: Increase scheduling priority, not enabled.
      Privilege SeCreatePagefilePrivilege, display name: Create a pagefile, not enabled.
    Groups:
    Group count: 14
      \LOCAL S-1-2-0 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      BUILTIN\Administrators S-1-5-32-544 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED SE_GROUP_OWNER
      \Everyone S-1-1-0 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      BUILTIN\Users S-1-5-32-545 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      STAG\SAP_R3T_LocalAdmin S-1-5-21-2727398557-1322528747-1943968026-1021 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      STAG\SAP_LocalAdmin S-1-5-21-2727398557-1322528747-1943968026-1023 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      STAG\None S-1-5-21-2727398557-1322528747-1943968026-513 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      NT AUTHORITY\INTERACTIVE S-1-5-4 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      NT AUTHORITY\NTLM Authentication S-1-5-64-10 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      NT AUTHORITY\Authenticated Users S-1-5-11 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      \ S-1-5-5-0-36828865 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED SE_GROUP_LOGON_ID
      NT AUTHORITY\REMOTE INTERACTIVE LOGON S-1-5-14 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      NT AUTHORITY\This Organization S-1-5-15 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
      STAG\SAP_R3T_GlobalAdmin S-1-5-21-2727398557-1322528747-1943968026-1018 Attributes: SE_GROUP_MANDATORY SE_GROUP_ENABLED_BY_DEFAULT SE_GROUP_ENABLED
    ERROR      2009-02-11 19:31:46.529 [sixxcstepexecute.cpp:984]
    FCO-00011  The step MoveSchema with step key |SAPMSSTOOLS|ind|ind|ind|ind|0|0|MssSysCopy|ind|ind|ind|ind|4|0|MssSchemaMove|ind|ind|ind|ind|2|0|MoveSchema was executed with status ERROR .
    TRACE      2009-02-11 19:31:46.544
      Call block:CallBackInCaseOfAnErrorDuringStepExecution
        function:CallTheLogInquirer
    is validator: true
    WARNING    2009-02-11 19:31:46.544 [iaxxejshlp.cpp:150]
    Could not get property IDs of the JavaScript object.
    ERROR      2009-02-11 19:31:46.544 [iaxxejsctl.cpp:492]
    FJS-00010  Could not get value for property .
    TRACE      2009-02-11 19:31:46.544
    A problem occurs during execution the inquirer callback. SAPinst will switch back to the standard behaiviour.
    TRACE      2009-02-11 19:31:46.544 [iaxxgenimp.cpp:707]
                CGuiEngineImp::showMessageBox
    <html> <head> </head> <body> <p> An error occurred while processing service SAP Toools for MS SQL Server > Database Copy. You may now </p> <ul> <li> choose <i>Retry</i> to repeat the current step. </li> <li> choose <i>View Log</i> to get more information about the error. </li> <li> stop the task and continue with it later. </li> </ul> <p> Log files are written to C:\Program Files/sapinst_instdir/MSS/CPY. </p> </body></html>
    TRACE      2009-02-11 19:31:46.544 [iaxxgenimp.cpp:1245]
               CGuiEngineImp::acceptAnswerForBlockingRequest
    Waiting for an answer from GUI
    Edited by: Tony Raimo on Feb 12, 2009 4:37 AM

    This is looks like permission issue on source folder
    Copy source in to your local drive and try again.
    I had same issue and able to resolve after copy EXP1 EXP2 and EXP3 folder in to local drive C: with Everyone full access
    Yogesh

  • How to use evaluate function for sql server function

    Hi Team,
    We have imported a column(date dtat type) from SQL server cube . By default it imported as varchar,. We have three option in physical layer for this column(Varchar,Intiger,unknown)
    So we want to convert this column into date.can we use evaluate or there is any option to do that.?

    Hi,
    I am not sure your requirement. But how pass evaluate function obiee?
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'satya ranki reddy') gives the result as -> SATYA RANKI REDDY
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Hope this help's
    Thanks
    Satya

  • VersioningError when Using JDBC driver for SQL Server with RMI

    Hi,
    I wrote a simple class for inserting rows into a database. The database is SQL Server 2000, and I am using weblogic's mssqlserver4 driver. The class works fine, but when I try to export the class as a remote object (using Sun's RMI implementation, not Weblogic RMI), I get the following error:
    Exception in thread "main" weblogic.common.internal.VersioningError: No WebLogic packages defined in CLASSPATH at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:35) at weblogic.version.<clinit>(version.java:18)
    at weblogic.jdbc.common.internal.FileProxy.initFileHandles(FileProxy.java:30) at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:215)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34) at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171)
    Can anyone tell me why this happens? What is difference between using the driver standalone and using it with RMI? Does it have anything to do with the fact that I'm using Javasoft RMI and not Weblogic RMI? I'm pretty sure I have the classpaths set up correctly.
    Thanks,
    Bo

    Bo Min Jiang wrote:
    Hi,
    I wrote a simple class for inserting rows into a database. The database is SQL Server 2000, and I am using weblogic's mssqlserver4 driver. The class works fine, but when I try to export the class as a remote object (using Sun's RMI implementation, not Weblogic RMI), I get the following error:
    Exception in thread "main" weblogic.common.internal.VersioningError: No WebLogic packages defined in CLASSPATH at weblogic.common.internal.VersionInfo.<init>(VersionInfo.java:35) at weblogic.version.<clinit>(version.java:18)
    at weblogic.jdbc.common.internal.FileProxy.initFileHandles(FileProxy.java:30) at weblogic.jdbc.mssqlserver4.BaseConnection.prepareConnection(BaseConnection.java:215)
    at weblogic.jdbc.mssqlserver4.Driver.newConnection(Driver.java:34) at weblogic.jdbc.mssqlserver4.ConnectDriver.connect(ConnectDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171)
    Can anyone tell me why this happens? What is difference between using the driver standalone and using it with RMI? Does it have anything to do with the fact that I'm using Javasoft RMI and not Weblogic RMI? I'm pretty sure I have the classpaths set up correctly.
    Thanks,
    BoHi. Show me the whole stacktrace of the exception. The issue seems to be the driver licensing
    code, which is looking for the bea.license file, and not finding it. Have your code run a System command
    to find and print out the classpath it thinks is in effect. You will then see if the license file is there.
    Joe

  • Use rptproj SSRS for SQL Server 2008R2 in VS 2010 (and/or VS 2012 better(

    In my company, I use VS 2008 and SQLServer 2008R2, and I have rptproj projects in VS 2008.
    The rptproj project has several rdl files.
    I would like use VS 2010 or VS 2012 with SSRS and SQLServer 2008R2.
    SSDT, which was introduced with SQL Server 2012. I suggest not possible migration rpt projects in VS 2008 to VS 2010 / VS 2012
    Any alternative solution to do it ?
    I have seen, but I'm confused it
    http://stackoverflow.com/questions/12503976/how-to-edit-ssrs-2008r2-reports-in-visual-studio-2012/16112721#16112721
    Iko says
    You can now use Visual Studio 2010 to edit .rtproj report projects and .rdl reports.
    You need VS10 SP1, then install the Data Tools for VS10, followed by the installation of SQL Server Express 2012 with Reporting Services and Data Tools.
    Reference: http://stackoverflow.com/a/14599850/206730
    But I'm confused about it.
    www.kiquenet.com/profesional

    Hi Kiquenet,
    According to your description, you installed VS 2008 and SQL Server 2008 R2, and create Reporting Services projects. Now you want to use VS 2010 or VS 2012 to open and manage the reports.
    SQL Server Data Tools - Business Intelligence for Visual Studio 2012 supports versions of SQL Server 2012 or lower, we can directly download Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012 from
    https://www.microsoft.com/en-us/download/details.aspx?id=36843, then select SQL Server Data Tools - Business Intelligence for Visual Studio 2012 and SQL Client Connectivity SDK as
    new shard features to install.
    We can open the projects in both Visual Studio 2012 and Visual Studio 2010. For local mode only (that is, when not connected to SQL Server), we won’t get the design-time experience for controls that are associated with the viewer in Visual Studio 2008, but
    the project will function correctly at runtime. If we add a feature that’s specific to Visual Studio 2012, the report schema is upgraded automatically and you can no longer open the project in Visual Studio 2008.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • DATABASE LINK FOR SQL SERVER

    Hi all,
    We are running SAP 4.7C with oracle database.  For other oracle (non-sap) we are using DBCO to get/put data.  Now we have to do the same in SQL server also. In addition to SAP standard table we are sending data of customer table (Z & Y series).  Can anybody guide me how to send / receive data using bapi/rfc or some other method.
    regards
    balakumar

    Hi!
    For using native-SQL with MSSQL database you have to make your database requests from application server resides on windows platform. So, your basis people have to set up one more windows-based application server instance. There is no impact on backend R/3 database.
    Regards,
    Maxim.

  • Using JSP & JDBC driver for SQL Server 2000 on Red Hat

    I successfully have a .jsp app running on windows server 2000 using JDBC
    driver for SQL Server 2000. Which I installed in order to the following
    Red Hat:
    http://msdn.microsoft.com/MSDN-FILES/027/001/779/install.htm
    I moved the .jsp app over to the Red Hat 9 server running Tomcat, while
    keeping the MS SQL 2000 on windows. The issue I have is setting up the
    JDBC driver for SQL Server 2000 on the Red Hat server.
    I created a folder called /usr/java/MSSQLdriver and unzipped the tar file with
    the driver for SQL Server 2000. And ran the install.ksh script.
    The /usr/java/MSSQLdriver/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    I chmod 0777 each of the *.jar files.
    I then went into /etc/profile.d/tomcat.sh and adding the following:
    CLASSPATH=.;/opt/msSQLjdbc/lib/msbase.jar;/opt/msSQLjdbc/lib/msutil.jar;/opt/msSQLjdbc/lib/mssqlserver.jar
    Each time I login and pull up the termial I get the following error:
    bash: /opt/msSQLjdbc/lib/msbase.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/msutil.jar: cannot execute binary file
    bash: /opt/msSQLjdbc/lib/mssqlserver.jar: cannot execute binary file
    And can't connnect to the database within the .jsp app.
    Is there anyone out there using DBC driver for SQL Server 2000 on the Red Hat server?
    Michael

    Sorry, I needed to correct some information of where the drivers were installed.
    I created a folder called /usr/java/MSSQLdriver/new and untar the Microsoft file with the driver for SQL Server 2000. I ran the install.ksh script "sh install.ksh"
    installed the driver into the default directory "/opt/msSQLjdbc".
    The /opt/msSQLjdbc/lib has the following files within it:
    msbase.jar, msutil.jar, & mssqlserver.jar
    Michael

  • Specifying Partner Failover in odbc.ini for Linux ODBC driver for SQL Server

    Hi,
    We are trying to specify the partner failover when making connections via Linux ODBC driver for SQL Server. Do you know a way to specify partner failover in the DSN entry in odbc.ini? 
    We are using Linux ODBC driver for SQL Server and unixODBC DriverManager.
    Our DSN is:
    [MyDSN]
    Driver=ODBC Driver 11 for SQL Server
    Description=MyDSN
    Server=MySERVER,<port>
    I also tried to use the following connection string in Python (via pyodbc) bypassing the DSN and connecting using the server name.
    cnxn = pyodbc.connect("Server=server1,<port>;UID=sa;PWD=<pwd>;Driver=ODBC Driver 11 for SQL Server;Failover_Partner=Server2,<port2>;Database=MyDB")
    If the standby DB is on server1 connection fails. It doesn't try server2. If the DB is principal on server1 connection succeeds.
    Thank you,
     Liviu
    LLL

    Hello,
    Did you use ODBC Driver for SQL Server to connect to database that uses database mirroring?
    According to
    the BOL,it does not list "Failover_Partner" as ODBC Driver for Linux connection string keywords.
    But ODBC driver for Linux supports
    AlwaysOn Availability Groups or Failover Cluster Instance by specify MultiSubnetFailover=True when connecting to a SQL Server 2012 availability group listener or SQL Server 2012 Failover Cluster Instance.
    The following case is about similar issue and it seems that ODBC Driver on Linux does not recognize Failover_Partner in connection string. (Not test myself).You can refer to:
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/6a8b5223-066d-4493-84a3-b5374a32e433/native-client-on-linux-does-not-recognize-failoverpartner-in-connection-string?forum=sqldataaccess
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Why can't i use "INNER JOIN" in a query for SQL Server with JDBC??????

    Hi,
    I'm trying to execute some SQL queries and I just don't understand what's wrong.
    I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
    I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
    Error occurs when executeQuery() is called.... not prepareStatement().... ??????
    Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
    Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
    PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
    ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
    So much tahnks in advance,

    That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
    Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
    I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
    ( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
    thanks for reply.

  • 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]

  • Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?

    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
    driver.I try viewing the class file from the jar file using the jar utility it
    gives an unknown Zip format error.Anybody has any solution for this ?If anybody
    has managed to work with this microsoft driver i will be grateful if they provide
    me with a solution.
    Thanks
    Thomas

    Hello Thomas,
    You may want to download the driver again and install it again.
    heres a sample xml tag in the config.xml:
    <JDBCConnectionPool
    DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    InitialCapacity="3" MaxCapacity="12" Name="MSpool"
    Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
    Targets="myserver"
    URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
    ensure that you follow the instructions from Microsoft. For using 2000
    driver you will need to have
    Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
    Install_dir/lib/mssqlserver.jar in the CLASSPATH.
    hth
    sree
    "Thomas" <[email protected]> wrote in message
    news:3c91ec0e$[email protected]..
    Hi,
    Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
    the
    microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
    the
    driver.I try viewing the class file from the jar file using the jar utility
    it
    gives an unknown Zip format error.Anybody has any solution for this ?If
    anybody
    has managed to work with this microsoft driver i will be grateful if they
    provide
    me with a solution.
    Thanks
    Thomas

  • Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database"

    Hi, Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database" ?
    When I use Connect Object Explorer, the "Connect to Server" dialog box which pops up has only 4 selections in the Server Type Drop Down List. They are Database Engine, Analysis Services, Reporting Services & Integration Services. I have read
    somewhere that there should be a compact database option. but I do not see it.
    What I would like to do is use free form SQL Queries against the tables in "SQL Server Compact 4.0 Local Database" .
    Once I have validated these queries, then I will use them in my Visual Studio 2012 C#, ASP.NET application. I created the Local Database using Visual Studio 2012 for use by my application.
    Thank you for your help..
    diana4

    Hello,
    With SSMS 2005 we have had the Option to work with SQL CE database files, but not with higher Version of SSMS.
    You can use the free SQL CE Toolbax instead; see
    http://sqlcetoolbox.codeplex.com/
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Using SQLBindParameter, SQLPrepare and SQLExecute to insert a Decimal(5,3) type fails with SQLSTATE: 22003 using ODBC Driver 11 for SQL Server

    Hello everyone.
    I'm using SQL Server 2014, and writting on some C++ app to query and modify the database. I use the ODBC API.
    I'm stuck on inserting an SQL_NUMERIC_STRUCT value into the database, if the corresponding database-column has a scale set.
    For test-purposes: I have a Table named 'decTable' that has a column 'id' (integer) and a column 'dec' (decimal(5,3))
    In the code I basically do:
    1. Connect to the DB, get the handles, etc.
    2. Use SQLBindParameter to bind a SQL_NUMERIC_STRUCT to a query with parameter markers. Note that I do include the information about precision and scale, something like: SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr,
    sizeof(cbNum), &cbNum);
    3. Prepare a Statement to insert values, something like: SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
    4. Set some valid data on the SQL_NUMERIC_STRUCT
    5. Call SQLExecute to execute. But now I get the error:
    SQLSTATE: 22003; nativeErr: 0 Msg: [Microsoft][ODBC Driver 11 for SQL Server]Numeric value out of range
    I dont get it what I am doing wrong. The same code works fine against IBM DB2 and MySql. I also have no problems reading a SQL_NUMERIC_STRUCT using SQLBindCol(..) and the various SQLSetDescField to define the scale and precision.
    Is there a problem in the ODBC Driver of the SQL Server 2014?
    For completeness, here is a working c++ example:
    // InsertNumTest.cpp
    // create database using:
    create a table decTable with an id and a decimal(5,3) column:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE[dbo].[decTable](
    [id][int] NOT NULL,
    [dec][decimal](5, 3) NULL,
    CONSTRAINT[PK_decTable] PRIMARY KEY CLUSTERED
    [id] ASC
    )WITH(PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON[PRIMARY]
    ) ON[PRIMARY]
    GO
    // Then create an odbc DSN entry that can be used:
    #define DSN L"exOdbc_SqlServer_2014"
    #define USER L"exodbc"
    #define PASS L"testexodbc"
    // system
    #include <iostream>
    #include <tchar.h>
    #include <windows.h>
    // odbc-things
    #include <sql.h>
    #include <sqlext.h>
    #include <sqlucode.h>
    void printErrors(SQLSMALLINT handleType, SQLHANDLE h)
        SQLSMALLINT recNr = 1;
        SQLRETURN ret = SQL_SUCCESS;
        SQLSMALLINT cb = 0;
        SQLWCHAR sqlState[5 + 1];
        SQLINTEGER nativeErr;
        SQLWCHAR msg[SQL_MAX_MESSAGE_LENGTH + 1];
        while (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
            msg[0] = 0;
            ret = SQLGetDiagRec(handleType, h, recNr, sqlState, &nativeErr, msg, SQL_MAX_MESSAGE_LENGTH + 1, &cb);
            if (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO)
                std::wcout << L"SQLSTATE: " << sqlState << L"; nativeErr: " << nativeErr << L" Msg: " << msg << std::endl;
            ++recNr;
    void printErrorsAndAbort(SQLSMALLINT handleType, SQLHANDLE h)
        printErrors(handleType, h);
        getchar();
        abort();
    int _tmain(int argc, _TCHAR* argv[])
        SQLHENV henv = SQL_NULL_HENV;
        SQLHDBC hdbc = SQL_NULL_HDBC;
        SQLHSTMT hstmt = SQL_NULL_HSTMT;
        SQLHDESC hdesc = SQL_NULL_HDESC;
        SQLRETURN ret = 0;
        // Connect to DB
        ret = SQLAllocHandle(SQL_HANDLE_ENV, NULL, &henv);
        ret = SQLSetEnvAttr(henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER);
        ret = SQLAllocHandle(SQL_HANDLE_DBC, henv, &hdbc);
        ret = SQLConnect(hdbc, (SQLWCHAR*)DSN, SQL_NTS, USER, SQL_NTS, PASS, SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrors(SQL_HANDLE_DBC, hdbc);
            getchar();
            return -1;
        ret = SQLAllocHandle(SQL_HANDLE_STMT, hdbc, &hstmt);
        // Bind id as parameter
        SQLINTEGER id = 0;
        SQLINTEGER cbId = 0;
        ret = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SLONG, SQL_INTEGER, 0, 0, &id, sizeof(id), &cbId);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Bind numStr as Insert-parameter
        SQL_NUMERIC_STRUCT numStr;
        ZeroMemory(&numStr, sizeof(numStr));
        SQLINTEGER cbNum = 0;
        ret = SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_NUMERIC, SQL_NUMERIC, 5, 3, &numStr, sizeof(cbNum), &cbNum);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Prepare statement
        ret = SQLPrepare(hstmt, L"INSERT INTO decTable (id, dec) values(?, ?)", SQL_NTS);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        // Set some data and execute
        id = 1;
        SQLINTEGER iVal = 12345;
        memcpy(numStr.val, &iVal, sizeof(iVal));
        numStr.precision = 5;
        numStr.scale = 3;
        numStr.sign = 1;
        ret = SQLExecute(hstmt);
        if (!SQL_SUCCEEDED(ret))
            printErrorsAndAbort(SQL_HANDLE_STMT, hstmt);
        getchar();
        return 0;

    This post might help:
    http://msdn.developer-works.com/article/12639498/SQL_C_NUMERIC+data+incorrect+after+insert
    If this is no solution try increasing the decimale number on the SQL server table, if you stille have the same problem after that change the column to a nvarchar and see the actual value that is put through the ODBC connector for SQL.

  • This driver is locked for use with embedded applications - SQL Server

    Hello guys,
    Background:
    I developed an application using JSC2 with MS SQL Server 2000 as the database and Sun Application Server PE 8 as App Server. During development, I am able to deploy and test it. But as soon as I've installed Sun Application Server PE 8 on our Production Server, exported my app there and tried to execute it, I get the error
    "This driver is locked for use with embedded applications".
    I just wanna ask, though I've seen other threads saying that the only solution is to buy the EE or SE of Sun App Server, isn't there really any work-around with this?
    Thanks very much for your help.

    OK, that is the same setup we have (Creator built application running with MS SQL Server).
    I wrote a tutorial talking about integrating Creator with Spring. In it you will find out how to use SQL Server with a Creator built app running on the Platform Edition. That tutorial can be found here: http://swforum.sun.com/jive/thread.jspa?threadID=52657&tstart=15
    In short, look to jTds.
    Hope this helps.

Maybe you are looking for