Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [ola-hallengren]

Refers to the set of SQL Server Management Scripts created and maintained by Ola Hallengren. Questions tagged with this tag should be about how to use the scripts or about how to resolve an issue with the script.

Filter by
Sorted by
Tagged with
0 votes
1 answer
554 views

Using Ola Hallengren’s Maintenance in SQL Server 2016 with TDE Enabled databases and compression

I’m using Ola Hallengren’s maintenance and backup solution and looking into leveraging TDE compression as I have all the databases in instance using TDE impression. Is there a way of getting benefit ...
Im88's user avatar
  • 326
5 votes
1 answer
1k views

Excluding Read only databases using Ola Hallengren script

Is there a way to exclude Standby or Read only databases from Index maintenance and also from backups using Ola Hallengren scripts.
David's user avatar
  • 51
-1 votes
1 answer
80 views

DST Back up plan

Back up schedule for log backup (using Ola's scripts) as follows: Start Time - 2AM End Time - 11.59.59PM Interval - Every 15 minutes. On November 5th, all the back ups went as detailed above. ...
SqlNovice's user avatar
  • 634
2 votes
1 answer
314 views

Dynamic Folder Creation when Backing up to Azure BLOB Storage [closed]

Is there a way to dynamically create folders in BLOB so each DB goes into its own folder? I know in Azure BLOB Storage they are not real folders, but I hope you get my point. In essence I am using ...
Steve's user avatar
  • 21
1 vote
0 answers
221 views

Customize - Ola Hallengren script

Trying to incorporate Date wise folder in the script. Following is the original code INSERT INTO @CurrentDirectories (ID, DirectoryPath, Mirror, DirectoryNumber, CreateCompleted, CleanupCompleted) ...
user3540063's user avatar
5 votes
1 answer
869 views

Specify different log file locations with Hallengren scripts

I appreciate Ola Hallengren scripts. Being new to SQL Server, they've made my life so much easier. Thank you Mr. Hallengren. I have 5 user databases that I need to back up at separate times, so ...
Sherrie's user avatar
  • 55
2 votes
1 answer
2k views

Ola Hallengren Parameters for Index Rebuild/Reorganize on SharePoint

I plan on using the IndexOptimize script by Ola Hallengren to replace the SharePoint 2013 On Premise Defragmentation Timer Job. Anyone out there using it for this purpose? What params do you use and ...
Andrew Gaskell's user avatar
5 votes
2 answers
3k views

Ola Hallengren Index maintenance on servers with Availability Groups

I'm configuring the Ola Hallengren scripts for Index maintenance on all servers in may Availability Group cluster which has several AG's and databases which are not in AG's. If I select the "...
Phil Holmes's user avatar
4 votes
1 answer
525 views

BACKUP WITH CHECKSUM works but DBCC CHECKDB detects problems

A server I administer recently experienced a power outage that caused issues with the SSRS ReportServerTempDB. After the outage, the nightly job that runs Ola's DatabaseIntegriyCheck started reporting ...
poke's user avatar
  • 527
6 votes
2 answers
1k views

FillFactor: IndexOptimize script by Ola Hallengren

We are using Ola Hallengren's IndexOptimize script for index rebuild on SQL Server 2008 and 2012. These maintenance scripts are very good and have worked for our DBs for months now. However, very ...
Nancy's user avatar
  • 211
2 votes
1 answer
415 views

How to best manage Index Builds with Stats Updates?

This is a follow-up to what I read on Is there any reason to stop transaction log backups during a maintenance window? in the answer proposed by sp_BlitzErik. I use Ola Hallengren's indexing script ...
Philip's user avatar
  • 362
3 votes
2 answers
6k views

Ola Hallengren DatabaseBackup error on locating Windows directory

Need help in resolving the issue with backing up a DB using Ola Hallengren's stored procedure to a shared folder. I have a procedure that is executed at SQL Server startup. It runs Ola Hallengren's ...
George K's user avatar
  • 2,296
0 votes
1 answer
5k views

How do you skip databases with Ola.Hallengren's scripts?

I have a few databases in which the frontend application manages certain maintenance tasks. In this particular instance, I'm running the INDEX OPTIMIZE job every night and every so often it clashes ...
AKDiscer's user avatar
  • 1,385
7 votes
2 answers
895 views

How to change job output log location, when using Ola Hallengren's scripts

When using Ola Hallengren's SQL Server Maintenance Solution, the job output log is going to a local directory on the SQL server. I was thinking of placing these logs on a fileserver to allow access to ...
cspell's user avatar
  • 501
8 votes
2 answers
4k views

How often should we use Update Statistcs.(More frequent or Not)

We usually use Ola Hallengren's solution that takes care of Update Statistics which is inside the Index optimize job that we have. We have it scheduled for every Sunday midnight in all servers (1500+) ...
Ramakant Dadhichi's user avatar
1 vote
1 answer
1k views

Backing Up an AG with Ola Hallengren

I'm trying to understand the labyrinth that is the rules about AG backups.I've got Ola Hallengren's scripts installed on machines TST01/TST02. 02 is the preferred replica for backups. I have an AG ...
Lee M's user avatar
  • 388
1 vote
2 answers
470 views

Ola Hallengrens code for Index Optimization - Clarifications

I am trying to deploy Ola Hallengrens code for Index Optimization in our PROD environment. What is the difference between using USER_DATABASES and AVAILABILITY_GROUP_DATABASES in the place of @...
Learning_Learning's user avatar
4 votes
3 answers
2k views

Deploying Ola Hallengrens scripts - Index Optimization

Never before I used Ola Hallengren Scripts . I am planning to deploy the Ola Hallengren scripts for Index Optimization for the first time. I need to deploy them in PROD so I want to be more careful. ...
Learning_Learning's user avatar
1 vote
1 answer
5k views

Ola Hallengrens - Output File cleanup does not delete files

We run Ola Hallengrens backup,dbcc & index jobs but we have not scheduled Output File Cleanup for some reason. Noticed this today and when we tried to run it on a server that had 2 or more ...
Jonathan's user avatar
  • 169
2 votes
2 answers
424 views

Index Maintenance on Indexed View using Ola Hallengren Script

I’m using Ola Hallengren's below script in my environment and it fails with the error: USE DBA EXECUTE dbo.IndexOptimize @Databases = ‘USER_DATABASES’, @FragmentationLow = NULL, @...
Nickrock's user avatar
3 votes
2 answers
1k views

Query Performance | Update Statistics | Ola Hallengren SPs

I recently read or listened to something Tara Kizer said about developers coming to her on timeouts or slow running queries, and the resolution was usually updating stats. I think she went on to say ...
user avatar
2 votes
1 answer
2k views

Ola Hallengren script not deleting old backup files but simply taking time

We recently migrated to a new SQL Server and the SQL Services are running under a Service Account. I did observe that the Service Account do not have FULL rights on G drive and the old files are not ...
Santhoshkumar KB's user avatar
2 votes
2 answers
940 views

Ola backups happening on both Primary and Secondary AG

I configured Ola's scripts on a staging AG configuration to test out the logic. When I checked the backup folder today after a week, I see that the backups are happening both on the primary replica ...
buddinggeek's user avatar
2 votes
5 answers
12k views

Ola Hallengren - DatabaseBackup - LOG Unable to open Step output file. The step failed

DatabaseBackup - USER_DATABASES - LOG: This job fails saying "Executed as user: Domain\XXXX-SVC. Unable to open Step output file. The step failed." The error is only with LOG backup job. The other ...
Santhoshkumar KB's user avatar
1 vote
2 answers
599 views

Why use Ola Hallengren DatabaseBackup method with Idera SQLSafe?

We are planning to implement Ola Hallengren's Maintenance Solution in our environment. Our organization on the other end, is planning to purchase Idera SQLSafe (requested a demo first). I see a ...
Santhoshkumar KB's user avatar
2 votes
2 answers
635 views

Ola Hallengren Maintenance script - Full database backup delays

The DatabaseBackup job created by Maintenance Script will introduce delay for the last database being backed up. What I mean is, there are 6 databases around 200GB each. The FULL backup takes around ...
Santhoshkumar KB's user avatar
2 votes
0 answers
892 views

Log Shipping and Ola's Hallengren's Scripts - Can they work in unison?

I have a single instance database server with several databases. Some do not require log shipping and some do require log shipping. Is there a way to edit Ola's LOG backup job to ignore the ...
AKDiscer's user avatar
  • 1,385
1 vote
0 answers
808 views

Modifying Ola Hallengrens index maintenance script for deadlocks [closed]

In a SQL Server 2012 Enterprise database without a true maintenance window, I would like to run Ola Hallengrens script to optimize indices. Testing has shown that while indices are reorganized and ...
HugoRune's user avatar
  • 361
3 votes
2 answers
3k views

SQL Server high availability fn_hadr_backup_is_preferred_replica returns 0 zero on secondary

I'm running the Ola Hallengren Maintenance Solution and noticed the transaction logs weren't being backed up on the secondary, hence not being truncated, despite the AG backup preference being set to ...
DiamondBeezer's user avatar
5 votes
1 answer
809 views

SQL Server mirrored backup using cluster shared volumes

I have SQL Server 2014 cluster with 2 nodes and a third server with iSCSI target server configured on it, all of them are virtual Servers with Windows Server 2012 R2. Both nodes of cluster are iSCSI ...
cesarlinux's user avatar
1 vote
2 answers
1k views

Set retention for SQL backup to URL

I am using Ola Hallengrens DatabaseBackup script. I am storing my backups in Azure Blob storage using the @url parameter. Everything is working fine, however I am looking for a way to set a retention ...
Peuge's user avatar
  • 209
1 vote
2 answers
2k views

Backup to URL not working when using Ola Hallengrens Database Backup

I am using Ola Hallengrens DB backup and am trying to get it working with the URL parameter. I first set up a Shared Access Credential in SQL with the following sql USE MASTER CREATE CREDENTIAL [...
Peuge's user avatar
  • 209
1 vote
2 answers
408 views

Proper way to setup SQL Agent account

I have an AlwaysOn setup in which the jobs are running on domain service account which have been given access to a file share for backups. The jobs are not able to run. This is the error message ...
buddinggeek's user avatar
0 votes
1 answer
866 views

Delete Only Log Backup History in SQL Server

Is it possible to run something like dbo.sp_delete_backuphistory to only delete transaction log backups without rolling your own scripts? Using Ola's maintenance scripts, we do 5 minute log backups on ...
Greg's user avatar
  • 3,252
0 votes
1 answer
183 views

Difference in Backup File Size

I'm using Ola Hallengren's backup script. I've added a network share location on the sqlcmd so that when the full backup job runs, the backup file will be saved in two different locations: 1 on the Z ...
Schmallen's user avatar
  • 129
1 vote
3 answers
320 views

Creating backups on Alwayson without differential backups

I went through this link on stack exchange and also Brent Ozar's . I don't plan to create any differential backups for the AAG group. Can you please let me know if enabling this option should work. I ...
buddinggeek's user avatar
0 votes
0 answers
164 views

Folder permissions changing when running Ola Hallengren maintenance scripts

We use a centralized backup location on a network share. Each instance uses the Ola Hallengren scripts to perform nightly backups. I have a team that requires folder permissions to the same location ...
Geoff Dawdy's user avatar
  • 1,123
0 votes
1 answer
689 views

Index maintenance Azure SQL

I have installed Ola's scripts: https://ola.hallengren.com/scripts/CommandLog.sql https://ola.hallengren.com/scripts/CommandExecute.sql https://ola.hallengren.com/scripts/IndexOptimize.sql and ran: ...
JP Hellemons's user avatar
3 votes
2 answers
4k views

Suggested SQL Server Backup Schedule using Ola Hallengren scripts

We are building out a new AlwaysOn SQL Server 2016 database cluster and I am in the middle of setting up the backups using Ola Hallengren (https://ola.hallengren.com) backup scripts and I was looking ...
Ollie's user avatar
  • 173
3 votes
1 answer
257 views

Any disadvantage to automatically changing FULL backup on AlwaysON Secondary to COPY_ONLY?

I've been playing around with Ola's maintenance scripts recently, and they are absolutely great. However, I was considering one scenario and was surprised when I found it wasn't catered for. Maybe I'm ...
Kingithy's user avatar
6 votes
2 answers
10k views

Ola Hallengren backup failed

I have been using on my SQL Server 2008R2 server Ola Hallengren solutions for almost two years. Last night backups failed, both System databases and user databases with error below. Example of ...
SQL_DBA_Bini's user avatar
0 votes
1 answer
1k views

Index Reorganize/ Rebuild Time

I have maintenance job on SQL Server 2012 Enterprise Edition that runs daily to check index fragmentation and reorganize or rebuild the index based on the percentage of fragmentation. I used this ...
Mahari's user avatar
  • 19
0 votes
3 answers
1k views

Problem generating restore scripts for multiple ola backups

I am using Ola for maintenance solution. I have 300 databases I want restore those databases using scripts rather than going through one by one. I prepare the following script to generate restore ...
SQL_DBA_Bini's user avatar
2 votes
2 answers
3k views

Modify Backup Directory Path Ola Maintenance Script

I have configured backup using SQL Server Maintenance Solution by Ola (https://ola.hallengren.com). In the backup job, I specified BackupDirectory as a shared folder (eg: \comp1\path). It worked fine,...
Syakur Rahman's user avatar
5 votes
1 answer
990 views

How is Index rebuild affected by IN_ROW_DATA vs LOB DATA

I am using Ola Hallengren's scripts to maintain my databases. On a few of them there are indices that don't seem to be benefiting from the maintenance. I know that his scripts have a lower threshold ...
Slothy's user avatar
  • 61
0 votes
1 answer
129 views

Find all stats that were sampled

I am using Ola's scripts for stats updates and for one particular index I want to do full scans when updating stats (to solve for the Ascending Key problem in conjunction with trace flag 2389). We ...
Chris Woods's user avatar
  • 1,771
1 vote
1 answer
4k views

Ola Hallengren's Backup solution error message after moving files using cmdexec stops job, this disagrees with faq

I am using Ola Hallengren's Maintenance script, and I am having an issue which seems documented in the FAQ. For context, there was an issue where the existing SQL Server backups had to be moved to ...
ConstantineK's user avatar
15 votes
3 answers
889 views

Transaction Log Backups Serial or Parallel?

We happen to be using SQL Server 2012 Standard Edition. I also happen to use Ola Hallengren's scripts to provide an easy, more flexible framework for doing backups and maintenance. This question isn'...
Chris Aldrich's user avatar
1 vote
2 answers
320 views

Do user database settings affect maintenance job times for system databases?

I have an SQL Server 2008 and for maintenance solutions I use Ola Hallengren scripts. Recently, out of 15 databases I have on this server, I made two changes in three of them (not system databases, ...
xrpapak's user avatar
  • 51
2 votes
2 answers
589 views

My Ola Hallengren nightly backup job failed but It works fine when I execute the job manually by right clicking [closed]

I have been using Ola Hallengreen maintenance plan . It has been working great for longtime . Recently one of my nightly backup job failed repeatedly with an error: Sqlcmd: Error: Microsoft SQL ...
SQL_DBA_Bini's user avatar