Search code examples
sql-server-2008yii2gii

Using Gii with SQL Server


I have two DB within my Yii2 Application. I'm trying to use Gii to generate models for SQL-Server 2008. But I keep getting:

Connection does not support reading schema information for 'sqlsrv' DBMS.

I am able to connect to the DB and pull data and use it within my application though, is Gii not available for use with SQL-Server 2008?


Solution

  • I looked into my connection and had mapped my Schema, perhaps incorrectly.

    When I removed this from the config it worked:

    'schemaMap' => [
      'mssql'=> [
        'class'=>'yii\db\mssql\Schema',
        'defaultSchema' => 'dbo'
      ]
    ],