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
36 views

Preferred seconday backup in AG - what about the primary ? Shows no backups taken

I did setup the Ola Scripts sticking to https://www.brentozar.com/archive/2015/06/how-to-configure-alwayson-ag-backups-with-ola-hallengrens-scripts/ Options are: @Databases = 'USER_DATABASES', @...
Thomas D's user avatar
0 votes
0 answers
40 views

Backup Directory Path Ola Maintenance Script: platform agnostic path on Windows q:/backup/folder

We are using configuration management, specifically Chef, to install SQL server on many new VMs. Part of the cookbook specifies the default SQL directories including the backup directory. In order to ...
many questions few answers's user avatar
0 votes
0 answers
39 views

SQL Backups with SQL 2022 Contained Availability Group

We have a SQL 2022 Always On Availabilty Group with Contained databases; a new feature in this version of SQL. The master and msdb databases are now also in the Avalability Group. We like this setup, ...
Jeroen Bleeker's user avatar
0 votes
0 answers
31 views

Automatic backup deletion?

I backup servers to a network share, all is well. But one backup must be kept so I move it to a new folder and rename it, this should keep the backup indefinitely but I'm wondering if it got auto ...
Brad's user avatar
  • 101
1 vote
0 answers
37 views

DST Adjustments to Ola Hallengren's backup jobs not working as intended [closed]

I have been using Ola Hallengren's backup/maintenance scripts for a few years but one thing that usually plagued me once a year was our backup location going near capacity after spring forward DST. I ...
Matt's user avatar
  • 365
0 votes
1 answer
75 views

What are recommended values for block size, buffercount and maxtransfer size for Ola backups to Azure?

I have SQL servers running on onprem and Azure VM hardware. The backups write to a file share located on a network VM. I am wanting to change the backup destination to Azure blob storage. For this I ...
variable's user avatar
  • 3,634
0 votes
1 answer
45 views

SQL Server Backup Solution - Cleaning Up Dropped Databases

I'm just wondering how people who use Olas (fantastic) SQL Server Backup Solution deal with dropped databases. The CleanupTime and CleanupMode parameters only operate on databases that currently exist ...
Tom Moore's user avatar
0 votes
2 answers
100 views

How to prevent backup messages to be printed

In one of my servers, there are many databases which I take backup from the with Ola's script. Sometimes it happens that the backup job failed. But because many messages had been printed in job ...
Meyssam Toluie's user avatar
1 vote
2 answers
104 views

Full Database Backup failing

I have been using the Ola Hallengren script for a number of years and it works great. We recently set up a new SQL server and I installed the latest script. When I run the Full Database backup I get ...
Charles Spencer's user avatar
0 votes
0 answers
62 views

Why bulk of pages/extents are unallocated in sys.dm_db_file_page_usage

Could someone help shed some light on a strange sys.dm_db_file_page_usage result of a large database? sys.dm_db_file_space_usage result: |total_page_count | allocated_extent_page_count | ...
Mary W's user avatar
  • 11
2 votes
1 answer
85 views

IndexOptimize Question

I have a quick question: Is it safe to run IndexOptimize for stats update under SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED to avoid blocking as below? USE [DBA] GO SET TRANSACTION ISOLATION ...
Nauman Aziz's user avatar
1 vote
1 answer
51 views

CleanUp Time not working for DIFF Backups

We have a database server where the test database is "refreshed" with the backup of prod database every day at 22:00. The first backup after the restore is a differential backup, because we ...
Guenter's user avatar
  • 13
1 vote
1 answer
202 views

Questions about the @DatabasesInParallel parameter for the Ola Hallengren Index and Statistics Maintenance scripts?

I've used Ola Hallengren's Maintenance Solution for a while, but I've never used the @DatabasesInParallel parameter. I am considering using this on the Index and Statistics Maintenance jobs where I ...
Wayne Cochran's user avatar
0 votes
1 answer
131 views

Reducing Fragmentation on a clustered columstore index

I have a database with a clustered columnstore index on it. The table has 1,685,123,846 records in it. I use the ola hallengre script monthly to rebuild the index, but it takes so long to run before ...
Ross Dargan's user avatar
2 votes
2 answers
343 views

What happens if you stop the IndexOptimize job, because it is running long and causing blocking?

When the dbo.IndexOptimize job is running for long time and causing blocking, if we stop the job, does it cause Rollback of everything that was reorged or rebuilt? Or it just stop where it is and ...
veena ranganath's user avatar
0 votes
1 answer
100 views

Whether to run integrity check before or after backups (Ola H FAQ)?

Going through Ola H FAQ's, https://ola.hallengren.com/frequently-asked-questions.html, I see that I also recommend that you perform the full backup after the integrity check. Isn't the opposite true?...
variable's user avatar
  • 3,634
-1 votes
1 answer
62 views

ola-hallengren- rebuilding indexes for individual index

Could you please explain how the parameter @Indexes='' should be used when we are maintaining a single index from a table? EXECUTE dbo.IndexOptimize @Databases = 'AdventureWorks', @FragmentationLow = ...
vivekanand Inamadar's user avatar
-2 votes
1 answer
281 views

Database Integrity check fails as follows

(I have used the Ola Hallengren scripts for quite a while)....but if there is an open query I end up with the following: Msg 5030, Sev 16, State 12, Line 1 : The database could not be exclusively ...
Ian Cope's user avatar
1 vote
1 answer
78 views

Should statistics be updated manually?

I'm currently considering using Ola Hallengren's Index Maintenance solution to update statistics once a day. What is the benefit of this solution if a database has AUTO_UPDATE_STATISTICS set to on? I'...
Marcus's user avatar
  • 69
1 vote
1 answer
217 views

Ola Hallengren's Maintenance Solution script doesn't dump transactional log file to Destination

At one of our client sites, I implemented a high availability (HA) solution. However, during the backup process, I encountered an issue related to backup environment configuration. We had configured ...
kedar's user avatar
  • 23
3 votes
1 answer
2k views

Update statistics on a 4 billion record table

On a SQL Server 2016 SP3 database, we have several (under 10) tables with billions of records. It's a 24/7 system with limited maintenance windows so it's essential that user impact is limited while ...
Rolann's user avatar
  • 41
2 votes
0 answers
231 views

Setting up Database Integrity Checks

I'm relatively new to SQL and, unfortunately, am definitely not at the level of a DBA - However, it's become my job to look into some SQL issues... There's a Database Integrity Check set to run for ...
Yeldur's user avatar
  • 21
0 votes
2 answers
157 views

IndexOptimize procedure doesn't obey @MaxNumberOfPages when only updating statistics

I'd like to use EXECUTE [master].dbo.IndexOptimize @Databases = 'mydatabase', @FragmentationLow = NULL, @FragmentationMedium = NULL, @FragmentationHigh = NULL, @UpdateStatistics = 'ALL', @...
Endrju's user avatar
  • 126
0 votes
1 answer
376 views

Using Ola Hallengren's succeeds to take full backups but fails to take a differential

I take weekly Full backups (all my databases are in Full recovery model) on Sundays and then schedule the Diffs to run nightly (except on Sundays). Looking through my logs I see this: Cannot perform ...
user263099's user avatar
0 votes
1 answer
54 views

Strategy to backup up databases based on their status obtained from another Table

I'm looking for a solution to backing up databases based on their status stored in a DB Table (Inactive databases stay online as well) i.e. Get the status of active DBs using SELECT dbName from DBMain....
MSKH's user avatar
  • 3
2 votes
1 answer
499 views

What permissions are needed for a user running Ola Hallengren's IndexOptimize stored procedure?

I'm planning to orchestrate my index maintenance with other jobs in my Azure SQL Database (serverless) using Azure Data Factory. The job will be run by the Managed Identity of my ADF service, and the ...
Widforss's user avatar
-1 votes
1 answer
525 views

Using maintenance script to Reindex specific tables in a database

Is there a way I can use Maintenance solution to reindex specific tables in a database. I am dividing tables in my db to be large and small. Need to reindex large tables only on the weekend and others ...
user2819187's user avatar
0 votes
0 answers
140 views

Commandlog table record is missing the errormessage for errornumber 2508

We have deployed ola hallangren maintenance scripts in our environment. We noticed a record in commandlog table with text similar to 'DBCC CHECKDB (databasename) WITH all_errormsgs, no_infomsgs, ...
deepak's user avatar
  • 117
-1 votes
1 answer
112 views

Any possibility that Ola Hallengren could add a job name prefix option to the script that creates all the maintenance jobs? [closed]

When creating the jobs, they sort together for most of them, but some of the jobs are alphabetically far away from the other Ola jobs on servers with hundreds of jobs. I would find it easier to see ...
EricI's user avatar
  • 99
3 votes
4 answers
2k views

How do I restore multiple transaction log backups after restoring a full backup SQLSERVER 2019

I am creating my DR strategy, and my full back-up recovers fine. The full backups are taken with a modified version of the Ola Hallengren scripts. The file timestamp of the full backup shows 07/26/...
Thomas's user avatar
  • 37
1 vote
2 answers
4k views

Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Data source name not found and no default driver specified

I recently upgraded from SQL Server 2017 Express to SQL Server 2019 Express and installed Microsoft SQL Server ODBC Driver 18. However, a sqlcmd script to back up all databases, using Ola Hallengren's ...
Mike Pace's user avatar
0 votes
1 answer
692 views

Cannot Backup to Network Share using Ola Hallengren's Scripts

SQL Version: Microsoft SQL Server 2016(SP3)(KB5003279) - 13.0.6300.2 (X64) OS Version: Windows Server 2012 R2 Standard I am trying to setup the backups and database maintenance jobs using Ola ...
Linger's user avatar
  • 115
0 votes
1 answer
170 views

ola hallengren @databasesinparallel parameter on Azure SQLServer

I have a serverless azure sql server instance with about 50 databases and I am trying to get the @databasesinparallel parameter to work to reindex all databases at the same time rather than one at a ...
Justin Gunderson's user avatar
2 votes
6 answers
3k views

Is there any purpose of Ola Hallengren's SQL Server Index and Statistics Maintenance scripts on sql server running on SAN storage?

I have configured Ola Hallengren's backup and integrity check scripts. However I want advice whether it is required to setup the SQL Server Index and Statistics Maintenance scripts, because my SQL ...
variable's user avatar
  • 3,634
3 votes
1 answer
297 views

Cross-domain backup using Ola Hallengren's scripts

I have a backup repository on a different domain than the one where I have SQL Server. Is there any way I can define the credentials to access the repository on the backup itself? (domains are ...
Lithium's user avatar
  • 31
-2 votes
1 answer
507 views

Is there dbo for shrinking the Transaction Log?

I'm looking for a System Stored Procedure to shrink our log file. Our database is in Simple mode but the log grows out of control, so once a week, I would like to call upon the procedure to shrink ...
Tracy's user avatar
  • 1
0 votes
0 answers
107 views

Ola Hallengren Stored procs updated by windows patching?

we use OH maintenance solution on all of our SQL instances, no issues. On 01/23/2022, one of our SQL servers that is automatically patched with Windows patches went thru it's patching & rebooting ...
Lori Halsey's user avatar
-1 votes
1 answer
498 views

ola hallengren on Azure SQL

I'm new to the use of the Ola Hallengren optimize index scripts on Azure SQL, but with out of the box settings I notice that some indices with 80-90% defrag % en > 80.000 page counts are simply ...
Ties Blom's user avatar
0 votes
2 answers
794 views

DatabaseBackup backs up the same database twice?

I use the Ola Hallengren DatabaseBackup procedure to run backups. I have two jobs configured so the backups can run parallel as I have one large database that takes 45 minutes to back up and many ...
Ken's user avatar
  • 71
0 votes
1 answer
408 views

Order of execution in Ola Index maintenance and Stats collection

I was thinking of performing The index maintenance and stats collection jobs in the below order for all databases in an Instance. step 1.Perform all index maintenance activity for all required Indexes(...
abi ram's user avatar
1 vote
1 answer
3k views

Ola Hallengren maintenance solution

When I am executing the below query: EXECUTE dbo.IndexOptimize @Databases = 'USER_DATABASES', @FragmentationLow = NULL, @FragmentationMedium = NULL, @...
Hany Helmy's user avatar
1 vote
1 answer
732 views

Ola hallengren SQL Server Index and Statistics Maintenance solution

We are using the Ola hallengren SQL Server Index and Statistics Maintenance solution from the past 6 months in our production system. Script is only used for Update Statistics not Index maintenance. ...
Arun Kumar's user avatar
0 votes
1 answer
89 views

RESOURCE_SEMAPHORE wait during Full and transaction log backup done by Ola Hallengren's solution

We have an MSSQL instance 2017 on version 14.0.3370 and there are issues with RESOURCE_SEMAPHORE waits when full or transaction backup job runs. DBs hosts over 9000 small dbs with used space up to ...
Pajusisko's user avatar
0 votes
1 answer
659 views

Ola Hallengren's IndexOptimize for Updating Statistics exclude schema

I am using Ola Hallengren's IndexOptimize for Updating Statistics only. Can I exclude a schema from the UpdateStatistics?
Jared Barnard's user avatar
1 vote
1 answer
536 views

DBCC Check DB fails due to operating system error 665

We have a SQL Server 2017 Standard version where recently the CHECKDB is failing with the operating system error 665. The fragmentation level of the disk drive is 0% as it is automatically ...
SQL_NoExpert's user avatar
  • 1,061
1 vote
1 answer
441 views

Schedule suggestion and index rebuild / database integrity progress for Ola Hallengren’s Maintenance Script

I have to configure Ola Hallengren's Maintenance Scripts for my SQL Server 2017. SQL Database size about total 400GB.Total 10 Dbs. But I have some questions. 1- I will use these schedules like below. ...
Cell-o's user avatar
  • 1,088
0 votes
4 answers
211 views

Index Maintenance on busy OLTP database

I have a database where constant read writes happening all the time. Searches are being done with wild card entries. The server is on SQL 2016 standard edition. There is no budget for enterprise nor ...
SQL_NoExpert's user avatar
  • 1,061
1 vote
2 answers
786 views

Ola Hallengren scripts: after a job failure, how to skip the databases that worked and backup only the remaining ones?

In our organization we have more than 150 databases in one instance and full backup should run for every day. Our backup script should be in such a way that if backup job fails while taking 100th ...
Sattenapalli David's user avatar
1 vote
0 answers
159 views

Ola IndexOptimize Deadlocking On Self But No Error Record In CommandLog Table

I have seen this a couple times. There is a job running IndexOptimize that completes successfully, but running sp_BlitzLock will show a deadlock for one specific table. The deadlock command is ...
BCM's user avatar
  • 733
0 votes
1 answer
528 views

Ola Hallengren DataBaseBackup to URL results in un-equal file sizes causing IO Device Error

we have been using Ola's Maintenance Solution and Database backup direct to URL since we migrated our system to Azure IAAS. We have multi terabyte DB's (approx 40% Filestream data) and therefore ...
krdba's user avatar
  • 3

1
2 3 4 5 6