Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

READ_COMMITTED_SNAPSHOT not recognized by SQL Server 2005

We're running SQL Server 2005 Enterprise SP3, and I'm trying to enable Row Versioning on a new database running in sql server 2005 mode.

Query (against master database):

ALTER DATABASE pod-moodle SET READ_COMMITTED_SNAPSHOT ON

Result:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '-'.
Msg 195, Level 15, State 5, Line 1
'READ_COMMITTED_SNAPSHOT' is not a recognized SET option.

Any ideas? I've triple-checked the master database and the pod-moodle database, they are both running in 2005 mode.

like image 303
pauska Avatar asked Jun 21 '26 12:06

pauska


1 Answers

If you use non-aplhanumeric characters in identifiers, then you need to delimit with [ and ]

ALTER DATABASE [pod-moodle] SET READ_COMMITTED_SNAPSHOT ON
like image 196
gbn Avatar answered Jun 23 '26 19:06

gbn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!