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
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, ...
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
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 ...
3
votes
1answer
100 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
0answers
79 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
52 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
156 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. ...
1
vote
1answer
65 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 ...
12
votes
3answers
423 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 ...
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 ...
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
229 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
104 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 ...
4
votes
1answer
468 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 ...
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 ...
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, ...
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 ...
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 ...
0
votes
1answer
50 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
224 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 ...
0
votes
0answers
194 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 ...
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 ...
4
votes
2answers
213 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,...
3
votes
1answer
529 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' ...
4
votes
1answer
609 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 ...
0
votes
1answer
228 views

Ola Hallengren for Managed instance

How can we configure Ola Hallengren's solution on a managed instance? (We want output file for each run, storing it is an issue) If we want backup retention longer than 35 days for the database in ...
1
vote
2answers
94 views

Logging to file

I am using the ola-hallengren maintenance scripts. I am logging to table and file. I want to change the location of the file logs. Can I do this? Many thanks
0
votes
1answer
42 views

What rights do you need for Ola's integrity check?

I'm configuring a new server and Ola's integrity check is working for user databases (I have restored a database of around 50 GB for tests) and is failing for system databases. If I look in the logs ...
2
votes
1answer
391 views

Fragmentation Level for Heaps

I am currently using scripts provided by Mr. Ola Hallengren for executing maintenance job and of-late I have been noticing that there are many tables (heaps) fragmentation level is alarmingly high and ...
0
votes
0answers
46 views

Ola Hallengren - Parallel Backup Jobs failing on SINGLE_USER DB - 'Database is in transition' [952]

I'm using Ola's DatabasesInParallel option for "multi-threaded" execution. Last night a db was temporarily placed into SINGLE_USER for an application-based archive process and it caused all 5 threads ...
0
votes
0answers
71 views

Does OLA Scripts support striping for backup to URL?

I am testing backups to blob using OLA scripts. However, I am unable to stripe the backups into multiple files. I tried using 'Numberoffiles' parameter. Please advise. I am using a shared access ...
0
votes
0answers
44 views

Index Optimize with PartitionLevel='N' fails on SQL Express Edition 2017

If I'm running the IndexOptimize SP with @PartitionLevel='N' the SP fails with Error: Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "partitions.partition_number" could not be bound. ...
1
vote
1answer
246 views

DBCC check on Always On Secondary Replica

What is the best way to schedule DBCC check on all the nodes in Always On availability group. Can we just schedule the same job on all the nodes at the same time including all the secondaries. In my ...
0
votes
2answers
156 views

Database Maintenance Job and Backup Scheduling

I would request to have expert advise on scheduling maintenance and backup jobs. Below was the scenario prior to my change: Full backup of database scheduled to run at 12:30AM everyday. Differential ...
-1
votes
1answer
69 views

Running Backup on single DB when scheduled job (USER_DATABASES) has failed

I'm using Ola Hallengren's sp to take backup of database. FULL DIFF and LOG backup is created with respective schedules (agent job) and has been working great. Due to not enough free disk space on ...
1
vote
2answers
104 views

Ola Hallengren IntegrityCheck Excludes TempDB

According to SQL Server Maintenance Solution - SQL Server Integrity Check, the SYSTEM_DATABASES value includes only master, msdb, and model. Why is TempDB excluded, when it too can have hardware ...
4
votes
2answers
359 views

Ola Hallengreen Backup Retry

Is there a way to do an automatic backup re-try utilizing Ola Hallengren's back up scripts for just one database back up if there is a failure? Looking for a way to complete the back up without re-...
1
vote
2answers
248 views

SQL Server Backup failing for just 1 DB (“The system cannot find the path specified.”)

For the last few mornings, I have had a backup of our ReportServerTempDB fail. We are not using SSRS on this server yet, but will in the next month, so the DB is the default 8mb .mdf and 8mb .ldf (i.e....
-2
votes
1answer
78 views

Database Backup to URL fails with Device I/O Error [closed]

I'm using Ola's Maintenance Solution to backup my databases to a URL. Most of my databases backup just fine but I have one 2 TB database that continues to fail with a device I/O error. Has anyone ...
3
votes
1answer
642 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 ...
1
vote
1answer
84 views

Exclude database form AG Backup

Is it possible to exclude a database from an availability group backup? My backup jobs looks like this: EXECUTE [dbo].[DatabaseBackup] @Databases = 'AVAILABILITY_GROUP_DATABASES' @URL= xxx, @...
0
votes
1answer
183 views

Ola scripts = log shipping and transaction logs

We use the Ola Hallengren scripts for full/diff/tran log backups. Ola's site indicates that log shipping is compatible unless we are using transaction logs. Why is that?
0
votes
1answer
580 views

sp_DatabaseRestore msg 50000

I used Ola's script to backup my database (SQL Server 2017) and now I'm trying to restore it using Brent's sp_DatabaseRestore. Currently trying to do a Full restore only. Here is my code, written ...
-1
votes
1answer
257 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. ...
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 ...
0
votes
1answer
81 views

Reason for @@TRANCOUNT check?

we're using the SQL functions from Ola Hallengren since many years. Sometime between 2015 and 2018 the check for open transactions was added in IndexOptimize. So now, after upgrade to the current ...