Replies: 6 comments 8 replies
-
You can use Also keep in mind that |
Beta Was this translation helpful? Give feedback.
-
Is driverOptions passed to new Connection(/* here */) of tedious? |
Beta Was this translation helpful? Give feedback.
-
I could get it working with this configuration (on tedious alone): const connection = new Connection({
server: 'localhost',
options: {
database: 'my_awesome_database',
instanceName: 'SQLEXPRESS2022'
},
authentication: {
type: 'default',
options: {
user: 'sa',
password: 'sa password'
}
}
}); |
Beta Was this translation helpful? Give feedback.
-
No, as I just said, it's passed to |
Beta Was this translation helpful? Give feedback.
-
As expected, you can just use https://github.com/knex/knex/blob/master/lib/dialects/mssql/index.js#L51 You need to think of this driver as knex dialect, not the db connection (in this case tedious). |
Beta Was this translation helpful? Give feedback.
-
Sorry, I was indeed forgetting about this layer of abstraction. I figured how to get it working with: MikroOrmModule.forRoot({
driver: MsSqlDriver,
dbName: 'my_awesome_database',
user: 'sa',
password: 'sa password',
driverOptions: {
connection: {
server: 'localhost',
options: {
instanceName: 'SQLEXPRESS200',
},
},
},
debug: true,
}), Thank you for your patience and the advices and sorry again. |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Hello,
It's not possible to pass the "server" parameter to mssql so it is not yet possible to connect to a named instance.
The documentation doesn't mention it either.
Tedious needs "server" option in format "HOST\INSTANCE" in order to allow connecting to a named instance of SQL Server.
Reproduction
What driver are you using?
None
MikroORM version
6.2.0
Node.js version
v21.7.1
Operating system
No response
Validations
Beta Was this translation helpful? Give feedback.
All reactions