Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [msdb]

A system database in Microsoft SQL Server. Most commonly referenced with regard to backup history, SQL Server Agent configuration, Log Shipping, and other instance-level configuration.

0
votes
1answer
152 views

Why does msdb.dbo.backupset have entries for each database every 15 minutes?

I have 134 separate databases on a SQL Server. Every 15 minutes an entry appears in the msdb.dbo.backupset table for each database on the server. Why does this happen every 15 minutes? What is ...
0
votes
1answer
31 views

What does “_localserver_view” mean after an MSDB Database table

What is equal to the database table [msdb]. [dbo]. [sysschedules_localserver_view], which contains the suffix _localserver_view? I am having a permissions problem with a [msdb].[Dbo].[...
0
votes
1answer
42 views

SQL AlwaysON. keeping Agent Job in sync, but with same JobID?

Is there a way to specify Job ID when creating a job? Or is there a way to update the Job ID of a specific Agent Job that already exists? I have a software from a vendor that uses the Job ID to ...
9
votes
3answers
2k views

Is it okay to delete MSDB?

I'm not a DBA, I've only googled what MSDB does it's basically a DB of SQL Agent of its Job and History, Now I'm running out of space in my cloud server and I have 1 year worth of MSDB year 2017, Is ...
9
votes
2answers
348 views

What benefit is there from enabling Query Store on msdb?

Of the SQL system database (master, model, msdb, tempdb) query store can only be used on msdb. I looked and don't find any documentation about query store on msdb. While you can't see it in the GUI, ...
2
votes
1answer
1k views

Log Shipping: Bulk Remove Alerts of already deleted primary and secondary databases

I'm facing a rather strange issue with Transaction Log Shipping reports in SSMS which is showing multiple red alerts of databases that have been created and deleted while performing multiple Log ...
0
votes
3answers
1k views

Grant a database role in current database with permission to execute a SP in msdb

I have created a role in my current SQL Server 2012 database with db_datareader, db_datawriter, and execute permissions. A procedure in the current db calls sp_start_job in msdb. How can I grant ...
0
votes
0answers
690 views

SQL Server 2012 How can table msdb.dbo.backupset column type contain NULL mark?

Microsoft documentation states that the table msdb.dbo.backupset column type can contain null marks. This table is suppose to contain a row for each single and successful backup that is taken. ...
0
votes
0answers
121 views

Step command in MSDB..SYSJOBSteps table is a changing after the job executes

I am getting this unusual behavior in one of our SQL 2008 R2 server where TSQL query in the command column of msdb..sysjobsteps table is changing [Truncating from 1400 characters to 250 characters] ...
4
votes
2answers
16k views

T-SQL query for date of last full backup, size and location

I'm using the below T-SQL query to determine the date of the last full database backup and also return the size and location of the backup file. My problem is that it won't return any data at all for ...
6
votes
3answers
723 views

Collation conflict … Could not use dbo.sysdac_instances

After a migration of databases to a new 2014 server with default collation Latin1_General_CI_AS, but where most of the databases have a collation of Latin1_General_BIN, an attempt to import an Excel ...
1
vote
0answers
182 views

Database Restore info not logged to msdb..restorehistory

I have 4 databases on a secondary server two of which are using Sql Server log shipping and two of which are using a "manual log shipping" config (there are just 2 primary databases). Both ...
7
votes
1answer
4k views

Database msdb stuck in recovery

I encountered a problem while testing recovering backups (Veritas BackUp Exec 2015, just for you to know). Main Problem is: I couldnt restore the databases - looking on the target Server where I want ...
5
votes
2answers
2k views

MSDB log file size

We have a SQL Server 2008 cluster with 60 databases. Full backup runs every night, log backup runs every 15 minutes. The MSDB database recovery model is set to simple (default). To be able to see ...
0
votes
1answer
324 views

Moving MSDB database files fails

I'm trying to relocate system databases files. I managed to do that with the tempdb database, but I'm stuck with msdb. When I run: SELECT name, physical_name AS current_file_location FROM sys....
1
vote
1answer
283 views

How can I check what jobs are scheduled to be run at a specific time?

How can I check what jobs are scheduled to be run at a specific time? I am trying to work on something, use msdb go Select [job name] = jb.name , [schedule name] = sc.name , [next run ...
1
vote
1answer
50 views

Can a SQL Server 2005 msdb database be restored as a User database?

Can a SQL Server 2005 msdb database be restored as a User database on another instance (same Build)? "Why?" you ask: I need a list of the mail items that existed prior to installation of two service ...
1
vote
1answer
99 views

MS SQL Server Incremental(differential) backup interrupted due to Full backup

I have a manual full backup happening every night, post which I am taking differential backup after every hour but after three to four differential backups a full backup happened through third party ...
3
votes
1answer
3k views

“Could not insert a backup or restore history/detail record in the msdb database” While restoring msdb

Today I found msdb database was in suspected mode, so I restored MSDB from my latest backup(As I have daily backup for this database). When I restore the MSDB database using Tsql i got below errors, ...
2
votes
2answers
17k views

Problem sending an attachment using dbo.sp_send_dbmail

I am trying to send an attachment using dbo.sp_send_dbmail. I can't do this I get the error Attachment file \VMName\ListTEAM\LCPP_CP.pdf is invalid. Just some quick things that I have checked. I ...
3
votes
1answer
3k views

Huge MSDB database

I have a very large MSDB database and have been working on clearing this out and setting up maintenance tasks - something my predecessor should have done years ago! So far I've managed to truncate ...
5
votes
2answers
5k views

Oprhaned entries in msdb..sysjobactivity

In this question: https://stackoverflow.com/questions/18445825/how-to-know-status-of-currently-running-jobs This answer was proposed: SELECT sj.name , sja.* FROM msdb.dbo.sysjobactivity AS sja ...
3
votes
1answer
2k views

How do I reclaim reserved space in the sysjobstepslogs table

I have a 36GB msdb database in my SQL Server 2008 R2 database server. From what I have read this is past the point of being gigantic. When I look at the tables in the msdb database the ...
2
votes
3answers
3k views

Getting the information that exists in “Job properties -> Notifications” page?

I use SQL Server 2008 R2 and I need get some properties from the msdb database. I need a query to get information that exists in the Job properties -> Notifications page. In which table I can ...
1
vote
1answer
596 views

How can I join msdb.dbo.sysalerts to msdb.dbo.sysoperators?

I am using SQL Server 2008 R2 and I want to create a script of my jobs. I need to find all objects that exist in one job. To achieve this goal, I get all operators with this query: SELECT * FROM ...
3
votes
2answers
525 views

sysjobhistory “sql_severity” codes

Where can I find out what the different "sql_severity" codes mean in the sysjobhistory table? Eg what does 0 mean? I've inherited a report that excludes ones with a 0 as "0 is not a real error"? I ...
4
votes
1answer
7k views

Moving MSDB database

When I am trying to move msdb database from it's default location (C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA) to another drive(E:). After moving the database I am getting ...
0
votes
3answers
1k views

Fixing a query that returns failed job information

I' using a SQL Server 2008 Sp3 environment. I have a query that returns information about failed jobs from the last 10 minutes. If a job has two schedulers (for example - a job that runs every 10 ...
2
votes
1answer
18k views

Database 'msdb' cannot be opened. it has been marked suspect by recovery

I'm using SQL Server 2008. I got suddenly today an error while i was accessing a database from Visual Studio. The error is: Database 'msdb' cannot be opened. It has been marked SUSPECT by recovery. ...
7
votes
1answer
490 views

Error in SSMS when attempting to restore a database

We have over a dozen SQL servers, one of which hosts a couple of hundred sage databases, when i right-click on the Databases node in SSMS there is a long delay then i get the following error (and the ...
7
votes
1answer
122 views

sysschedules datatype choices

I am curious, why does SQL Server save the values in msdb.dbo.sysschedules for date and times as int instead of datetime. I assume the reason dates back to something in SQL Server 2000. Was it a ...