DotNetNuke EventLog table is deleting - dotnetnuke

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.

Related

Is it possible to restrict an SSRS report on Report Manager to one user at a time?

I have an SSRS report published to Report Manager, available to all Domain Users. The report's stored procedure executes a xp_cmdshell which outputs SQL data to an excel file in a shared file location. The issue is the report can't handle being run concurrently - anyone trying to run the report simultaneously with another user gets a blank file, or, worse, a file with missing data. I can't redevelop the solution right now, what I'm hoping to do is restrict the report to one user at a time, either within the SSRS report, via report manager config or the SharePoint link on our intranet (which users access the report by). Everything is on-prem.
I've tried the report config, RM config, our SharePoint developer and Google and none are helping. Thanks.

Which Table in DNN will contain Admin Logs?

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

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

generate a file through SQL Server by query

I'm working on a project which is based on daily activity.So i need to provide multiple reports at the end of the day by using export/Import Wizard it will take around 30-40 min of time.
In this case am thinking that i can write a query to generate these reports are done by a single query.It saves my time.
There is any chance to do this?
You have many options. Two good options to save your time, and generate the results of many queries in file format, are:
SSRS
SSRS Scheduled Reports, if you have that available to you.
To configure a subscription to deliver a report to a file share
In the Configuration Manager console, navigate to System CenterConfiguration Manager / Site Database / Computer Management /
Reporting / Reporting Services / , and expand the
node.
In the results pane, right-click a report and then click New Subscription.
On the Subscription Delivery page of the Create Subscription Wizard, specify the delivery properties for this report subscription.
From the Report delivered by drop-down list, select Windows File
Share. For more details about the options on this page, see Report
Subscription Dialog Box: Subscription Delivery Tab.
Click Next to continue.
On the Subscription Schedule page of the Create Subscription Wizard, configure the schedule by which the report will be generated
and delivered to the file share. For more details about the options on
this page, see Report Subscription Dialog Box: Subscription Schedule
Tab.
Click Next to continue.
On the Subscription Parameters page of the Create Subscription Wizard, specify any parameters that this report needs to run. For more
details about the options on this page, see Report Subscription Dialog
Box: Subscription Parameters Tab.
Click Next to continue.
On the Summary page of the Create Subscription Wizard, review the subscription that will be created and then click Next.
On the Confirmation page of the Create Subscription Wizard, review the actions taken and then click Close to exit the wizard.
SQLCMD
And using the Windows scheduler or a batch file run by hand to have sqlcmd run one or more queries and/or stored procedures on a schedule, outputting to one or more files.
Both Excel and Libreoffice will read tab delimited files; to do so with sqlcmd see this stackoverflow answer.

Restricting SSRS subscriptions to shared schedules only

I'm reasonably new to SQL Server Reporting Services and Report Manager, and completely new to SSRS's Subscriptions. We're running SSRS 2008.
Out of the box it seems that a user with the Browser role can create a Subscription to a report and schedule it to run at any time they choose.
As an admin I have setup a schedule called "Overnight reports" and have it run every night from 1am.
I would like it so that when a regular user creates their Subscription they can only use one of my shared schedules so that their subscription will only run overnight.
Is this possible?
Thanks
-Matt
OK well I haven't been able to find an answer for this.
I am able to hide the radio button for selecting their own schedule and the "Select Schedule" button using CSS, by changing ReportingServices.css (located in C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportManager\Styles on my Win 2008 server)
input#ui_rdoOnSchedule { display:none; }
input#ui_btn_SpecifyScheduleSubscriptionProp { display:none; }
However it's not very elegant - the text for "When the scheduled report run is complete" and "At 8:00 am every Mon of every week" is still visible.
-Matt

Resources