Issue with connecting to SQL Server Database in 11g
Hi
We successfully created odbc connection say "Test" to read SQL Server database using odbc admin.The issue we are facing in 11g is, we are unable to import tables using the database connection "Test" in to Admin tool.
In 10g we did not come across this issue. We used the same credentials and process incase of 10g and 11g to read SQL Server database, but we are facing the connection issues incase of 11g.
Please, let us know is there any change need to be done to any config files or is there any way to overcome this issue.
Thanks.
Hi,
What do you mean by 'we are unable to import tables using the database connection'
Do you get an error message or the connection fails or what
Please add the details about the issue in order to help
Regards
Adil
Similar Messages
-
Cannot connect to SQL Server databases
All of a sudden I can't connect to SQL server databases from
my local machine. The databases are on a web server. It just
started happening, and I never had a problem with it before. I
can't connect to them in the coldfusion administrator, and I can't
connect to them using ODBC DSN's either. Has anyone ever run into
this before? I didn't change anything in the cf admin, and I
certainly didn't change any logins or passwords in SQL
Server.I've been experiencing a similar problem. Everything was fine
but I had to reboot CF 8.01.
After the reboot all the datasources are very slow to respond
and we get lots of errors of the form :
Timed out trying to establish connection
A non-SQL error occurred while requesting a connection from
blah
Timed out trying to establish connection
A non-SQL error occurred while requesting a connection from
blah
Everything is working but very slow on database queries. This
happened a couple of months ago when we last
rebooted and then it went away.
Going to have a look for a new JDBC driver from adobe and see
if that helps .... -
Unable to connect to sql server database
i run on CMD:
aspnet_regsql -C "Data Source =Davidchamoun/sqlexpress : intergrated security= true" -ssadd -sstype p
i got
a network-related or instance-specific error occurred while establishing a connection to sql server. the server
was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections. (provider: SQL Network interfaces . error: 25 – connection string is not valid
unable to connect to sql server database.
im using sql sever 2012 express, microsoft visual studio web 2008 express.
please help me.i run it as :
aspnet_regsql -C "Data Source =Davidchamoun\sqlexpress : integrated security= true" -ssadd -sstype p
i got the same error :
an error has occurred . details of the exception:
a
network-related or instance-specific error occurred while establishing a connection to sql server. the server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections. (provider:
SQL Network interfaces . error: 25 – connection string is not valid
unable to connect to sql server database.
im using also windows 8.1
pls help me
ty for ur reply -
Please compare
methods in C # to connect to SQL Server
database (for example,
3-tier architecture of traditional and
entity Framework(linq to entity or linq to sql object model)
and Linq to SQL) in terms of speed, quality and functionality
to give me tips.
Thank you.
Mojtaba Malakouti.That means we need to compare and post the results here?
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
SAP ECC6.0 cannot connect to SQL Server Database after recreating DB server
We had a disaster with our ECC 6.0 Development system a few days ago. The system is called “DEV”. The SQL Server database server got wiped out and we didn’t have a backup. Luckily, we did have a backup of the database. Our system engineers rebuilt the server and our DBA reinstalled SQL Server and restored the database. The database came up fine, but when we try to start SAP, it fails. “R3trans –d” also fails. The database is SQL Server 2008R2 10.50.2769. The OS is Windows Server 2008R2.
We verified that the “devadm” and “SAPServiceDEV” accounts have permissions on the on the server. We set the following Environment Variables for the devadm account on the database server:
DBMS_TYPE = mss
MSSQL_DBNAME = DEV
MSSQL_SCHEMA = dev
MSSQL_SERVER = <database server name>
SAPLOCALHOST = <database server name>
SAPSYSTEMNAME = DEV
We also set the following Registry Key:
HKEY_LOCAL_MACHINE/Software/SAP/DEV
Type: REG_SZ
Value: AdmUser
String: <database server name>\devadm
We didn’t install any kind of SAP software on the database server.
Is there any kind of SAP components we need to install on the database server? Do we need to run the SAP installer on the database server to get everything setup correctly? I looked at another one of our SQL Server database servers and it has SAP Management Console installed and there is a C:\Program Files\SAP\hostcntl folder. I don't know what that is or it has anything to do with SAP being able to connect to the database.
Here is the error message in the R3trans log file:
4 ETW000 [ dev trc,00000] Wed Apr 29 09:44:39 2015 1501385 1.531756
4 ETW000 [ dev trc,00000] ERROR: -1 in function ExecuteAndFlush (SQLExecDirect) [line 6702] 35 1.531791
4 ETW000 [ dev trc,00000] (102) [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'execute.'.
4 ETW000 22 1.531813
4 ETW000 [ dev trc,00000] <if user_name() != 'dev' execute as login = suser_sname(suser_sid('dev')) with no revert> failed -- connect terminated
4 ETW000 38 1.531851
4 ETW000 [ dblink ,00000] ***LOG BY2=>sql error 102 performing CON 56 1.531907
4 ETW000 [ dblink ,00000] ***LOG BY0=>[Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'execute.'.
4 ETW000 30 1.531937
2EETW169 no connect possible: "DBMS = MSSQL --- SERVER = '<db server name>' DBNAME = 'DEV'"
Please let me know what we need to do to get SAP to connect to the database.
Thanks,
JerryHere it is: 4 ETW000 R3trans version 6.22 (release 720 - 18.11.11 - 11:29:00). 4 ETW000 unicode enabled version 4 ETW000 =============================================== 4 ETW000 4 ETW000 date&time : 29.04.2015 - 19:33:01 4 ETW000 control file: 4 ETW000 R3trans was called as follows: R3trans -d 4 ETW000 trace at level 2 opened for a given file pointer 4 ETW000 [ dev trc,00000] Wed Apr 29 19:33:01 2015 83 0.000083 4 ETW000 [ dev trc,00000] db_con_init called 28 0.000111 4 ETW000 [ dev trc,00000] set_use_ext_con_info(): rsdb/ssfs_connect not set => ssfs not used 31 0.000142 4 ETW000 [ dev trc,00000] determine_block_commit: no con_hdl found as blocked for con_name = R/3 4 ETW000 20 0.000162 4 ETW000 [ dev trc,00000] create_con (con_name=R/3) 10 0.000172 4 ETW000 [ dev trc,00000] Loading DB library 'dbmssslib.dll' ... 31 0.000203 4 ETW000 [ dev trc,00000] DlLoadLib success: LoadLibrary("dbmssslib.dll"), hdl 0, addr 000007FEEE6D0000 4 ETW000 1865 0.002068 4 ETW000 [ dev trc,00000] using "D:\usr\sap\DEV\SYS\exe\uc\NTAMD64\dbmssslib.dll" 14 0.002082 4 ETW000 [ dev trc,00000] Library 'dbmssslib.dll' loaded 13 0.002095 4 ETW000 [ dev trc,00000] function DbSlExpFuns loaded from library dbmssslib.dll 15 0.002110 4 ETW000 [ dev trc,00000] Version of 'dbmssslib.dll' is "720.00", patchlevel (0.200) 84 0.002194 4 ETW000 [ dev trc,00000] function dsql_db_init loaded from library dbmssslib.dll 16 0.002210 4 ETW000 [ dev trc,00000] function dbdd_exp_funs loaded from library dbmssslib.dll 11 0.002221 4 ETW000 [ dev trc,00000] New connection 0 created 29 0.002250 4 ETW000 [ dev trc,00000] 0: name = R/3, con_id = -000000001, state = DISCONNECTED, tx = NO , bc = NO , hc = NO , perm = YES, reco = NO , frco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 4 ETW000 29 0.002279 4 ETW000 [ dev trc,00000] db_con_connect (con_name=R/3) 12 0.002291 4 ETW000 [ dev trc,00000] determine_block_commit: no con_hdl found as blocked for con_name = R/3 4 ETW000 16 0.002307 4 ETW000 [ dev trc,00000] find_con_by_name found the following connection: 9 0.002316 4 ETW000 [ dev trc,00000] 0: name = R/3, con_id = 000000000, state = DISCONNECTED, tx = NO , bc = NO , hc = NO , perm = YES, reco = NO , frco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 4 ETW000 21 0.002337 4 ETW000 [ dev trc,00000] Thread ID:3492 594 0.002931 4 ETW000 [ dev trc,00000] Thank You for using the SLODBC-interface 17 0.002948 4 ETW000 [ dev trc,00000] Using dynamic link library 'D:\usr\sap\DEV\SYS\exe\uc\NTAMD64\dbmssslib.dll' 4 ETW000 21 0.002969 4 ETW000 [ dev trc,00000] dbmssslib.dll patch info 27 0.002996 4 ETW000 [ dev trc,00000] SAP patchlevel 0 12 0.003008 4 ETW000 [ dev trc,00000] SAP patchno 200 92 0.003100 4 ETW000 [ dev trc,00000] Last MSSQL DBSL patchlevel 0 20 0.003120 4 ETW000 [ dev trc,00000] Last MSSQL DBSL patchno 200 14 0.003134 4 ETW000 [ dev trc,00000] Last MSSQL DBSL patchcomment Take care of warnings during database connect (1600066) 4 ETW000 18 0.003152 4 ETW000 [ dev trc,00000] ODBC Driver chosen: SQL Server Native Client 10.0 native 273 0.003425 4 ETW000 [ dev trc,00000] Network connection used from XXSAPDEV01 to XXSQLSAPDEV01 using tcp:XXSQLSAPDEV01 4 ETW000 128 0.003553 4 ETW000 [ dev trc,00000] Network connection used from XXSAPDEV01 to XXSQLSAPDEV01 using tcp:XXSQLSAPDEV01 4 ETW000 20908 0.024461 4 ETW000 [ dev trc,00000] Network connection used from XXSAPDEV01 to XXSQLSAPDEV01 using tcp:XXSQLSAPDEV01 4 ETW000 3485 0.027946 4 ETW000 [ dev trc,00000] Driver: sqlncli10.dll Driver release: 10.50.2769 3695 0.031641 4 ETW000 [ dev trc,00000] GetDbRelease: 10.50.2769.00 475 0.032116 4 ETW000 [ dev trc,00000] GetDbRelease: Got DB release numbers (10,50,2769,0) 18 0.032134 4 ETW000 [ dev trc,00000] ERROR: -1 in function ExecuteAndFlush (SQLExecDirect) [line 6702] 6505 0.038639 4 ETW000 [ dev trc,00000] (102) [42000] [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'execute.'. 4 ETW000 27 0.038666 4 ETW000 [ dev trc,00000] failed -- connect terminated 4 ETW000 31 0.038697 4 ETW000 [ dblink ,00000] ***LOG BY2=>sql error 102 performing CON 49 0.038746 4 ETW000 [ dblink ,00000] ***LOG BY0=>[Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'execute.'. 4 ETW000 27 0.038773 2EETW169 no connect possible: "DBMS = MSSQL --- SERVER = 'XXSQLSAPDEV01' DBNAME = 'DEV'"
-
Connecting to sql server database mdf file without installing sql server on client machine?
I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client
system.
How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.
If possible what will be the connection string in that case. Database need not be used in network.you cant connect and view the internals of mdf file unless it being attached to a sql server instance as a database.
The sql server instance can be installed in any box which is in the same domain and then you can connect from your application to it.
Please Mark This As Answer if it solved your issue
Please Mark This As Helpful if it helps to solve your issue
Visakh
My MSDN Page
My Personal Blog
My Facebook Page -
How can I connect to SQL server database thru local network by using JSP?
I'm currently doing a project by using JSP..And I need to display record from the SQL Server database in our school's local network. May I know how can I do that? How can I write the code so that I can able to access the SQL Server databsase Throught school's network by using JSP? Please tell me step by step how can I do that. I'm using Tomcat 4.1 as Web Server. And I had J2SE and J2EE installed in my computer.
first you have to establish a ODBC DSN on your computer,
that connects to the database...you can do that from your control pannel.
i assume that the TOMCAT server is residing on your computer....(if the webserver is in other computer then you would have to create a System DSN on the data sources ODBC option in the settings>control pannel of that machine)
then you can use that DSN name to connect to the data base from the class file....for further assistance on how to create the class that access the tutorials in sun site.
regards
G -
Problem with connection to SQl Server ( charecter set cp1255 not found )
Hello my name is Ron ,
i want to connect to SQL SERVER with the microsoft driver
from Java ( with jDeveloper ) .
then i did the following steps:
1) i download and install the jdbc driver for Sql server
on my machine ( windows XP with , JDK 1.3 )
2) i update my classpath with the .Jar lib file of the driver .
3) when creating the connection
i'm using the
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
this is Ok , the driver was loaded .
4) when trying the GetConnction
Connection conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://server1:1433","username","secret");
i get the following error:
[Microsoft][SQLServer 2000 Driver for JDBC]Character set CP1255 not found in com.microsoft.util.transliteration.properties.
please help me with this . any idea ?
thanks in advance
RoniRon,
Try following this document
http://otn.oracle.com/products/jdev/howtos/bc4j/bc_psqlserverwalkthrough.html
from the how-tos archive.
Also, try to change the compiler encoding to UTF-8. you do this in the project setting window.
http://otn.oracle.com/products/jdev/htdocs/vcmigration/weblogic/unicode.gif
http://otn.oracle.com/products/jdev/htdocs/vcmigration/weblogic/unicode2.gif
good luck -
Connection to SQL Server Database
I am working on 4.6C. How can i connect to SQL Sever database ? I am new to this type of concept. Kindly do provide some suggessions !!!
Hi,
In general, if we want to hit database directly, we use..
EXEC.
ENDEXEC.
ex:
DATA: BEGIN OF wa,
connid TYPE spfli-connid,
cityfrom TYPE spfli-cityfrom,
cityto TYPE spfli-cityto,
END OF wa.
DATA c1 TYPE spfli-carrid VALUE 'LH'.
EXEC SQL PERFORMING loop_output.
SELECT connid, cityfrom, cityto
INTO :wa
FROM spfli
WHERE carrid = :c1
ENDEXEC.
FORM loop_output.
WRITE: / wa-connid, wa-cityfrom, wa-cityto.
ENDFORM. -
Problem with connect to sql server ..
I have problem with connect to sql server2005
i use jpa(hibernate) and jsf
javax.servlet.ServletException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
root cause
javax.faces.el.EvaluationException: javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
javax.persistence.PersistenceException: org.hibernate.exception.JDBCConnectionException: Could not open connection
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:1371)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:60)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
org.hibernate.exception.JDBCConnectionException: Could not open connection
org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131)
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
root cause
java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost;databaseName=MIS
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173)
org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297)
org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169)
org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67)
org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160)
org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263)
org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:57)
servlet.PrzychodniaBean.dodaj(PrzychodniaBean.java:30)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.el.parser.AstValue.invoke(AstValue.java:262)
org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
javax.faces.component.UICommand.broadcast(UICommand.java:315)
javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794)
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259)
com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
note The full stack trace of the root cause is available in the JBoss Web/7.0.13.Final logs.
persistance.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="PrzychodnieLekarskiePU" transaction-type="RESOURCE_LOCAL">
<class>model.Przychodznia</class>
<properties>
<property name="hibernate.connection.username" value="a"/>
<property name="hibernate.connection.password" value="a"/>
<property name="hibernate.connection.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
<property name="hibernate.connection.driver_class" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost;databaseName=MIS"/>
<property name="javax.persistence.jdbc.user" value="a"/>
<property name="javax.persistence.jdbc.password" value="a"/>
<property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
</properties>
</persistence-unit>
</persistence>
Edited by: 985713 on 2013-02-02 07:12
Edited by: 985713 on 2013-02-02 07:37it works ok : I don't known where is error in jpa .. ?
public class MyConnection {
public static Connection getConnection () throws SQLException{
String url = "jdbc:sqlserver://ABADDON1;databaseName=MIS";
String user = "a";
String pass = "a";
DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());
Connection conn = DriverManager.getConnection(
url,user,pass);
System.out.println("OK");;
return conn;
try {
conn = MyConnection.getConnection();
} catch (SQLException ex) {
System.out.println("Error: " + ex.getErrorCode()
+ ex.getMessage());
} -
Connectivity Issue with Vista and SQL Server 2005
Hi all;
I am unable to log into SQL Server 2005 due to a connectivity problem.
When I telnet on the port for the server, the attempt at a connection fails.
Does anyone have any ideas as to what I should do?
THANKS!!!
WallyClosed the thread regarding: http://social.msdn.microsoft.com/Forums/en-US/sqlsecurity/thread/c20ee682-d329-4678-a8a6-6e10b746bf0e/
Using the elevated mode fixed the problem.
Jens K. Suessmeyer -
Problem with Connection to SQL Server via Servlet (in iPlanet 6 App Server)
Hi ,
I am using the iPlanet ApplicationServer 6.0 SP2 for development & testing of an internet application.
I am facing a problem when I am trying to connect to MS SQL SERVER via the native jdbcodbc driver (obdc32.dll). The error is something like this :
[26/Jul/2001 11:50:35:7] warning: DriverConnect: (28000): [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '\'.(DB Error: 18456)
[26/Jul/2001 11:50:35:7] warning: ODBC-027: CreateConn: failed to create connection [new connection]: DSN=fadd,DB=cashbook,USER=test,PASS=xxxxxxxxx
[26/Jul/2001 11:50:35:7] error: DATA-108: failed to create a data connection wit
h any of specified drivers
Error in connecting to the Database for cirrus :java.sql.SQLException: failed to
create a data connection with any of specified drivers
java.sql.SQLException: failed to create a data connection with any of specified
drivers
at com.netscape.server.jdbc.Driver.afterVerify(Unknown Source)
at com.netscape.server.jdbc.Driver.connect(Unknown Source)
at com.netscape.server.jdbc.DataSourceImpl.getConnection(Unknown Source)
at gefa.util.DBConnection.jdbcConnectionOpen(DBConnection.java:65)
at gefa.servlet.ServUpload.doPost(ServUpload.java:45)
at gefa.servlet.ServUpload.doGet(ServUpload.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unkno
wn Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
I have configured a DSN with the name "fadd" on the machine with the application server and it used NT authentication. I have supplied an NT userid and password that has appropriate rights on the database "cashbook".
When I write a java standalone program, it does connect but via a servlet it does not connect.
Can some guide me with this problem please ?
Anything one might have observed in the past ? (may be specific to iPlanet ?)
Thanks a lot in advance
~SunilI'm using iPlanet App server as well and experiencing similar problem. I load my SQL Server driver by Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"), then use DriverManager.getDriver() to obtain the Driver.
However, the Driver returned is not the SQLServerDriver as expected. The Driver returned is com.netscape.server.jdbc.Driver! And then when I do Driver.getConnection("jdbc:microsoft:sqlserver://MyServer"), it throws an SQLException saying that it doesn't accept a jdbc:microsoft:sqlserver subprotocol. Well, of course it doesn't, it's not a microsoft Driver at all.
I suspect the problem is that the netscape Driver's acceptsURL() method ALWAYS returns true in iPlanet app server, thus when you getDriver(), the netscape Driver is always returned (and always returned as the first one since it's default?). Thus even though the same piece of code works fine as a standalone application, it just doesn't work on iPlanet app server.
My work around is:
Class.forName("my.Driver");
Enumeration enu = DriverManager.getDrivers();
Driver useThis = null;
while (enu.hasMoreElements()) {
Driver d = (Driver)enu.nextElement();
if (d.getClass().toString().indexOf("my.Driver") > -1) {
useThis = d;
Mind that my above code does not have an performance issue. If you look into the source code of how DriverManager get a Driver for a particular URL, it also loads the whole set of available Drivers, then call acceptsURL() method on each of them to find the first "suitable" one. Thus time complexity is the same.
I know this is not a very elegant solution and it defeats the purpose of having a DriverManager. Does any one else has a better way to solve this problem, like a way to specify the priority of each Driver so that SQLServerDriver is returned before the netscape Driver?
Thanks a lot. -
SQL developer connect to SQL server database
Hi Friends,
I have a sql developer 3.2. I download jtds1.2 as a thirty part driver in window. It works and SQL server tab appear on connection window.
But Retrieve database button does not work and not able to enter a sql database name.
Without database name , I got error message as failure 0 test failed:unknow server host name 'CACI1111\SQLEXPRESS'. I use defolt 1433 port.
However, I can open SQL server 2008 express in my local PC.
What do I need to do it?
Thanks
newdbaHello,
my syntax to connect to a non-local SQL Server 2005 Express database is nn.nn.nn.nn/testdb in the hostname field, where nn.nn.nn.nn is the IP address of the other PC and testdb is the name of the database.
Regards
Wolfgang -
Connect MS SQL Server database
I need to connect my MS SQL server backend database.
I would like to know can I u se connection string to connect the server or I have to use following code to connect database.
<CFPARAM NAME="Application.DS" DEFAULT="MyDB">
<CFPARAM NAME="Application.UserName" DEFAULT="MyUser">
<CFPARAM NAME="Application.Password" DEFAULT="MyPassword">
Your help and information is great appreciated,
Regards,
IccsiYes, I just installed Dreamweaver CS 6 and will use ColdFusion web server.
Thanks again for the information and help,
Regards,
Iccsi -
Issue with Connection Oracle 11.2 database from Perl.
Hello,
We are trying to connect oracle 11.2 database from a perl script. I have verified that DBD::ORACLE version is 1.19. The environment is linux environment. Linux is SuSE linux and version is 10 SP1.
The code we are executing is
============
#!/usr/bin/perl -w
use strict;
use DBI;
my $db = DBI->connect( "dbi:Oracle:SID", "USERID", "XXXXXX" )
|| die( $DBI::errstr . "\n" );
my $SEL = "SELECT sysdate FROM DUAL";
my $sth = $db->prepare($SEL);
$sth->execute();
my($cdate);
while ( $sth->fetch() ) {
Print "DATE: $cdate\n";
$sth->finish() ;
=======================
We are receiving following error:
install_driver(oracle) failed: Can't locate DBD/oracle.pm in @INC (@INC contains
b/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8
d-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at (eval
Perhaps the DBD::oracle perl module hasn't been fully installed,
or perhaps the capitalisation of 'oracle' isn't right.
Available drivers: DBM, ExampleP, File, Oracle, Proxy, Sponge, mysql.
at ./conn_db.pl line 4
Please let us knowhow to resolve the issue?Are you sure DBD::Oracle is properly installed? I recommend you check DBD::Oracle installation and reinstall it if necessary. Also remember to read carefully README.txt note installation for your distro.
Maybe you are looking for
-
Please help me. I have a new printer set up today and it doesn't print. It is wireless and drivers installed correctly as is the inks x 2. It says printing alignment page but nothing comes out. Any suggestions for me? Thanks kindly, Sue
-
Music not showing on ipad / iPhone through the cloud
Hey, i'ved upgraded my software on my Mac and ipad/iphone. Can't now access any of the music on either the ipad / iphone. It looks like it's there but the track listing are empty. Do I need to do a restore back to factory settings? Rach
-
Manual creation of PPDS PPM in SCC03
Hello Experts We are currently in process of experimenting PPDS PPM, since we have multiple components to sourced and produced from subcontractor. I need a step by step instruction of how to create manual PPDS PPM. I did tried SCC03 and create Activi
-
Numbers: how to edit multiple "sheets" "tables" all at the same time
I have read earlier posts from 2004 about this topic. Hoping things have changes. I have 19 sheets/tables in a numbers file "Pigeonrecords.numbers". I would like to globally alter all of them a one time as new columns or rows are needed and or data t
-
"recording stopped because the format of the source media changed"
I just got this error was trying to use quicktime to capture a video was able to capture another video successfully but for some reason it doesn't like this tape even though it was recorded on the same machine any thoughts?