title: Select Schema and table in sqlserver with Yii2?
body: <p>i have sql server database which have multiple schema. i tried to select from one of table from different schema using sqlsrv driver but is says invalid configuration, The table does not exist. 
  how can i select the schema in table using sqlsrv driver?</p>
  
  <p>myconnection </p>
  
  <pre><code>&lt;?php 
      return [
          'class' =&gt; 'yii\db\Connection',
          'dsn' =&gt; 'sqlsrv:Server=192.168.10.70;Database=mydatabase', // MS SQL Server, sqlsrv driver public ip
          'username' =&gt; 'user_username',
          'password' =&gt; 'user_password',
          'charset' =&gt; 'utf8',
      ];
  ?&gt;
  </code></pre>
  
  <p>my model</p>
  
  <pre><code>&lt;?php
      namespace app\models;
  
      use Yii;
      use yii\db\ActiveRecord;
  
      class Transaction extends \yii\db\ActiveRecord
      {
          /**
           * @inheritdoc
           */
          public static function tableName()
          {
              return 'schema2.transaction';
          }
  
          public static function getDb()
          {
              return \Yii::$app-&gt;db3;  // use the "db3" application component
          }
  
          /**
           * @inheritdoc
           */
          public function rules()
          {
              return [[['id', 'number', 'amount', 'date', 'status', 'description'], 'required']];
          }
  
          /**
           * @inheritdoc
           */
          public function attributeLabels()
          {
              return [
              'id' =&gt; Yii::t('app', 'Uid'),
              'number' =&gt; Yii::t('app', 'Number'),
              'date' =&gt; Yii::t('app', 'Date'),
              'amount' =&gt; Yii::t('app', 'Amount'),
              'description' =&gt; Yii::t('app', 'Item Description'),
              'status' =&gt; Yii::t('app', 'status'),
              ];
          }
      }
  ?&gt;
  </code></pre>