How can I indicate that my application should start SQL Server LocalDb with the trace flag setting?

My application uses an instance of LocalDb to store data. I noticed a fad in that LocalDb allocated identifiers (explained more here ), which I would like to avoid. A related answer explains that this can be done by setting the SQL Server trace flag and explaining how to do this for SQL Server "fat".

Is it possible to set the trace flag on LocalDb? Since my application launches it on demand, can this be done via the connection string?

+4
source share
1 answer

, ...

Regedit localdb.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL12E.LOCALDB\MSSQLServer\

.

Parameters (REG_SZ) SQLArg0 -T272.

LocalDB, SQLLOCALDB.EXE , stop . :

C:\> sqllocaldb stop mssqllocaldb

LocalDB , .

DBCC TRACESTATUS(), , 272 . :

C:\>sqlcmd -S (LocalDB)\MSSQLLocalDB -Q "DBCC TRACESTATUS();"

, VS2015- . LocalDB (sqlservr.exe), VS2015 , 1000. , LocalDB .

+3

Source: https://habr.com/ru/post/1651820/


All Articles