Author Topic: Step 3 Database Initialization error  (Read 7130 times)

Offline thefid

  • Newbie
  • *
  • Posts: 9
Step 3 Database Initialization error
« on: April 06, 2017, 04:43:56 AM »
When trying to initialize the DB on step 3, I get the following:

Check DB config

DSN (write):  OK
DB Schema:  NOT OK(Error creating database schema: [102] [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Incorrect syntax near 'GO'. (SQL Query: CREATE TABLE [dbo].[cache] (
[user_id] [int] NOT NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[expires] [datetime] NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO))
Please try to inizialize the database manually as described in the INSTALL guide. Make sure that the configured database extists and that the user as write privileges

Questions:
1. Is this is an issue with the SQL version and the Installer SQL?

2. I do not see anything that creates the database and or tables in the manual instructions or SQL files. Does Roundcube use an existing hmailserver DB or do I need to create a new DB just for installing Roundcube?

I have granted full complete SQL Server sysadmin rights on my DB user. It gives an OK on the DSN write, but can't create the DB... Am I missing something? The final statement appears to contradict the error message from the Installer. It appears to fail when creating a new DB, yet the final statement tells me I should have the DB created with the proper write privilege.
 

To simplify any manual instructions, let's assume I am using "dbuser" as the username and "mypass" as the password for the SQL Server login.

System Specs:
Windows 2016 Server
MS SQL 2016 Server
PHP 7.1
Roundcube 1.2.3


PS: Typo on "initialize" The installer has it as "Please try to inizialize" Also "exist" instead of "extists" in the same line.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Step 3 Database Initialization error
« Reply #1 on: April 06, 2017, 05:50:05 AM »
This actually might be a bug in Roundcube. MS SQL Server is rarely used with Roundcube. You should create the database structure manually using SQL/mssql.initial.sql file.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: Step 3 Database Initialization error
« Reply #2 on: April 06, 2017, 06:19:14 AM »

Offline thefid

  • Newbie
  • *
  • Posts: 9
Re: Step 3 Database Initialization error
« Reply #3 on: April 06, 2017, 09:05:39 PM »
Check DB config

DSN (write):  OK
DB Schema:  OK
DB Write:  OK
DB Time:  OK

Worked like a charm! It is completely installed and appears to be working.

Thanks for the fast response.

I had some other issues during the install for SQL Server and PHP 7.1 (on Step 1) that you might want to review in case you can do something with it. The issue and the latest SQLSRV drivers can be found here:

http://www.roundcubeforum.net/index.php/topic,24115.0.html

Thanks again!