I am running into issues with executing the .purge command within Azure Data Explorer (Kusto).
Command:
.purge table myTable records <| where MyColumn == 'ColumnName'
Results in a
Error Principal 'aaduser=[ID]' is not authorized to perform operation 'PurgeTableRecordsCommand' on 'https://[cluster url]/'. clientRequestId: KustoWebV2;[ID]
Also running the example from : https://learn.microsoft.com/en-us/azure/kusto/concepts/data-purge
.purge table myTable records in database myDB <| where MyColumn in ('column1')
Results in a
Error Syntax error: Query could not be parsed:
I have checked with Access Control (IAM) on the cluster resource and contacted Azure team about my role/permissions and have Contributor role on the cluster and Database Admin role on the database.
Related
Installed airflow and am using the default sqlite DB. Finding that the Data Profiling Ad Hoc Query and Charts features do not work. Eg. in the Ad Hoc Query UI, setting the interpreter to sqlite_default and doing something like
select * from task_instance;
throws
Execution failed on sql ' SELECT * FROM ( select * from task_instance ) qry LIMIT 100000 ': no such table: task_instance
No data
and attempting to view the chart with label "Airflow task instance by type" throws
SELECT state, COUNT(1) as number FROM task_instance WHERE dag_id LIKE 'example%' GROUP BY state
SQL execution failed. Details: 'NoneType' object has no attribute 'get_pandas_df'
(clicking the pen icon in this screen just takes me to the mushroom cloud error screen).
Anyone know what is happening with this and how to fix while still using sqlite DB?
Be sure to put '/Users/{your_name}/airflow/airflow.db' in the host field of the Admin -> Connections.
I linked an oracle db to my sql server.
I need to create a same table as linked server on my local db.
I'm trying to execute SELECT INTO query but I taking an error.
SELECT * INTO ABC_SYSUSERS FROM [OfficeOracle]..[PROJECTA].[SYSUSERS]
This is my error message.
The OLE DB provider "ORAOLEDB.Oracle" for linked server "OfficeOracle"
supplied inconsistent metadata for a column. The column "USERNAME"
(compile-time ordinal 1) of object ""PROJECTA"."SYSUSERS"" was
reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time
and 0 at run time.
Any solution ?
Actually, I could not fix the error which I mention above but I fixed my problem with using OPENQUERY;
SELECT * FROM OPENQUERY(LinkedServerName, 'SELECT * FROM DBName.Schema.Table')
I am new to oracle. I have created the user axsaum in DB and logged in as the same user. When I try to access
select * from user_tables or dba_tables
its throwing error as table not exist
Please suggest me why i dont have privilege to access default tables?
how to access those?
SQL> select * from user_tables;
* ERROR at line 1: ORA-00942: table or view does not exist
SQL> select * from dba_tables;
* ERROR at line 1: ORA-00942: table or view does not exist
I think you need to give previliages to newly created user
you can use grant for giving permission to user
once permission given you can see tables as well as can perfrom DML and DDL on DB
for gratting previliages
for all permissions you can use
GRANT DBA TO axsaum ;
For other permissions you use below
GRANT CONNECT TO axsaum ;
GRANT SELECT ANY TABLE to axsaum
is a system privilege grant that allows user to select from any Table or View.
GRANT SELECT on some_table to axsaum
is an object privilege grant that allows user to select from Table.
GRANT SELECT, UPDATE ON some_table TO axsaum;
I have two database HB and DSHB. I am trying to create REFRESH FAST ON DEMAND materialized view in DSHB schema wherein HB is remote schema using dblink with following code,
CREATE materialized view MV_HB_SYSTEM
BUILD IMMEDIATE
REFRESH FAST
ON DEMAND
WITH PRIMARY KEY
AS
SELECT DELETED, SYS_NO FROM HB.HB_SYSTEM#HBLINK;
But getting following error in creation,
SQL Error: ORA-12018: following error encountered during code generation for "HB"."MV_HB_SYSTEM"
ORA-00942: table or view does not exist
But on running query " SELECT DELETED, SYS_NO FROM HB.HB_SYSTEM#HBLINK;" in separate connection works perfectly.
I have also created Materialized View Log with following code,
CREATE Materialized View Log ON HB_SYSTEM;
I have found in some forum that SELECT privilege on Materialized View Log needs to be granted as mentioned below,
GRANT SELECT ON MLOG$_<tableName> to DSHB;
where DSHB is the account that will accessing the log (ie via the db link).
But when i run this command from HB schema i am getting error stating DSHB user or role is unavailable in HB and i am unable to grant SELECT on Materialized View Log in HB schema. Is it possible to directly grant SELECT privilege to dblink from remote schema? i mean something like below query from HB schema. I tried but didnt work.
GRANT SELECT ON MLOG$_<tableName> to HB.HB_SYSTEM#HBLINK;
Please suggest how to resolve ORA-00942 error and create REFRESH FAST ON DEMAND materialized view.
I want to access a system table from within my ASP.Net application. Currently the application connects to the database StudentPortal with a user account of: WebAppClient.
When I try to run the following query logged in as WebAppClient I get the error:
The user does not have permission to perform this action.`
How can I grant access so that my user account can query that system table?
This is my full query:
SELECT TOP 1
100 - r.SystemIdle AS CPU
FROM (
SELECT
rx.record.value('(./Record/#id)[1]', 'int') AS record_id,
rx.record.value('(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]', 'int') AS SystemIdle
FROM (
SELECT CONVERT(XML, record) AS record
FROM sys.dm_os_ring_buffers
WHERE
ring_buffer_type = N'RING_BUFFER_SCHEDULER_MONITOR' AND
record LIKE '%<SystemHealth>%') AS rx
) AS r
ORDER BY r.record_id DESC
The user must be granted the "View Server State" permissions to view sys DMVs.
Here is the MS KB article.
Actual Satement: GRANT View Server STATE TO <user>