MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT on SQL Server 2014 CTP1 - sql-server

I am trying to edit this option with the following script:
ALTER DATABASE RIServer
SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT ON;
GO
As far as I can tell, the syntax is correct (per msdn). However, I get the following:
Msg 102, Level 15, State 6, Line 9
Incorrect syntax near 'MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT'.
Am I doing something wrong? Is this setting not available on CTP1? Do I need to install CTP2?

I believe that option was added between CTP1 and CTP2.
YOU SHOULD NO LONGER BE USING CTP1. Yes, you need to install CTP2.

Related

How do you change the DURABILITY option on an existing memory-optimized table in SQL Server 2016?

I want to change the DURABILITY of a memory-optimized table in SQL Server 2016 from SCHEMA_AND_DATA to SCHEMA_ONLY.
The Microsoft documentation suggests that the following ALTER TABLE statement should work:
ALTER TABLE mem_opt_table
DURABILITY = SCHEMA_ONLY
But it gives the following error:
Msg 102, Level 15, State 1, Line 12
Incorrect syntax near 'DURABILITY'.
What is the correct syntax for changing the durability setting on a table? Are there any additional steps that I am missing?
The documentation linked in the original question is faulty as was suggested by many of the comments. That is confirmed in the github issue response here: https://github.com/MicrosoftDocs/sql-docs/issues/3523#issuecomment-554511264.
Therefore, the only way to do this is to drop the table and re-create it with the desired DURABILITY setting.

sys.dm_exec_query_stats returns 'invalid column name'

When I execute this statement in SSMS (SQL Server 2012):
SELECT * FROM sys.dm_exec_query_stats
the statement fails and it returns about 20 messages saying
Msg 207, Level 16, State 1, Procedure dm_exec_query_stats, Line 11 [Batch Start Line 0]
Invalid column name 'total_dop'.
Msg 207, Level 16, State 1, Procedure dm_exec_query_stats, Line 11 [Batch Start Line 0]
Invalid column name 'last_dop'.
And so on.
Can anybody explain what's the problem here?
Thanks in advance.
EDIT:
Here's a screenshot:
Your mssqlsystemresource database is out of sync. Looks like manual replacement of the resource database in binn folder, which obviously is not a supported scenario. You must contact MS support to troubleshoot and fix your problem.
Perhaps we can confirm the case, if you run this and post the results:
SELECT SERVERPROPERTY('ResourceVersion');
GO
SELECT SERVERPROPERTY('ResourceLastUpdateDateTime');
GO
SOLVED.
I installed the latest Service Pack and the problem is gone now.
Thank you all for your cooperation and help.
Bliek

SQL Server Msg 2108

I created and altered a trigger and everything worked well, but when I started the SQL Server Management Studio later on, the following error appeared:
Msg 2108, Level 15, State 1, Procedure store_110, Line 43
Cannot create trigger on 'IT_ServerDB.dbo.Users' as the target is not in the current database.
Cannot create trigger on 'IT_ServerDB.dbo.Users' as the target is not in the current database.
It seems ,you are using three part naming like below
'IT_ServerDB.dbo.Users
use two part naming
use IT_ServerDB
go
create trigger triggername
on
and rest of syntax

Could not delete database in SQL Server Management Studio

I have a database aspnet-Ebuy-20151210093351. I use the command:
drop database aspnet-Ebuy-20151210093351
to delete it, but I cannot do it, I get an error message:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '-'.
You need to escape the database name with brackets, without which SQL Server will interpret the dashes - as being subtraction symbols.
drop database [aspnet-Ebuy-20151210093351]
Have you tried wrapping the table name in Brackets []?
drop database [aspnet-Ebuy-20151210093351]

What SQL syntax is this?

Can anyone tell me what SQL syntax this is please where 123 is the argument passed to the SP?
EXECUTE sp_MyStoredProcedure = '123'
When executing this command the error message from MSSMS is
102, Level 15, State 1, Line 6
syntax near '='.
We need to configure the DB (SQL Server 2008 Express) to accept SQL of this syntax as it is generated by a windows service that we can't change. Trying to set the DB compatibility doesn't work...
ALTER DATABASE ABC SET Compatibility_Level = 80 / 90 / 100
EXECUTE sp_dbcmptlevel 'ABC', 80 --80,90, 100
Thanks in advance
According to the help topic, this syntax is just invalid and apparently never was valid for SQL Server. It looks nonsensical, too. Does it work for some other DBMS?
EXECUTE sp_MyStoredProcedure '123'
The syntax was invalid. The SQL in the windows service was obsolete.

Resources