A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
1answer
48 views

Index / Check DB Script question

I'm using Ola Hallengren's maintenance scripts and I wanted to see if I could create 2 tables so that it logs integrity checks and index optimizations to different tables.
0
votes
1answer
24 views

msdb system table fragmentation

I have a Index Maintenance job for msdb database to rebuild those fragmented index in msdb database. But I still found some backup related table in msdb database (e.g. backupmediafamily, backupset, ...
1
vote
1answer
487 views

SQL Server hangs on index rebuild, works well after SQL service restart

We have a SQL Server 2014 enterprise cluster. Server 1 and Server 2. SQL Server is limited to 64GB of memory. We are using Ola Hallengren scripts for index rebuilding and optimizations once per week ...
0
votes
1answer
40 views

IndexOptimize is successful, but sys.dm_db_index_physical_stats still shows huge fragmentation

I'm working on a project that requires a database shrink. Following the shrink, I checked sys.dm_db_index_physical_stats and can see a lot of my indexes are over 99% fragmented (...
0
votes
0answers
28 views

Differential backup failing - Ola Hallengren Script

So I have installed Ola Hallengren's maintenance solution on our SQL 2016 servers. I have set the differential backups to take place every evening 7pm and full backup is scheduled for once a week. ...
0
votes
0answers
26 views

update statistics in ola.hallengren maintenance solution

Is there a reason the default IndexOptimize job not include: @UpdateStatistics = 'ALL', @OnlyModifiedStatistics = 'Y' We will have to remember to change t incude above two lines to the job. Is there ...
-1
votes
1answer
148 views

SQL Maintenance script not running with SQL Server Express

Hello and thank you for making such a well-designed script available to the public. I have client with some heavy db fragmentation and performance issues. I would like to use your scripts to help ...
1
vote
1answer
351 views

ola-hallengren index rebuild with multi thread and multiple days

Ola scripts for index maintenance work really well for smaller databases. For multi terabyte databases with big indices, many partitions, and a small interval of schedule times I observed that the ...
3
votes
2answers
640 views

DBCC CheckDb on Secondary Asynchronous Replica

Can I run Ola Hallengren's CheckDB job on a Secondary Asynchronous Replica (DR) that is readable during business hours? Currently the Asynchronous Replica is not readable... First question is if it ...
-1
votes
1answer
255 views

DatabaseIntegrityCheck fails intermittently [closed]

Have been running the Ola Hallengren scripts on our new SQL Server 2016 Enterprise server for about 6 weeks or so now. The database Integrity script only works intermittently on some instances. ...
3
votes
1answer
98 views

Why is my DB size increasing when rebuildling an index using sort in tempDB in SQL Server?

I am running Ola Hallengren's SQL Maintenance scripts using the following command: EXECUTE [dbo].[IndexOptimize] @Databases = 'MyDatabase' , @FragmentationLow = NULL , @FragmentationMedium = '...
0
votes
2answers
390 views

Index not re-organised

I am using Ola's INDEX Maintenance solution. Few indexes are not being re-organised after running job.Below is my code EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES', @...
0
votes
0answers
78 views

RESTORE VERIFYONLY FROM DISK is failing

We are having WSFC(Windows Server Failover Cluster) configuration for one of database server and from last few days, backup of one of the database is failing. Sometime backup itself fails whereas on ...
0
votes
0answers
45 views

IndexMaintenance fails on error

We are using the Index Maintenance of Ola Hallengren (https://ola.hallengren.com) solution for a couple of years now. While setting up some new SQL servers we are seeing some strange behaviour in the ...
-1
votes
1answer
33 views

data purity parameter

how do I get the integrity check job to only run a simple dbcc checkdb command with out the parameters. I had to disable the job because it is taking days to run instead of minutes. I could find no ...
1
vote
1answer
51 views

Ignore a database in an Availability group when using @AvailabilityGroups = instead of @Databases with ola-hallengren backup solution

I’m using the @AvailabilityGroups= parameter to backup availability groups, is it possible to NOT backup (exclude) a database in the Availability group? If using the @Databases parameter I could use -...
0
votes
2answers
151 views

Amazon RDS Ola Hallengren

Very new to SQL on AWS RDS so. Need to create maintenance jobs on an AWS RDS SQL2016 instance. I know parts of Ola Hallengren's life saver maintenance script works, Index, stats and integrity. ...
3
votes
1answer
525 views

How to handle failed Index Optimization (Ola Hallengren) step in SQL Azure Elastic Job Agent?

I have created a SQL maintenance job using Azure Elastic Job Agent with the following step: EXEC jobs.sp_add_jobstep @job_name = @jobName, @step_name = 'Optimize indexes and statistics', @command=N' ...
1
vote
1answer
63 views

log to table vs log to output file

I am using ola-hallengren solutions for database maintenance. A question about the log, I see in the documentation website: LogToTable: Log commands to the table dbo.CommandLog. Value Description ...
1
vote
1answer
147 views

Ola Hallengren - Backupdatabase Task

When running Ola's full SQL Server Maintenance Solution or the individual databasebackup script I get the following error: MSG 207, Level 16, State 1, Procedure DatabaseBackup, Line 1545 Invalid ...
3
votes
1answer
634 views

Hallengren @DatabasesInParallel sql_message_id 50000 in sysjobhistory table

Just implemented Ola's Parallel execution for backups, integrity checks and index maintenance. Everything appears to be running great but I am seeing sql_message_id 50000 in the sysjobhistory table ...
12
votes
3answers
420 views

Queries and updates extremely slow after IndexOptimize

Database SQL Server 2017 Enterprise CU16 14.0.3076.1 We recently tried switching from the default Index Rebuild maintenance jobs to the Ola Hallengren IndexOptimize. The default Index Rebuild jobs ...
1
vote
2answers
128 views

Optionally exclude certain partitions using OLA's scripts

I have been using OLA's scripts for a long time and love them. I have a very large database - 20+ TB with hundreds of partitioned tables. I purge old data by dropping (merging the old partitions)...
11
votes
4answers
1k views

Alternatives to Network Backup

In our environment we have some servers that are in an Always On Availability Group, and some that are standalone. We normally backup to a network share, but we have recently observed that as the ...
2
votes
4answers
6k 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 ...
4
votes
1answer
185 views

Server Integrity Check CheckCommands question

I am trying to figure out what is the best CheckCommands option for ServerIntegrity check. Should I leave the job defaults as is? EXECUTE [dbo].[DatabaseIntegrityCheck] @Databases = 'USER_DATABASES'...
6
votes
2answers
226 views

IndexOptimize - Configuration

We recently switched to Ola Hallengren's maintenance script and automated the deployment of MaintenanceSolution.sql to our customers's SQL Server instance. We need to set these parameters for the job ...
0
votes
1answer
102 views

Ola Hallengren Transaction Log Backups of System Databases

I am attempting to backup the transaction logs of master, model in addition to the msdb. MSDB transaction log backs up without any issues, but the master and model do not. Here is the script that ...
0
votes
3answers
64 views

Simple and Full recovery models

Not an SQL admin and new to ola-hallengren great scripts. Just wondering if people are mostly doing a blanket user database backup with his full/diff script regardless on if a DB is in Simple or ...
4
votes
1answer
461 views

Scripting a Maintenance Plan in SQL Server Express

How would I run each aspect of Ola Halengren's sql maintenance plan on SQL Express? It's my understanding that each job should be run in a specific order. I'm sure that a .bat or cmd file can do ...
7
votes
1answer
266 views

Index fragmentation problem after disabling page-level locking for an Index

I have an Index which has page level locking disabled and now I have index fragmentation issues for that index. I was aware that I won't be able to Reorganize the index, but I believed that I would ...
2
votes
1answer
38 views

Job completes successfully and logs the errors to a text file

I am using Ola's scripts for our database backups, I am trying to come up with a way to be notified if any of the database backup fails. Job completes successfully and logs the errors to text file, ...
3
votes
2answers
127 views

Ola Hallengren maintenance script - how can I tell a backup file is still being written to?

My question is whether there is a way to identify a backup file that is still being written to.​ I want to copy the completed backup files to another place. By reading the backup extension, I can't ...
0
votes
0answers
39 views

Restoring database created with Ola's tools from Azure blob

I'm exploring using Ola Hallengren's excellent backup tools to backup to an azure blob. Is there a simple way to do a restore of the latest backups on a fresh MSSQL 2017 database directly from azure ...
4
votes
2answers
211 views

SQL Server Index and Statistics Maintenance performance question

I tried to use IndexOptimize stored procedure on a database with a very high number of indexes (> 250.000). The initial step where stored procedure collects data what needs to be processed takes hours,...
-2
votes
1answer
298 views

Backup to nul using Ola Hallengren Maintenance Solution [closed]

Is backup to @Directory = nul supported using Ola Hallengren's Backup Maintenance Solution? I tried this, but got errors. Please advise.
0
votes
1answer
49 views

How do I get more control over backup file retention using Ola Hallengren's DatabaseBackup solution?

I've noticed some unexpected behavior using the database backup job in Ola's Maintenance Solution. On the test instance I'm working on, I have the user database backup job scheduled to run at 2:00am ...
1
vote
1answer
376 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 ...
9
votes
5answers
2k views

What are pros and cons of Ola’s scripts vs using maintenance plan?

Will you please help me understand pros and cons of using Ola’s solution over maintenance plan? I have prepared a presentation based on SQL Pass (http://www.pass.org/DownloadFile.aspx?File=ebae1b31) ...
1
vote
1answer
220 views

LOG backup Always ON using Ola Hallengren database backup script does not carry out a backup

I am trying to run a LOG backup on the primary node of an Always ON SQL Server 2012 environment. The secondary server is only used for replication. no read or other access permitted. (licensing of ...
5
votes
1answer
344 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 ...
2
votes
2answers
2k 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,...
2
votes
1answer
608 views

Ola Maintenance Solution and striped Azure URL backups - possible?

We've been using the defacto standard Ola Hallengrin maintenance solution for many years, even after we moved to Azure and started using blobs for backup targets. However, for performance reasons, I'...
0
votes
0answers
192 views

I can not Ola Hallengren database backup script to Data Domain make works

Ola Hallengren has a nice SQL Maintenance scripts that I installed to our dev SQL server. The backup script works very well to a local drive, however it does not work to Data Domain. At all. Here is ...
5
votes
3answers
10k views

The system cannot find the file specified

I'm running into a problem when trying to run any of the jobs created by Ola's script: The process could not be created for step 1 of job 0x19DAD4A7019FB04D9C984027FCA2F4E3 (reason: The system ...
2
votes
1answer
258 views

Table Fragmentation

If I execute the following: SELECT dbschemas.[name] as 'Schema', dbtables.[name] as 'Table', dbindexes.[name] as 'Index', indexstats.alloc_unit_type_desc, indexstats.avg_fragmentation_in_percent as ...
2
votes
0answers
146 views

Index rebuild blocks itself and runs in serializable isolation level

I’ve implemented Ola Hallengren maintenance solution in one database, and I’m noticing that it’s getting blocked by itself, I don’t know why honestly. What I have noticed, is that it seems to be run ...
-2
votes
1answer
225 views

DBCC CHECKDB last good date

SQL Server 2014 Standard. Using Ola's (blessings be upon him) scripts to perform database integrity checks: Job command: sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE [dbo].[...
4
votes
2answers
4k views

Full Back up over to Network failed due to unknown network error 59

I am recently seeing the Unknown Netowrk Error 59 which saves the full back ups to a file share on some of the servers . The back ups happens at different times. Ola Halengren scripts are being used ...
4
votes
1answer
606 views

Availability Group backup preference not changing to primary

I have an availability group setup and I'm using Ola Hallengren backup scripts. At setup of the Availability group, the default option of Prefer Secondary was set, where it should have been changed to ...