-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DBAL-1058: It seems that MSSQL syntax was changed #991
Comments
Comment created by @deeky666: [~it.manfred] thanks for reporting. I'll have a look at it this evening. Weird that the functional tests pass though in my setup :S |
Comment created by @Ocramius: [~deeky666] please note that he is using |
Comment created by it.manfred: I've checked by direct query to SQL via SQL Management Studio. Here some test QUERY: QUERY: I've tested on 5 servers 11.0.5058 (SQL Server 2012). Other tests: QUERY: QUERY: by the way - is it neccessary to query * from SYS.DATABASES ?
public function getListDatabasesSQL()
Maybe need to query only names? (name field)
|
Comment created by it.manfred: According to tests I've added next code to
And modified my ZF2 application doctrine config
Now I've got no issues with MSSQL 2012 |
Comment created by @doctrinebot: |
Comment created by it.manfred: Dear friends, I'm new here, and I don't know how all this works here, but can you help me? :) Now I've got another problem. of course because of my
ok... my mistake let's fix it in ZF2 way
Now we got another exception: let's look to
So my question is Can we implemet a feature and change this
to this (or similar)
or this problem is only mine and I need to fix it by my self and to write some forks/mods etc? Thx for your help anyway |
Comment created by it.manfred: [~ocramius], thx! Is there planned some big reworking of this section, am I right? |
Comment created by @doctrinebot: |
Issue was closed with resolution "Fixed" |
Comment created by @doctrinebot: |
1 similar comment
Comment created by @doctrinebot: |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Jira issue originally created by user it.manfred:
I'm using dblib, MSSQL (2012).
So, problem is here:
{quote}doctrine-module orm:schema-tool:update --dump-sql{quote}
{quote}Doctrine\DBAL\Driver\PDOException: SQLSTATE[HY000]: General error: 20018 Invalid object name 'SYS.SCHEMAS'. [20018](severity 16) [SELECT name FROM SYS.SCHEMAS WHERE name NOT IN('guest', 'INFORMATION_SCHEMA', 'sys')] in /var/www/domains/internal.dc.hayas.ru/data/partners.zf2/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php on line 106
{quote}
So it seems, that problems is here:
Doctrine\DBAL\Platforms\SQLServerPlatform.php
At Line 1036
SQL Server >= 2005 uses
sys.schemas
(lowercase)Maybe need to add to
SQLServer2005Platform.php
SELECT name FROM sys.schemas ...
and also at line 1028
SQLServerPlatform.php
add to
SQLServer2005Platform.php
The text was updated successfully, but these errors were encountered: