i'm using Sybase ASE 15.0 and when reading the extrainfo column from sysaudits_01 there are missing values. The manual says that in case of an update, the previous value and the current value will appear in the column. Tested different scenarios of updates, inserts, deletes but other than the words UPDATE/INSERT/DELETE nothing else appears.
Is there anything that should be turned on or something to do to be able to see the values?
Any help is appreciated.
L.E. Using sp_audit 'cmdtext', 'sa', 'all', 'on' --user level
Using sp_audit 'cmdtext', 'sa', 'all', 'on' --user level
Related
There are N tables in the DB with the following data types:
Numeric, long text, date and time bigint, boolean.
All of them opens, except one
I'm opening a database
db = QSqlDatabase("QODBC")
db.setDatabaseName(r"DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};DBQ=C:\Users\...\file.accdb")
db.open(username, password)
I output the tables contained in the db
db.tables()
Output:
["messages", "table1", "table2", ..., "tableN"]
And I'm trying to open the "messages" table
model = QSqlTableModel(db=db)
model.setTable("messages")
model.select()
Output:
False
Then I checked which other tables are not opening
for i in db.tables():
model.setTable(i)
if model.select() == False:
print(i)
Output:
"messages"
This means that the problem is only in this table.
But directly through MS Access the table opens
I have already tried to open it through the cycle. The keyword was found in db.tables(), but QSqlTableModel does not see the 'messages' table specifically.
I tried to change MS Access to the 2016 version. I thought, suddenly some certain type from MS Access 2019 conflicts with the old driver. It didn't help.
I was thinking of downloading a newer driver, but I didn't find one. I tried to dig into the registry... I didn't find anything either.
Please help
So, I figured out the problem by poking. I was initially right about the driver conflict with the bigint data type, but a few additional actions were missing.
Apparently, when you try to set the bigint data type and save it, Access warns you that because of it, databases may not support older versions, and you save anyway, it automatically sets the minimum supported version, or what?
Data separation helped, but before that you need to change the bigint data type to another data type. Database Tools->Move Data->Access Database.
My table is sqlite3 is created with the following:-
'CREATE TABLE IF NOT EXISTS gig_program ( gig_program_id VARCHAR(20) PRIMARY KEY );'
When I try to insert data into the table using python 3.8 with the following:-
sql = 'INSERT INTO gig_program ( gig_program_id ) VALUES ( "20200524120727" );'
cur.execute(sql)
the following exception was thrown:-
near "gig_program": syntax error
When I cut and past the insert command to the sqlite3 console, it works.
I have also tried using another editor for the program (thinking that there may be hidden characters) but the result is the same.
I would appreciate help. I have used similar methods in other parts of the program to insert data and they work without issue.
Thank you for looking into my questions.
I found that it was actually my mistake. The exception was actually for a second sql statement which I missed out the "FROM" word.
Thank you everyone for your time.
Hope everyone is doing well.
in snowflake it searches data with case sensitiveness while in sql server it used to search with case insensitiveness i changed database level collation with below command
ALTER DATABASE IF EXISTS powerdb SET COLLATION = 'en-ci'
but it did not help is there any other way to achive case insensitiveness
There's a number of ways really.
one of them is using ILIKE for your string comparison: https://docs.snowflake.net/manuals/sql-reference/functions/ilike.html
another one is setting up collation at column level:
https://docs.snowflake.net/manuals/sql-reference/collation.html
- but please note that not all of the string functions are supported on collated columns
also you can use COLLATION functions (also described in the link below) or set it on database level with account-level parameter of DEFAULT_DDL_COLLATION = 'en-ci'
everything depends on what you want to achieve really...
I'm trying to use the Data Factory in Azure to export data from a SAP BW. The connection is working, and I'm able to get data. The problem is how I'm getting the data. The picture describes the issue pretty well.
Has anyone encountered something similar? Any tips on how to approach this issue? Any help is greatly appreciated!
Query like:
SELECT
[Measures].<<Measure>> ON COLUMNS,
NON EMPTY
{<<Dimension>>.MEMBERS,
<<Dimension>>.MEMBERS} ON ROWS
FROM <<Cube>>
Picture:
https://i.stack.imgur.com/9Gxfh.png
Best regards,
This is how your query should look like.
select Measures.Value on columns,
nonempty
(
DimPlan.Plan.Plan,
DimCategory.Category.Category,
DimProduct.Product.Product
)
on rows
from YourCube
Looks like you are getting the ALL members of each hierarchy coming through into the results.
Very similar to MoazRubs answer but avoiding needing to use the NonEmpty function - you can simply cross-join the hierarchies via the * operator:
SELECT
Measures.Value ON 0,
DimPlan.Plan.Plan.MEMBERS *
DimCategory.Category.Category.MEMBERS *
DimProduct.Product.Product.MEMBERS
ON 1
FROM YourCube;
Using SQL Server 2012 and I have somehow ended up w/ an index named:
<Name of Missing Index, sysname,>
I'm not sure how or when it happened. I've tried dropping this index using:
DROP INDEX EMAIL_ADDRESS.<Name of Missing Index, sysname,>
It won't of course since I receive the expected error message:
Incorrect syntax near '<'.
Querying the DMV in SQL Server tells me I should drop this index so it's even more frustrating that I cannot. This has been one of those little things that has gnawed at me for a few years now. I've looked for answers a few times now over the years. I've probably poured 4 hours into finding a way to drop an index by something other than name. Nothing.
Can someone help me? Running this query:
SELECT * FROM SYS.INDEXES WHERE NAME = '<Name of Missing Index, sysname,>'
Produces an OBJECT_ID of 281104092. Is there a way to drop the object using this ID? There must be, right? Am I just stuck w/ this crazy index forever?
Try to delete with Database Owner Name. It worked for me.
DROP INDEX ccl2.[TBL_HamdunSoft].[<Name of Missing Index, sysname,>]
Or
DROP INDEX dbo.[TBL_HamdunSoft].[<Name of Missing Index, sysname,>]