How to query in SQL tables of Dynamics 365 on premises for audit changes of specific field by old and new value - crm

I need to query Audit log information like
" When and by whom the Field1 was changed from "oldValue1" to "NewValue1" ".
This should be done in SQL database of Dynamics 365 on premises.
I have found Audit table, but I can not find in it information on filed name and new value, can someone help me with that?
Thanks in advance

You can follow this article to query audit table via sql
Recommended way is using SDK of crm, Here is using API
In addition there are XRMToolBox Plugins wherein you do not need to code or query, it is a tool and will give you all the info.
https://www.xrmtoolbox.com/plugins/AuditHistoryExtractor/
https://www.xrmtoolbox.com/plugins/MESquare.XrmToolBox.AuditExplorer/
https://www.xrmtoolbox.com/plugins/BDK.XrmToolBox.UserAuditViewer/

Related

Identify deleted records in PDMlink by querying tables

The PDmlink records are hard deleted in WIndchill from the backend tables.
Users have access to delete the objects created and hence i need to find a way to identify the records deleted.
Is there any table which gives this information in PDMlink database?
Regards
Maha
There is a table called AUDITRECORD in DB which has the details about all the events happened it includes Delete event. But the information will be available only if you have configured Audit Event Recording.
If you have configured then you can get the details by using below query.
select * from auditrecord where eventlabel='Delete';
Refer Windchill helpcenter for steps to configure audit event recording.
In case you have not done this configuration and still wants to fetch the data about deleted objects then
Apache Web server logs and looking at backup of database or current
database doing a negation query to match part object identifer in
apache logs against those still remaining in database. Lot more work,
but not impossible.

ireport cannot recognize the table from oracle 11g database

I am a beginner to ireports.I want to create an ireport with oracle 11g using the default tables present in xe. I used EMP table from xe and it showed error ORA-00942 table or view does not exist when i run the query select * from EMP.
Please help!!!
Generally speaking, you should connect to user that contains tables you'd like to use in the report you're creating. So, if it is EMP table and it belongs to Scott, connect as Scott.
By default, its username/password combination is scott/tiger (all lower case). There's a chance that it (user) is locked. If so, connect to the database via SQL*Plus or SQL Developer or any other tool you use (as a privileged user, such as SYS or SYSTEM if there's no other you have - I presume you don't) and do the following:
alter user scott account unlock;
alter user scott identified by tiger;
After that, establish connection to Scott in iReport (providing previously mentioned credentials) and you should be able to query the EMP table.

How to access Alfresco database?

I would like to know if there's a way to connect to or see the database behind alfresco community.
Is there any way to access alfresco database?
The information necessary to connect to the database is stored in the file
tomcat/shared/classes/alfresco-global.properties
in your Alfresco installation directory. The relevant configuration looks like this (for PostgreSQL):
### database connection properties ###
db.driver=org.postgresql.Driver
db.username=alfresco
db.password=secret*password
db.name=alfresco
db.url=jdbc:postgresql://localhost/alfresco
This allows you to connect to the PostgreSQL database using a a client of your choice.
Edit: The Alfresco database is highly normalized. Some tables to start at are:
alf_store
alf_node
alf_node_properties
There are many foreign key constraints that reference other columns, for example:
alf_node.store_id references alf_store.id
alf_node_properties.node_id references alf_node.id
If you want to get specific data from the database and don't know how, please ask a new question.

item reader in spring batch is not able to read a oracle table

Item reader in spring batch is able to read other tables But it is not able to read a table. But I am able to read it in sql developer. I am getting exception like reader initialization failed.
Can Someone help me on this?
I found the mistake i have done. The user which i am using in java to access db hasn't privilege for the table i am trying to access.. In SQL developer i am using the user which has privilege for all the tables.
Thanks a lot for your response and time.

ASP.Net & SQL Event Log

I've created this ASP.Net application and need to record what the users have done for each project on the DB.
I'm using an SQL express database for testing purposes but will migrate it to a SQL Server 2008 when deploying live.
I decided to add to each action some queries that add to a tblLog the data that I want, and then I can see what was done, for example:
Date Description
3/15/2011 Risk changed from 20 to 50 by xxxx
3/14/2011 Complexity changed from 50 to 40 by xxxx
3/14/2011 Project A removed as Dependency by xxxx
3/13/2011 Project B added as Prerequisite by yyyy
3/12/2011 Project C removed as Prerequiste by yyyy
Now this works fine, except I have to pretty much hard code each query for any possible action... which I'm sure is not the best solution.
So my question: is there a way for me to pull that kind of event log that I can pull from the DB? After all the SQL DB is getting modified so maybe I can pull what happened directly from there. Or is there maybe an even better solution to create an event log?
Thanks
Be careful that the size of this table doesn't explode on you.
Would it be easier if you split "description" into multiple columns? Maybe:
Date
ChangedTable
Action (add, remove, update)
InitialValue
NewValue
UserID

Resources