why i can't turn on MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT in Sql Server - oltp

i wanna turn on MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT on sql server ,but I can't set this,
coding:
CREATE DATABASE InMemOLTPDB;
GO
USE InMemOLTPDB;
GO
ALTER DATABASE InMemOLTPDB SET MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT = ON;
error:
message 102,level 15,state 6 ,row 1
“MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT” has a statement error
I wanna know why has this problem and how to fix or set this attribute

Related

HTTP status code: 404 Received error: Code: 47, e.displayText() = DB::Exception: Unknown identifier: TableauSQL.cnt, e.what() = DB::Exception

I connected to clickhouse with tableau.
A query like this
select * from table_name limit 1
returns fields of the table, even though it should return raws.
image
If I try
select subs_key from table name limit 1
And click preview results
preview results
I get the error from above(except cnt is replaced with subs_key or whatever field I try to select)
How can I actually view table data?
Edit
There is a connection to the db, but no table is shown in available schemas.
EDIT 2
I managed to connect and get data from an oracle and mysql database, but while I am connected to click house, I can't see any data.
Don't quote me on this but I believe tableau has not official support for clickhouse, at least I could not find anything to contradict this, tons of people asking for it but nothing concrete.
There might some sort of beta integration that's not yet stable, hence you problem, but this is just blind guessing.
What I can recommend, if you really need a UI and can't just use the cl client is using tabix:
https://github.com/smi2/tabix.ui
Its fully open source for now and should be pretty easy and straight forward to learn, there might be the odd bits of Russian here and there, but I believe its getting debugged and translated at quite a good pace.
I get the same error message when I use DBeaver.
SQL Error [47]: ClickHouse exception, Code: 47, e.displayText() =
DB::Exception: Unknown identifier: default_type, e.what() = DB::Exception
If it's not a coincidence, then it's a JDBC driver bug.

R and Vertica connection problems

I can connect R with Vertica, but when I try to get data from Vertica I get the following error message:
[Vertica][VJDBC](3580) ERROR: Insufficient privilege: USAGE on SCHEMA 'bi_analysts' not granted for current user
This is my code:
library(RJDBC)
vDriver <- JDBC(driverClass="com.vertica.jdbc.Driver",
classPath="my_path/vertica-jdbc-7.0.1-0.jar")
vertica <- dbConnect(vDriver, "jdbc:vertica://...",
"my_uid", "my_pwd")
myquery= dbSendQuery(vertica, "my_query")
I guess I should do something like:
query = dbSendQuery(vertica, "SET ROLE bi_analysts")
but if I try to do that, I get the same error message.
ok... solved....
I did this:
dbSendUpdate(vertica, "SET ROLE BI_ANALYST")
(dbSendUpdate doesn't return any result set!)
To avoid this situation make sure you make the roles as default to your user.
See example here :
ALTER USER user_name DEFAULT ROLE role_name;
- this way you don`t need to run set role every time

Change ODBC-Connection in Access 2007

I hava a Pass-Through sql-query in access which queries my mysql-db.
My current ODBC connection for the query is defined as follows:
ODBC;UID=access_frontend; PWD=hello#world; DSN=my_db_test;
If I change my ODBC connection from my test to my normal DB
ODBC;UID=access_frontend; PWD=hello#world; DSN=my_db;
If I save my changes and restart again, Access has changed it back to my_db_test.
Is there any place where I can globally change my ODBC connection?`
I do not get this problem changing in code or manually. You can change the connection through VBA:
Dim qdf As QueryDef
''dbQSQLPassThrough = 112
For Each qdf In CurrentDb.QueryDefs
If qdf.Type = dbQSQLPassThrough Then
Debug.Print qdf.connect
qdf.connect = "ODBC;filedsn=z:\docs\test.dsn;"
Debug.Print qdf.connect
End If
Next
You will notice that the passthrough query illustrated refers to:
filedsn=z:\docs\test.dsn;
This is another easy way of changing the connection, just change the DSN, in the above case, you could just edit the file test.dsn.

How to ignore errors from nested stored procedures in a SQL Server 2000 procedure called from ASP

I am working on a "classic" ASP application with a SQL Server 2000 database.
We have a stored procedure (let's call it SP0) that calls other stored procedures (let's say SP0.1, SP0.2 ...) which themselves call another stored procedure called SPX.
All those procedures generate errors when something goes wrong using RAISERROR().
We want to be able to launch SP0 with a parameter #errorsInResultSet which will change its behaviour : instead of "re-raising" the errors as it does so far, each sub-procedure will log the errors in a temporary table #detectedProblems and return it at the end.
Adding errors to the temporary table is not a problem, but I can not figure out how to ignore the errors generated by the nested stored procedures.
I have done this so far :
EXEC #rc = [SP0.1] #errorsAsResultSet = #errorsAsResultSet
IF (0 <> ##ERROR) OR (0 <> #rc)
BEGIN
IF (#errorsAsResultSet <> 0x1)
BEGIN
RAISERROR('SP0.1: Error for table Tests in db %s.%s', 16, 1, ##SERVERNAME, #db)
END
GOTO FAILURE
END
This works fine, but it still generate errors from the lowest SPX, which prevent it from being executed by ADO in classic ASP.
How can I ignore the errors ?
If you're happy that the errors are being logged and it's safe to continue, you can use ON ERROR RESUME NEXT on the line before the SP call. This will prevent the page from throwing errors.
To turn back on errors later in the page, you can use ON ERROR GOTO 0
In the end, it looks like there is no way to "hide" messages generated by PRINT or RAISERROR statements in SP0.1, SP0.2 from the calling Stored Procedure, which means that the execution is always interpreted as "erroneous" by ASP.
In the end, I rewrote a new Stored Procedure with a special parameter to configure how to report errors.

Biztalk - can I change the receive port of an existing receive location?

I have two different receive ports and two receive locations - one location assigned to each port. The ports are set to receive the exact same type of file - I ended up with both because I consolidated two different applications that did the same thing.
I want to combine both locations into a single receive port, but I don't seem to be able to change the location that either belongs to - there's no option to do this that I can find. Essentially, I just want to take one location (either - I don't care), and assign it to the other port, so that one port has two locations and the other has none.
Does somebody know of a way to change the receive port of an existing location?
I resorted to the dark side, and updated the SQL table manually. I'd still welcome anybody who has a legitimate, supported way to do this, but to any others who need an answer, here's the script I wrote to fix this problem (no side-effects so far, though it's only been a day):
DECLARE #AppName VARCHAR(255),
#ReceiveLocationName VARCHAR(255),
#NewReceivePortName VARCHAR(255)
SET #AppName = 'Your application name'
SET #ReceiveLocationName = 'Name of your existing receive location'
SET #NewReceivePortName = 'Name of receive port to move location to'
DECLARE #NewPortID INT
DECLARE #ReceiveLocationID INT
SELECT #NewPortID = rp.[nID]
FROM [BizTalkMgmtDb].[dbo].[bts_application] a
JOIN [BizTalkMgmtDb].[dbo].[bts_receiveport] rp
ON a.nID = rp.nApplicationID
WHERE a.nvcName = #AppName
AND rp.nvcName = #NewReceivePortName
SELECT #ReceiveLocationID = Id
FROM [BizTalkMgmtDb].[dbo].[adm_receivelocation]
WHERE Name = #ReceiveLocationName
UPDATE [BizTalkMgmtDb].[dbo].[adm_receivelocation]
SET ReceivePortId = #NewPortID,
IsPrimary = 0
WHERE Id = #ReceiveLocationID
Please do not attempt such direct SQL changes in BizTalk system databases. You always use the API's provided by Microsoft.
Try either the ExplorerOM or WMI to do any such configuration changes.
http://msdn.microsoft.com/en-us/library/microsoft.biztalk.explorerom.receiveport_members(v=bts.10)
http://msdn.microsoft.com/en-us/library/ee277482(v=bts.10).aspx
If in case you make direct DB changes and raise Microsoft support, they won't support it.

Resources