Restricting SSRS subscriptions to shared schedules only - sql-server

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

Related

Activity Monitor always Paused in SSMS 17.8.1

Whenever I open the Activity Monitor in SQL Server Management Studio 17.8.1(14.0.17277) the overview always switches to (paused). Even if I choose resume, it quickly changes back to paused.
This happens on a variety of SQL Servers and SQL Server versions (2005 through 2016) so I don't believe it is a conflict with old vs new SQL Setups.
I can run Activity Monitor in SSMS 2012 (11.0.2100.60) on the same servers with no error which confirms that the service is actually running and functional.
Any help or insights would be appreciated. I'm not a fan of switching back and forth between two management studios if I can help it. (I uses 17 so I can have context menus when right clicking on items in SSMS which wont work on 2016 servers in older versions of the studio).
I setup a basic SQL login and found that activity monitor was permanently paused for this login. Then I granted this login the "View server state" permission and activity monitor now works. To do this, open up the Security and Logins folders for the relevant server instance, right click a login and choose properties. Choose Securables and you should see all Permissions listed in the bottom pane. Put a tick in the grant column next to "View server state".
Run as administrator helps, but I only see this happen on SQL clusters
However I have found the following somewhere, can't remember where.
And I added the AD group with Sysadmin rights using these steps 1-5
Click Start, click Run, type DCOMCNFG, and then click OK.
In the Component Services dialog box, expand Component Services, expand Computers, and then right-click My Computer and click Properties.
In the My Computer Properties dialog box, click the COM Security tab.
Under Launch and Activation Permissions, click Edit Limits.
In the Launch Permission dialog box, select your user and group in the Group or user names box. In the Allow column under Permissions for User, select Remote Launch and select Remote Activation, and then click OK.
Seems I don't need to follow step 6-8, so I have not tried these.
Under Access Permissions, click Edit Limits and give Remote Access to your user.
Go to DCOM Config(Expand My Computer), find "Windows Management Instrumentation", right-click and select Properties
In the Security tab, click on Edit under Launch and Activation Permissions, and give your user Remote Launch and Remote Activation.
I experienced the same as Izulien (running v 17.7 of SSMS), in out production environment with my personal user.
Reconnecting to dbs and restarting SSMS did not help.
However I did have access via the sa user to our dev-environment. Using the sa user did the trick in dev, and the same applied for our production environment, leading me to assume that this is connected with privileges/roles on my user.
In the environments that I manage, that only happens when I am using SSMS in a different computer, other than the server where actually the SQL Server ENGINE is installed. That is: SSMS client on a PC, and SQL Server engine/instance in a server. For me, 99% of the time this means: I am in Florida running a local PC Virtual Machine on my personal iMacPro, running SSMS, accessing a SQL Server server in Chicago via VPN.
So, I tend to believe this may be some sort of network timeout that happens..?
This is just a theory of mine. Because, if I actually Remote Desktop into the SQL Server itself and run SSMS locally in the server the Activity Monitor does not pause.
My two cents. Maybe someone can unravel this better.
EDIT: Also, I notice that it's when I expand the processes panel that shortly thereafter it pauses. If I leave the processes panel collapsed it does not happen, or at least not as promptly. AND, interestingly, if I open Activity Monitor, then I do NOT immediately open the process panel and let the graphs run for a while, say, two minutes, and THEN I open the process panel it does not pause anymore.
It seems to be that the initial population of the graphs AND the initial population of the process panel at the same time that cause the problem. At least that's the case for me across the SQL Servers I manage.
R.

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.

SQL Server Agent permissions versus user permissions

I am setup as an admin on our SQL Server 2012 and I have created a job that runs a procedure that selects records from 2 joined tables. This all works fine when I am logged into SSMS and manually launch the job. The problem is when I try to schedule the job to run (even if I am still logged into SSMS) the same job does not return records from the second table, it is like the join does not work.
I checked and the SQL agent is using the main SQL Server service account which I am assuming would have rights to everything.
Any thoughts on trouble shooting would be appreciated.
On the Steps page of the sql job you can tell it to "Run As" a particular user.
Otherwise, the account that the SQL Server Agent runs under would have to have rights to all databases/tables, etc.
You should be able to see what's happening when the job runs on a schedule by viewing the job history. You do this by right-clicking either the job in your list of jobs or by right-clicking the job in the Job Monitor and selecting 'View History'.
Hope this helps.
Was a corrupt job. I deleted the job and recreated a new one and it worked as expected.

Stop Email from being sent Temporarily

I have a number of Subscriptions on SQL Server Reporting Services that are automatically fired off on a certain day and time. The only way I can think of stopping the subscription is to delete and then recreate it after.
Is there any other way i could do this?
If i was to use this, would it work?
USE msdb
GO
EXECUTE dbo.sysmail_stop_sp
GO
You can try pausing the shared schedule, as documented on MSDN:
Pause a shared schedule
If a report or subscription runs from a shared schedule, you can pause
the schedule to prevent processing. All report and subscription
processing driven by the schedule is deferred until the schedule is
resumed.
SharePoint mode: SharePoint Settings In Site settings, select Manage shared schedules. Select the schedule and click Pause selected
schedules.
Native mode: In report manager, click Site Settings. Select the schedule and then click Pause.

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