CLI create uses Windows login as schema name #6123

Open
opened 2026-01-22 15:27:09 +01:00 by admin · 3 comments
Owner

Originally created by @FabianClemenz on GitHub (Dec 7, 2018).

Hi,

i try to create schemas on a MSSQL Server. It uses Windows Authentication to authorize users.

When i use the CLI command to create the schemas, it creates the Model like:

Domain\User.Table_Name

is there a way to provide a schema name? Or prevent doctrine from using the windows user & domain?

System:

  • Slim Framework
  • PHP 7.1.*
  • Doctrine 2.6.*
  • MSSQL 13
Originally created by @FabianClemenz on GitHub (Dec 7, 2018). Hi, i try to create schemas on a MSSQL Server. It uses Windows Authentication to authorize users. When i use the CLI command to create the schemas, it creates the Model like: Domain\User.Table_Name is there a way to provide a schema name? Or prevent doctrine from using the windows user & domain? System: - Slim Framework - PHP 7.1.* - Doctrine 2.6.* - MSSQL 13
admin added the Question label 2026-01-22 15:27:09 +01:00
Author
Owner

@Ocramius commented on GitHub (Dec 7, 2018):

In theory, you should be able to select a specific schema at connect time: https://www.doctrine-project.org/projects/doctrine-dbal/en/2.9/reference/configuration.html#pdo-sqlsrv-sqlsrv

@Ocramius commented on GitHub (Dec 7, 2018): In theory, you should be able to select a specific schema at connect time: https://www.doctrine-project.org/projects/doctrine-dbal/en/2.9/reference/configuration.html#pdo-sqlsrv-sqlsrv
Author
Owner

@FabianClemenz commented on GitHub (Dec 7, 2018):

Thanks for the fast reply. It connects to the right database, but prefixes the tablename with my windows domain and user on create. I wanted to avoid this

@FabianClemenz commented on GitHub (Dec 7, 2018): Thanks for the fast reply. It connects to the right database, but prefixes the tablename with my windows domain and user on create. I wanted to avoid this
Author
Owner

@FabianClemenz commented on GitHub (Dec 7, 2018):

it seems like, only i can see the created tables. Is it possible, to create tables for all users without providing UID/PWD in the config? (using the windows auth from current logged in user)

@FabianClemenz commented on GitHub (Dec 7, 2018): it seems like, only i can see the created tables. Is it possible, to create tables for all users without providing UID/PWD in the config? (using the windows auth from current logged in user)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6123