Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sagarthanawala
Starting Member
1 Post |
Posted - 2008-05-15 : 05:36:38
|
Hello,Iam on MS-Sqlserver 2005 and Iam trying to add a job thru Mgmt studio.The job steps are :-1] Step name :- Query DB Type :- Transact-SQL script (T-SQL) Database :- Master Command :- select count(*) from sys.databases.This job run every 2 mintues and Iam getting the following error whenever this job executes :-Name :- DB Heartbeatowner :- NA\sqlserver-svcCategory :- Database MaintenanceStep ID 1Server SQ05ADB\SQ05ADBJob Name DB HeartbeatStep Name Query DBDuration 00:00:00Sql Severity 16Sql Message ID 208Operator Emailed Operator Net sent Operator Paged Retries Attempted 0MessageExecuted as user: NA\sqlserver-svc. Invalid object name 'sys.databases'. [SQLSTATE 42S02] (Error 208). The step failed.Please let me know. |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-05-15 : 08:40:55
|
Remove . after sys.databasesquote: Originally posted by sagarthanawala Hello,Iam on MS-Sqlserver 2005 and Iam trying to add a job thru Mgmt studio.The job steps are :-1] Step name :- Query DB Type :- Transact-SQL script (T-SQL) Database :- Master Command :- select count(*) from sys.databases.This job run every 2 mintues and Iam getting the following error whenever this job executes :-Name :- DB Heartbeatowner :- NA\sqlserver-svcCategory :- Database MaintenanceStep ID 1Server SQ05ADB\SQ05ADBJob Name DB HeartbeatStep Name Query DBDuration 00:00:00Sql Severity 16Sql Message ID 208Operator Emailed Operator Net sent Operator Paged Retries Attempted 0MessageExecuted as user: NA\sqlserver-svc. Invalid object name 'sys.databases'. [SQLSTATE 42S02] (Error 208). The step failed.Please let me know.
|
|
|
mahalirajesh
Starting Member
2 Posts |
Posted - 2010-01-25 : 23:06:36
|
Hi i am try to execute the following query in MSsql2008 Query editorUSE masterGOselect count(*) from sys.databasesi am getting following erro |
|
|
mahalirajesh
Starting Member
2 Posts |
Posted - 2010-01-25 : 23:07:59
|
Hi i am try to execute the following query in MSsql2008 Query editorUSE masterGOSELECT name FROM sys.databasesGOselect count(*) from sys.databasesGOi am getting following errorMsg 208, Level 16, State 1, Line 1Invalid object name 'sys.databases'. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-26 : 02:18:39
|
quote: Originally posted by mahalirajesh Hi i am try to execute the following query in MSsql2008 Query editorUSE masterGOSELECT name FROM sys.databasesGOselect count(*) from sys.databasesGOi am getting following errorMsg 208, Level 16, State 1, Line 1Invalid object name 'sys.databases'.
are you sure version of db you're connecting to is >= 2005try below and see what it returnsSELECT SERVERPROPERTY('productversion')also in future post your question as a new thread. dont hijack old threads |
|
|
|
|
|