src/PDO/SchemaPDOMssql.php
/**
     * Returns all schema names in the database, including the default one but not system schemas.
     *
     * This method should be overridden by child classes in order to support this feature because the default
     * implementation simply throws an exception.
     *
     * @throws Exception|InvalidConfigException|Throwable
     *
     * @return array all schema names in the database, except system schemas.
     *
     * {@see https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-database-principals-transact-sql}
     */
Returns all schema names in the database, including the default one but not system schemas.
This method should be overridden by child classes in order to support this feature because the default
implementation simply throws an exception.



@return array all schema names in the database, except system schemas.


Returns all schema names in the database including the default one but not system schemas . This method should be overridden by child classes in order to support this feature because the default implementation simply throws an exception . @return array all schema names in the database except system schemas .
protected function findSchemaNames(): array
    {
        $sql = <<<SQL
        SELECT [s].[name]
        FROM [sys].[schemas] AS [s]
        INNER JOIN [sys].[database_principals] AS [p] ON [p].[principal_id] = [s].[principal_id]
        WHERE [p].[is_fixed_role] = 0 AND [p].[sid] IS NOT NULL
        ORDER BY [s].[name] ASC
        SQL;
        return $this->db->createCommand($sql)->queryColumn();
    }
protected function findSchemaNames ( ) : array { $ sql = <<< SQL         SELECT [s].[name]         FROM [sys].[schemas] AS [s]         INNER JOIN [sys].[database_principals] AS [p] ON [p].[principal_id] = [s].[principal_id]         WHERE [p].[is_fixed_role] = 0 AND [p].[sid] IS NOT NULL         ORDER BY [s].[name] ASC 
        SQL ; return $ this -> db -> createCommand ( $ sql ) -> queryColumn ( ) ; }
Returns all schema names in the database, including the default one but not system schemas.
Returns all schema names in the database including the default one but not system schemas .