Team Foundation Server 2013 Release Management Scheduled Deployments - ms-release-management

With TFS2013's new Release Management, is it possible to deploy at a given date/time, as in scheduled releases.
For minimized impact on users in Production, we'd like to be able to deploy during down time (during the night for example).

Yes.
When approving the acceptance step (first step of a stage), in the popup, you will have the option to approve now, or give a date and time. If you select a date/time, the deployment will be triggered only then.
No need to wake up in the middle of the night!

Related

Sending emails automatically using SQL Server job

I'm developing a .NET desktop application with SQL Server as the database backend. One of the requirements of the application is that if a record status, for example, remains inactive for 30 days, there will be a reminder email sent to the user associated to that record.
This could be done pretty easily within the application, as long as it is started and running. However, assume that for a certain period of time, nobody starts up the application, the reminder email won't be sent, because nothing / nodody triggers the action.
How about creating a job in SQL Server which can monitors the records and sends emails as needed? Has anyone ever done that?
Thanks a lot!
Given the requirements of your task, I suggest that you create a console program (w/ C# or VB.NET) that checks for inactive (30 days) row condition and then generates the appropriate email notification message. Then run this program every hour or so (depending on the urgency involved in detecting an inactive row condition) using a SQL Server Agent Job.
The following image shows how the SQL Server Agent Jobs are displayed in the Object Explorer for SQL Server 2008 R2.
This SO entry covers some aspects on creating a console program that runs at certain times. The SQL Server Job Agent has several scheduling options that should facilitate your needs.
You might be reluctant to create a console program for this, but you are apt to find that doing so gives you options that are simply not easily implemented with a pure SQL Server based approach. Plus, you may have future needs that require similar processing that this approach provides.

Transactional replication failing

i am facing issue in sql server Transactional replication and not able to get the root cause for it. First, let me tell you that i am not a DBA, so i may be dumb on few DBA concepts.
i am .Net developer and i have been given responsibility to setup the replication.
i have a Database in Headoffice and replicating few Tables to another server at retail Store.
First time, i configured the replication with selected articles.
the replication was continuous. it was running fine, but one Sunday night, it got failed with error "process could not execute 'sp_replcmds'".
after spending sometime on google, i couldn't find any solution. so, i rebuilt the Replication, but this time the replication was scheduled (every 15 Min), also i configured it as PULL instead of PUSH. it started, but again next Sunday night it got crashed.
So, i analyzed that in Sunday night, i had configured the Reindexing Job on the database, and Since, the recovery model was full, it was generating a very large TLOG and Repolication agent was not able to parse that.
Now, the third time, i again Rebuilt the Replication, and this time i scheduled the replication every 15 minutes but from 8:00 AM Morning to 11:30 PM, because after 11:30, no store do any transaction. Also, for Reindexing Job, i added 2 more steps. before Re-Indexing, i was changing the recovery model to simple and then Re-Indexing and after that i was changing the Recovery model back to Full. i was changing the recovery to Full, irrespective of the result from Re-Indexing step.
This setup was working fine and worked properly for around 2 Months.
Now, after 2 Months, again one Sunday night it got failed, with the same reason ("process could not execute 'sp_replcmds'"). Actually, i had scheduled the backup job, and i was taking Full Backup everyday and Log backup every 15 minutes, and no differential backup.
after, discovering that i had not configured the differential backup, i also configured the same (every 6 Hours). but, after configuring the Differential backup, in Sunday night Replication got failed.
Now, anybody, please help me with the recommended setup for my scenario.
my setup is
sql server - SQL Server 2008 R2 Enterprise on Windows Server 2008 R2
Distributor and Publisher are on same machine.
Subsriber is on the Retail Store server.
sp_replcmds is run by the log reader agent against the published database to get, well, replicated commands. According to the documentation, one needs to be at least db_owner to run that command. Make sure whatever account is running the log reader agent has at least db_owner in the published database.

CRM 2011 find out which batch process last changed a record

I have inherited a poorly documnted CRM 2011 instance, lets call it 'haystack', that has literally 100s of batch processes and workflows running on it under the same user account (IT_Job). One of them, lets call it 'needle', has a problem.
I know 'needle' ran at noon. But the Advanced find only allows me to query the scheduled jobs down to the day they ran NOT the time they ran.
How do I find out which Batch Process or Workflow last updated an entity (incident). All I seem to be able to query the scheduled jobs by is IT_Job.
It seems to me that the only way to find the 'needle' job would be to systematically add a corresponding User for each job that acts on 'incident' to then search for job running as the user that last modified the record.
So how do I find 'needle' quickly?
EDIT
Ok it turns out the site I am working for won't allow me access to the database or allow me to deploy a console app. (One could argue that they're not interested in a solution to this problem) So is there any other way to query this data?
If you have access to the SQL server then you can query the table dbo.WorkflowLogBase. This will help you narrow down which workflows had run at that exact time.
You might also be able to add some extra information by looking at the audit history for the record that has been changed assuming that auditing is turned on.

Customize a Shared Schedule in SSRS

Does anyone know of a way to create more complex shared schedules? If not, do you know of a way to simplify the schedule needs I have detailed below?
Creating a shared schedule in sql server 2008's SSRS does not seem to offer any additional complexities compared to report-specific schedules.
What I really need is the ability to create a schedule tied to my company's fiscal calendar. For example, it would be great to have a schedule that would send a report at the close of every fiscal month. Another example is of a report that emails throughout the day to provide operational updates. The report sends in intervals that do not align to anything I can express in the below configuration screen but rather to business needs. On Monday for example, the report will send at 8:15 AM, 12:15 PM, 2:15 PM, 4:15 PM, 6:15 PM and 9:15 PM. I cannot determine how to accomplish this pattern in one schedule, so I use multiple. Since the pattern is different for different days of the week, many schedules are needed. This is inefficient and cumbersome to manage when adding or removing recipients.
When first learning of shared schedules that could be configured on the server, I thought these problems would be solved. I am disappointed with the options below. The "Script" menu item remains gray through the process, so modifying the code this would generate does not appear to be an option either.
Thanks!
As Sir Crispalot notes in comments, you can't modify the SSRS schedule to this degree. A Shared Schedule doesn't give any options beyond the single schedule per report.
But you can change the schedule of the SQL agent that executes the subscription. Here you can associate multiple schedules with a subscription.
Another approach is to dynamically change the subscriptions and their schedules with some other code, such as a .NET .exe running on a schedule, or called by a SQL Agent. You could build a pretty nice scheduling interface for all your reports, storing the schedules however you like, then dynamically changing the subscriptions themselves: http://www.codeproject.com/KB/reporting-services/DynamicSSRSSubscriptions.aspx

Overriding SQL Server Reporting Service Hourly Subscription

Users want to set up SSRS reports to be emailed to them. After a little googling i found this link that shows the subscription interface of Report Manager. This has almost every feature they need except, the hourly report subscription does not give them enough control. By default, they are able to set up hourly reports, and provide the desired start time, but at first glance, I don't see how they specify an end time. What I need is a way to say "Send me a report every hour between 5 and 10."
So I'm looking for one of two answers:
Is there really an end time that I'm just missing?
If not, how can I override the hourly subscription page and get and end time.
Thanks
You can write your own subscription service using the SQL Reporting Service Web Services.
You can schedule a subscription to run the job hourly and then write your own service that will pause the jobs at the time they do not want the reports.
More info here:
http://msdn.microsoft.com/en-us/library/ms154066(SQL.90).aspx
Alternatively, you could also try editing the SQL Server job parameters. When reporting services creates a "subscription" a SQL Server job is created. There are starting and ending time parameters in that interface. I haven't verified that this provides the functionality you are looking for though.
Also, if that doesn't work and you don't want to code your own subscription service as mentioned, you could try creating 5 different jobs that run daily spaced an hour apart. I know it's kind of a kludge but maybe the extra job maintenance is preferable to the extra time for coding your own service.

Resources