# SVY 8 : SQL server connection issue

**URL:** <https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098>\
**Category:** Classic Servoy\
**Created:** [January 3, 2017, 9:24pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098 "2017-01-03T21:24:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![robrecht](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@robrecht](https://forum.servoy.com/u/robrecht)\
**Post date:** [January 3, 2017, 9:24pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/1 "2017-01-03T21:24:12Z")

</div>

Hi,

I’m trying to install a new application server for servoy 8.1.1  
I keep getting error messages when connecting to the repository database

> C:\Servoy\_8\_Demo\application\_server\>servoy\_server.bat  
> Java HotSpot™ 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0  
> Log file: C:\Servoy\_8\_Demo\application\_server\servoy\_log.txt  
> Creating repository.  
> Error creating repository: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Cannot find the object “servoy\_groups” because it does not exist or you do not have permissions.

In log file :

> 01-03 22:17:23,556 WARN [main] persistence.Server - Table name availability\_group\_listener\_ip\_addresses from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name availability\_read\_only\_routing\_lists from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name column\_xml\_schema\_collection\_usages from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name database\_audit\_specification\_details from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name dm\_cryptographic\_provider\_properties from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name dm\_db\_mirroring\_auto\_page\_repair from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,556 WARN [main] persistence.Server - Table name dm\_db\_missing\_index\_group\_stats from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_db\_xtp\_nonclustered\_index\_stats from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_exec\_background\_job\_queue\_stats from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_exec\_query\_resource\_semaphores from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_exec\_query\_transformation\_stats from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_filestream\_non\_transacted\_handles from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_fts\_semantic\_similarity\_population from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_availability\_group\_states from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_availability\_replica\_cluster\_nodes from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_availability\_replica\_cluster\_states from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_availability\_replica\_states from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_database\_replica\_cluster\_states from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_hadr\_database\_replica\_states from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_os\_buffer\_pool\_extension\_configuration from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_os\_server\_diagnostics\_log\_configurations from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_resource\_governor\_configuration from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_resource\_governor\_resource\_pool\_affinity from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_resource\_governor\_resource\_pool\_volumes from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_resource\_governor\_resource\_pools from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_resource\_governor\_workload\_groups from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,571 WARN [main] persistence.Server - Table name dm\_tran\_active\_snapshot\_database\_transactions from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name filetable\_system\_defined\_objects from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name fulltext\_semantic\_language\_statistics\_database from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name message\_type\_xml\_schema\_collection\_usages from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name parameter\_xml\_schema\_collection\_usages from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name registered\_search\_property\_lists from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name resource\_governor\_configuration from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name resource\_governor\_resource\_pool\_affinity from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name resource\_governor\_resource\_pools from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name resource\_governor\_workload\_groups from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name server\_audit\_specification\_details from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name service\_contract\_message\_usages from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name system\_components\_surface\_area\_configuration from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name system\_internals\_allocation\_units from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name system\_internals\_partition\_columns from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:23,587 WARN [main] persistence.Server - Table name xml\_schema\_component\_placements from server repository\_server is too long (\>30 chars) – this is not supported by all databases   
> 2017-01-03 22:17:24,587 ERROR [main] com.servoy.j2db.util.Debug - Throwable   
> com.servoy.j2db.persistence.RepositoryException: Error creating repository  
> at com.servoy.j2db.server.main.ApplicationServer.Za(ApplicationServer.java:305)  
> at com.servoy.j2db.server.main.Zqb.Za(Zqb.java:6)  
> at com.servoy.j2db.server.main.Zqb.start(Zqb.java:109)  
> at com.servoy.j2db.server.main.ApplicationServer.main(ApplicationServer.java:71)  
> Caused by: com.servoy.j2db.persistence.RepositoryException: java.sql.SQLException: Cannot find the object “servoy\_groups” because it does not exist or you do not have permissions.  
> at com.servoy.j2db.server.Za.Zn.createRepositoryTables(Zn.java:1840)  
> at com.servoy.j2db.server.Za.Zo.Zc(Zo.java:1804)  
> at com.servoy.j2db.server.Za.Zo.Zb(Zo.java:1644)  
> at com.servoy.j2db.server.main.ApplicationServer.Za(ApplicationServer.java:307)  
> … 3 more  
> Caused by: java.sql.SQLException: Cannot find the object “servoy\_groups” because it does not exist or you do not have permissions.  
> at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)  
> at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)  
> at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)  
> at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)  
> at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)  
> at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)  
> at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)  
> at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1166)  
> at net.sourceforge.jtds.jdbc.JtdsStatement.executeUpdate(JtdsStatement.java:1119)  
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
> at java.lang.reflect.Method.invoke(Unknown Source)  
> at com.servoy.j2db.datasource.Zg.invoke(Zg.java:8)  
> at com.sun.proxy.$Proxy4.executeUpdate(Unknown Source)  
> at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)  
> at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)  
> at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)  
> at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)  
> at com.servoy.j2db.server.Za.Zn.createGroupsIndex(Zn.java:52)  
> at com.servoy.j2db.server.Za.Zn.recreateServoyGroups(Zn.java:1410)  
> at com.servoy.j2db.server.Za.Zn.createRepositoryTables(Zn.java:1879)  
> … 6 more

The credentials and URL are 100% correct, I copied them from a Servoy 7 installation and re-tested the connection string several times.

> server.0.serverName=repository\_server  
> server.0.URL=jdbc:jtds:sqlserver://localhost/servoy\_repository  
> server.0.driver=net.sourceforge.jtds.jdbc.Driver  
> server.0.userName=sa  
> server.0.password=\*\*\*\*\*\*\*\*\*  
> server.0.schema=  
> server.0.catalog=

Is there something wrong with the shipped driver ?

Thanks

---

<div class="post-metadata">

**Author:** ![kwpsd](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kwpsd](https://forum.servoy.com/u/kwpsd)\
**Post date:** [January 3, 2017, 10:47pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/2 "2017-01-03T22:47:42Z")

</div>

> …or you do not have permissions.

I received the same error message when installing 8.1.1 on a Windows 10 Pro system last week. If I recall, I was not running the installer with the requisite ‘run as administrator’ parameter. Perhaps, you are having permission problems as well?

I hope this helps!

---

<div class="post-metadata">

**Author:** ![robrecht](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@robrecht](https://forum.servoy.com/u/robrecht)\
**Post date:** [January 4, 2017, 8:25am UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/3 "2017-01-04T08:25:29Z")

</div>

Hi,

Thanks for your advice, I ran the installer now as administrator but I keep getting the same error…  
When changing the connection string I got a ‘login failed’ message, so it seems a connection is established  
User is dbowner, SQL Server 2016

---

<div class="post-metadata">

**Author:** ![Jan\_Aleman](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jan\_Aleman](https://forum.servoy.com/u/Jan_Aleman)\
**Post date:** [January 4, 2017, 4:09pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/4 "2017-01-04T16:09:36Z")

</div>

Have you tried using the Microsoft SQL driver as opposed to JTDS?

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [January 5, 2017, 8:14am UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/5 "2017-01-05T08:14:55Z")

</div>

are you really connection to the same SQL Server instance that also Servoy 7 connects to?  
Because there is really no change regarding the jdts driver or the way we connect compared to 7 that i know of.

The thing is it seems to be able to connect fine but doesn’t find any tables (so it is not an existing repository database) and because it can’t find the tables it tries to create them but is not allowed  
This doesn’t have anything to do with permission of the servoy install itself, but more about permissions inside the database for that users that you are using.

---

<div class="post-metadata">

**Author:** ![robrecht](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@robrecht](https://forum.servoy.com/u/robrecht)\
**Post date:** [January 5, 2017, 7:33pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/6 "2017-01-05T19:33:03Z")

</div>

I tried this :

- Changed JTDS to SQL driver - same error
- Created a new database and ran a ‘create table’ statement in SSMS for testing (table successfully created) - same error
- Created a new user, new database - same error
- New installation on my VirtualBox Windows 10 environment with SQL 2014 - same error
- Connected to another SQL server instance (SQL 2012) on another machine with a new database, full user rights - same error
- Took a copy of an existing Servoy 7 installation, copied Servoy 8 property file with connection the newly created database in SQL 2012 instance - repository created instantly …

So, all my tests with Servoy 8, with triple checking user rights, database connection, drivers, etc…They all failed, but connecting with the exact same property file with a Servoy 7 installation worked…

What else can I do / test ?

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [January 6, 2017, 9:37am UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/7 "2017-01-06T09:37:56Z")

</div>

Hi,

We are creating repository tables as part of our automatic test suite on the major databases, including sqlserver.  
This runs as part of our continuous integration environment.

I have also tried this manually on our sqlserver db with the latest 8.1 code, all worked as expected.

I think something is different with your sa user setup.  
Can you try with a default docker sqlserver image, I also tried this and it worked as expected.  
See [https://hub.docker.com/r/microsoft/mssql-server-linux/](https://hub.docker.com/r/microsoft/mssql-server-linux/) or [https://hub.docker.com/r/microsoft/mssq … r-windows/](https://hub.docker.com/r/microsoft/mssql-server-windows/)

Rob

---

<div class="post-metadata">

**Author:** ![robrecht](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@robrecht](https://forum.servoy.com/u/robrecht)\
**Post date:** [January 6, 2017, 12:53pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/8 "2017-01-06T12:53:54Z")

</div>

Hi,

We found what caused this error…  
The repository database name was ‘\_GEDE\_servoy\_repository\_8’.  
After changing the database name to ‘repo’, everything works fine.  
Changing the database name to ‘re\_po’ causes the same error.  
So an underscore is not allowed in the physical database name ?  
Maybe only when altering objects ?

This is very familiar to the bug we recently logged - the case was rejected - in Servoy 7.4.9 : SVY-10704  
I will make a new Jira case concerning the servoy 8 installation.

Robrecht

---

<div class="post-metadata">

**Author:** ![robrecht](https://avatars.discourse-cdn.com/v4/letter/r/a9adbd/32.png) [@robrecht](https://forum.servoy.com/u/robrecht)\
**Post date:** [January 7, 2017, 9:08pm UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/9 "2017-01-07T21:08:21Z")

</div>

FYI

Creating a new repository with Servoy 7.4.9 in combination with databases with underscores in its name doesn’t work either…

---

<div class="post-metadata">

**Author:** ![rgansevles](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rgansevles](https://forum.servoy.com/u/rgansevles)\
**Post date:** [January 13, 2017, 11:20am UTC](https://forum.servoy.com/t/svy-8-sql-server-connection-issue/19098/10 "2017-01-13T11:20:10Z")

</div>

We could finally reproduce this issue.  
A fix has been made for release 7.4.10/8.1.2

Rob
