Which Table in DNN will contain Admin Logs? - dotnetnuke

I need to export Admin Alerts from DNN's database.
Which table contains this?

All the logs for DNN are placed in EventLog table, you need to run a direct database query to access eventlog records

SELECT
*
FROM
[dbo].[EventLog]
WHERE
LogTypeKey = 'ADMIN_ALERT'

It is the table EventLog. But keep in mind that since DNN 7 (I think) the logs are automatically removed. In earlier versions the default settings would be to keep all log items, so the table EventLog would sometimes contain millions of records.
So if you want to keep certain logitems for export you need to modify the settings in "Admin > Log Viewer > Edit Log Settings". You'll see a row of log types. You can edit the one you need to change the settings.

Its "EventLog" table from DNN database

Related

Logging to windows application event log

Hi this is basically what I want to do in sql server management studio.
Whenever any user tries to delete or update the data in the table, it needs to be logged into the Windows Application event log.
Is there anywhere I can reference how to do this? I can't find anything.
Thanks
Full Question:
As the Products table is a very important table, the company wishes to track selected changes to the
table. Whenever any user tries to delete or update the data in the table, it should be logged into the
Windows Application event log. However, there is no need to undo the changes as it may be a
legitimate change.
You should use SQL Server Audit for that. When you create a server audit, specify audit destination to be Windows Application Log. For more information, see CREATE SERVER AUDIT (Transact-SQL). Since it is a school assignment, I believe it will be the best for you to try write it yourself. Good luck!
Realize this is an old question but I recently had to deal w/something like this again myself. I used the following (although you may/may not run into permission issues depending on how you run it):
EXEC master..xp_logevent 50001, 'My log message here...', 'INFORMATIONAL'
More info here

How do I refresh the columns of a view in SSDT?

I'm getting this error when trying to deploy a SQL Server Data Tools (SSDT) database project:
View or function 'dbo.Employees' has more column names specified than columns defined.
I deleted a column from the underlying table and the view looks like this:
CREATE VIEW [dbo].[Employees] AS SELECT * FROM [$(ExternalDB)].[dbo].[Employees];
Doing a Google search brings back this page which says that SQL Server keeps meta data on views which must be refreshed. They mention this command:
EXEC sp_refreshview 'Employees';
If I put that in the pre-deployment script, it'll run before the column was dropped. If I put it in the post-deployment script, the deployment will throw the error before it gets executed. So my question is where or how can I do that with an SSDT project?
This is interesting as by default ssdt will refresh any views which depend on any table that has changed as part of a deployment.
Was the column dropped as part of a normal ssdt deployment?
In your publish profile or publish options are you setting ScriptRefreshModule to false?
Aside from this select * in a view is bad practice, put the full column list and this problem disappears, you can even right click the "select *" and choose to expand to get the full column list - do that instead :)
Ed

Reporting Services 2008 - The user or group name 'xxx' is not recognized. (rsUnknownUserName)

I got a SSRS 2008 web edition instance (which was migrated from 2005 standard edition) and I need to change some security for a new folder I`ve just created.
When I go on report server web page (http://rsServerName.xyz/Reports), enter the new folder, go on folder properties, then when I click on Security, web page returns an error The user or group name 'xxx' is not recognized. (rsUnknownUserName)
I`ve checked the user in database - it exists, it has some items (reports) assigned to it, seems fine just like other users from database.
I first thought to just go into database and remove the entries from PolicyUserRole for users that aren't allowed into that folder, but there's also some info in SecData, and maybe some other places, and also found that microsoft doesn't support any queries against their reportserver database, so that might not be the brightest idea :)
Does anyone know any other way to remove the security from a specific folder ? Or maybe things to look at for this user name that it fails ? Another thing to mention, all security problems started when server was migrated from 2005 standard to 2008 web edition.
Thanks.
The only possible way to fix this was to remove the user completely and add it back. During the migration described above several user's permissions were affected, and the only way to fix was to re-create them from scratch - not elegant, but worked.
Solution - find the user, remove, add back.

Can't find umbraco data storage

I have installed Umbraco via WebMatrix, and entered "server=(localdb)\v11.0;integrated security=true" as a connection string. The site works fine, but I can't find the database that Umbraco have created. When I open the (localdb)\v11.0, it's not there.
I have tried searching whole system with *.mdf. but no luck. Where can the data be?
I am using umbraco 4.8.0
Most likely the database is in the user profile folder of the account that Umbraco is running under. See this post for more complete explanation. You may also want to look at this other post about why LocalDB by default puts the database file in the root of the user profile of the account it runs under.
I have found it. With no Database defined, SQL server uses the first or the default database in the list, which appears to master database. SSMS and such, don't display tables of system objects, so I found the tables by querying the database.

DotNetNuke EventLog table is deleting

New to DotNetNuke (ver 05.06.02 (144)) and writing a SSRS report to track how many times users have logged into the system, since that is part of their job requirements.
It appears this data is stored in EventLog.LogTypeKey --> "LOGIN_SUCCESS" being the item I need to count.
The problem is that the table is getting purged somehow. I have no hits on any successful logins that are older than roughly 24 hours.
Does anyone know the setting that is purging these values?
Thank you
If you go to the EVENT VIEWER page and go to the actions menu for the module, you can go to specific events and see what the default number of historical items to store is configured to.
EX: the LOGIN_SUCCESS event I believe stores 10 records, after that entries are trimmed from the database.
Each event type can be configured separately.
By default, DotNetNuke does not purge the EventLog table. You can find DNN's scheduled tasks in the Host menu's Schedule page. DNN schedule can execute any code that inherits the SchedulerClient base class provided by the DotNetNuke framework. But there is no EventLog purge code shipped as a scheduler client.
It is possible that the site administrator has added EventLog purging. Have you checked if there are any SQL Server Jobs, or Windows scheduled tasks? There is also a Scheduled SQL Jobs module to schedule sql scripts.

Resources