Hi there,
I have been trying to setup a connection to a local SQL server database. The database is a new install (MS SQL Server 2008 r2 Express) and I can connect to it using ODBC. However when I try to setup the connection in the UFS.xml file it doesn't work.
Any thoughts...Can I connect to an SQL Express server? The version of Ebase is 4.2.2 community edition.
Cheers.
Neil
Database Connection to MS SQL Server 2008 r2 Express
Moderators: Jon, Steve, Ian, Dave
-
Neilp
- Ebase User
- Posts: 2
- Joined: Fri Dec 02, 2011 2:45 pm
- Location: Lymington
-
ehmd
- Ebase User
- Posts: 53
- Joined: Thu Sep 13, 2007 9:02 am
- Contact:
Neil,
I'm taking a guess that you've installed MS SQL Server 2008 r2 Express using the defaults on the setup.
This installs Sql Server in a named instance, which requires a change to the setup connection. You need to specify the instance name in the connection string.
When you connect to Sql Server Management Studio, you will be prompted to connect to something like MYPCNAME/SQLEXPRESS.
The bit after the / is the Instance name which needs setting in the url above.
Hope this helps,
Mark
I'm taking a guess that you've installed MS SQL Server 2008 r2 Express using the defaults on the setup.
This installs Sql Server in a named instance, which requires a change to the setup connection. You need to specify the instance name in the connection string.
Code: Select all
<Resource name="jdbc/MYDB" auth="Container" type="javax.sql.DataSource"
factory="com.ebase.jndi.DataSourceFactory" url="jdbc:jtds:sqlserver://localhost/mydb;instance=SQLEXPRESS;
driverClassName="net.sourceforge.jtds.jdbc.Driver" username="yourusername" password="yourpassword"
maxIdle="10" maxActive="200" validationQuery="select 1;" checkLevel="2" preparedStatementCache="16"/>
The bit after the / is the Instance name which needs setting in the url above.
Hope this helps,
Mark
0 x
-
Neilp
- Ebase User
- Posts: 2
- Joined: Fri Dec 02, 2011 2:45 pm
- Location: Lymington
-
ehmd
- Ebase User
- Posts: 53
- Joined: Thu Sep 13, 2007 9:02 am
- Contact:
Have you enabled the TCP/IP protocol on Sql Server ?
Under Sql Server Configuration Manager -> Sql Server Network Configuration -> Protocols For SQLXXXXX -> TCP/IP should be set to Enabled.
Check the properties for TCP/IP by right-clicking on TCP/IP then Properties.
On the Protocol Tab ensure Protocol is enabled and on the IP Addresses Tab ensure the IP Address you are connecting to is enabled and listening.
If you make any changes to Sql Server configuration, make sure you save them and restart Sql Server.
Also check is that your connection from Ebase is not being blocked by any Firewall or Proxy Server.
Finally is the database username and password correct in the connection string, ie can you connect to the database using Sql Server Management Studio using theses ?
Does the database user have sufficient rights to the database ?
Under Sql Server Configuration Manager -> Sql Server Network Configuration -> Protocols For SQLXXXXX -> TCP/IP should be set to Enabled.
Check the properties for TCP/IP by right-clicking on TCP/IP then Properties.
On the Protocol Tab ensure Protocol is enabled and on the IP Addresses Tab ensure the IP Address you are connecting to is enabled and listening.
If you make any changes to Sql Server configuration, make sure you save them and restart Sql Server.
Also check is that your connection from Ebase is not being blocked by any Firewall or Proxy Server.
Finally is the database username and password correct in the connection string, ie can you connect to the database using Sql Server Management Studio using theses ?
Does the database user have sufficient rights to the database ?
0 x
Who is online
Users browsing this forum: Bing [Bot] and 36 guests