error in the job history | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

error in the job history

Hi ALL,
Thereis job which is scheduled for the monitoring the growth of the central databases on the server ABCEDFG. the step in the job containt following script
create proc db_growth_report as exec monitor_file_growth
–EXEC sp_runwebtask @procname = N’web page 3′
–EXEC sp_runwebtask @procname = N’ Web Page 32′
–EXEC sp_runwebtask @procname = N’ Web Page_DB_Growth’
EXEC sp_runwebtask @procname = N’Web Page 6′ –select CAST (statdate AS char (20)) as startdate, cast (servername as char (15)) as servername, cast (dbname as char (15)) as DBname, cast (filename as char(70)) as filename, cast (sizembnow as char(15)) as [Current DB Size],cast (sizembwas as char(12)) as [Previous DB Size] from dbfile_growth_info
Select CAST (StartDate AS char (20)) as StartDate, cast (ServerName as char (15)) as ServerName, cast (DBName as char(25)) as DBName,cast (FileName as char(80)) as FileName, cast (CurrentDBSize_MB as char(15)) as [CurrentDBSize_MB],cast (PriorDBSize_MB as char(12)) as [PriorDBSize_MB] from dbfile_growth_info
–select CAST (StartDate AS char(20)), cast (ServerName as char(15)), cast (DBName as char(25)),cast (FileName as char(80)), cast (CurrentDBSize(MB) as char(15)),cast (PriorDBSize(MB) as char(12)) from dbfile_growth_info –select * from dbfile_growth_info Go
The job history shows the following message for the failure of the job-
Executed as user ‘abcedf’. Database ‘abcedf_007’ cannot be opened because it is offline. [SQLSTATE 42000] (Error 942) [SQLSTATE 01000] (Error 7312). The step failed. but the database ‘abcedf_007’ doesn’t exits in this particular server, it is on another server ‘xyz’
can some tell me why job history reflects the following message were as that database doesn’t exits in that server.
thanks
vanishree
Use DATABASEPROPERTYEX fuction check the status of the database and get the info for ONLINE dbs only… The code you posted don’t have any reference to system tables/views but may be underlying other proc… No idea why it showing…
What version you are on? MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

check what procedure "monitor_file_growth" do.. there may be some script existing with ‘abcedf_007’ database reference. Madhu
If you are using multiserver administration then having this error is quite common, so see whether the script you are running and job that exists for local serveronly. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
]]>