Showing posts with label particular. Show all posts
Showing posts with label particular. Show all posts

Thursday, March 29, 2012

database name in SQL Server 2000

I'd like to create a trigger on a SQL Server 2000 table that operates if the table is in a particular database, but not in others. How do I query for the database name?

Thanks.

DB_NAME() will give you the database name but since you create a trigger on tables I don't see how this is usefull?

when you create a trigger on table abc you have to be in a DB already so you already know the name on creation

Denis the SQL Menace

http://sqlservercode.blogspot.com/

Database MSDB in suspect state.

Hi Friends,
MSDB database for my SQL 2000 Enterprise is in SUSPECT state. I have enough free space on disk. I don't see anything particular in Windows event viewer.
Please help.
Regards,
Jamil
what happens if you run a sp_resetstatus 'msdb'?
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Jamil Ahsan" <JamilAhsan@.discussions.microsoft.com> wrote in message
news:3954BE12-CAD0-41C1-A437-EEC82D4E09E1@.microsoft.com...
> Hi Friends,
> MSDB database for my SQL 2000 Enterprise is in SUSPECT state. I have
enough free space on disk. I don't see anything particular in Windows event
viewer.
> Please help.
> Regards,
> Jamil
>
|||When I run resetstatus I get a warning that I need to recover this database first.
"Hilary Cotter" wrote:

> what happens if you run a sp_resetstatus 'msdb'?
> --
> Hilary Cotter
> Looking for a book on SQL Server replication?
> http://www.nwsu.com/0974973602.html
>
> "Jamil Ahsan" <JamilAhsan@.discussions.microsoft.com> wrote in message
> news:3954BE12-CAD0-41C1-A437-EEC82D4E09E1@.microsoft.com...
> enough free space on disk. I don't see anything particular in Windows event
> viewer.
>
>
|||Jamil,
I use this checklist to troubleshoot such issues:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
HTH,
Paul Ibison
sql

Thursday, March 8, 2012

Database Maintenance Plan Grief

I've been setting up database maintenance plans for years, but lately, I've
been stumped by this particular database maintenance plan.
All it contains are full backup routines for 2 databases in Simple Recovery
Mode in a named instance to write out to a local drive. Every aspect of the
plan deals with local resources: e.g. not master / target server
relationships, no UNC drive paths, no linked servers, everything as simple
as can be. Drive space is more than ample. However, executing the database
maintenance plan-created job will fail. Maintenance Plan reports show
nothing. Searching google and KB has yielded nothing.
When I create a separate full backup job by using the 'BACKUP DATABASE'
command that virtually has the same characteristics as the maintenance plan
(same schedule, dumps to the same dir), this particular job runs flawlessly.
The job and SQL Server Agent are assigned to accounts that have unrestricted
access to the system at hand.
However, what I did was take the command from the job created by the
Database Maintenance Plan and attempt to run it in QA. Here are the
results.
COMMAND
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program Files\Microsoft SQL
Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program
Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
output
-----------
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
Copyright (C) Microsoft Corporation, 1995 - 1998
NULL
[Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL
Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(Connect()).
NULL
(7 row(s) affected)
Server: Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
Here's my system information:
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: )
I would do two things.
1. Try the basic same plan, but using sqlmaint.exe
2. Check server network utility and client network utility (for instance if you have configured some
alias).
The error suggests that sqlmaint.exe can't find the sql server. Perhaps the sql server doesn't
listen to the IP netlib. Also, check the errorlog file. This should include info about the netlibs
listened to and also if there were any errors with this.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"H Lee" <anon@.anon.com> wrote in message news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
> I've been setting up database maintenance plans for years, but lately, I've been stumped by this
> particular database maintenance plan.
> All it contains are full backup routines for 2 databases in Simple Recovery Mode in a named
> instance to write out to a local drive. Every aspect of the plan deals with local resources: e.g.
> not master / target server relationships, no UNC drive paths, no linked servers, everything as
> simple as can be. Drive space is more than ample. However, executing the database maintenance
> plan-created job will fail. Maintenance Plan reports show nothing. Searching google and KB has
> yielded nothing.
> When I create a separate full backup job by using the 'BACKUP DATABASE' command that virtually has
> the same characteristics as the maintenance plan (same schedule, dumps to the same dir), this
> particular job runs flawlessly.
> The job and SQL Server Agent are assigned to accounts that have unrestricted access to the system
> at hand.
> However, what I did was take the command from the job created by the Database Maintenance Plan and
> attempt to run it in QA. Here are the results.
> COMMAND
> --
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID 0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program
> Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
> 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program Files\Microsoft SQL
> Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
>
> output
> ----------
--
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
> Copyright (C) Microsoft Corporation, 1995 - 1998
> NULL
> [Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL Server Driver][TCP/IP
> Sockets]SQL Server does not exist or access denied.
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
> NULL
> (7 row(s) affected)
> Server: Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> Here's my system information:
> --
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.2 (Build 3790: )
>
|||I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
follows:
d:
cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
sqlmaint
-S <appropriate_server_name>
-U "_test_sa"
-P "_test_sa"
-D master
and received the following error:
Executed as user: <domain_name>\<user_name>. The process could not be
created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason: Access
is denied). The step failed.
I'll check the server network utility on the server soon. Client network
Utility seems OK-- my SQL EM and QA have been connecting fine to the server
and are still able to connect successfully.
ERRORLOG's show that SQL is successfully listening on TCP. This server has
had many users who successfully connect to it multiple times each day.
"SQL server listening on TCP, Shared Memory, Named Pipes"
I do see one error before this, however:
"Resource Manager Creation Failed: Result Code = 0x8004d01c"
Any help would be appreciated.
Thanks,
- H -
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
>I would do two things.
> 1. Try the basic same plan, but using sqlmaint.exe
> 2. Check server network utility and client network utility (for instance
> if you have configured some alias).
> The error suggests that sqlmaint.exe can't find the sql server. Perhaps
> the sql server doesn't listen to the IP netlib. Also, check the errorlog
> file. This should include info about the netlibs listened to and also if
> there were any errors with this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "H Lee" <anon@.anon.com> wrote in message
> news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
--
>
|||It turns out that, indeed, an alias in the SQL Server's own Client Network
Utility was referring to itself by its own NetBIOS name but had a
manually-set port number that was different from what the server was
actually listening on.
Craziness.
Thanks for your help.
"H Lee" <anon@.anon.com> wrote in message
news:%237eYXQzVFHA.2560@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
>I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
>follows:
>
> d:
> cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
> sqlmaint
> -S <appropriate_server_name>
> -U "_test_sa"
> -P "_test_sa"
> -D master
>
> and received the following error:
> Executed as user: <domain_name>\<user_name>. The process could not be
> created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason:
> Access is denied). The step failed.
> I'll check the server network utility on the server soon. Client network
> Utility seems OK-- my SQL EM and QA have been connecting fine to the
> server and are still able to connect successfully.
> ERRORLOG's show that SQL is successfully listening on TCP. This server
> has had many users who successfully connect to it multiple times each day.
> "SQL server listening on TCP, Shared Memory, Named Pipes"
> I do see one error before this, however:
> "Resource Manager Creation Failed: Result Code = 0x8004d01c"
> Any help would be appreciated.
> Thanks,
> - H -
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...
--
>

Database Maintenance Plan Grief

I've been setting up database maintenance plans for years, but lately, I've
been stumped by this particular database maintenance plan.
All it contains are full backup routines for 2 databases in Simple Recovery
Mode in a named instance to write out to a local drive. Every aspect of the
plan deals with local resources: e.g. not master / target server
relationships, no UNC drive paths, no linked servers, everything as simple
as can be. Drive space is more than ample. However, executing the database
maintenance plan-created job will fail. Maintenance Plan reports show
nothing. Searching google and KB has yielded nothing.
When I create a separate full backup job by using the 'BACKUP DATABASE'
command that virtually has the same characteristics as the maintenance plan
(same schedule, dumps to the same dir), this particular job runs flawlessly.
The job and SQL Server Agent are assigned to accounts that have unrestricted
access to the system at hand.
However, what I did was take the command from the job created by the
Database Maintenance Plan and attempt to run it in QA. Here are the
results.
COMMAND
--
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program Files\Microsoft SQL
Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program
Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
output
----
----
----
--
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
Copyright (C) Microsoft Corporation, 1995 - 1998
NULL
[Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][
ODBC SQL
Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied
.
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpe
n
(Connect()).
NULL
(7 row(s) affected)
Server: Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
Here's my system information:
--
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: )I would do two things.
1. Try the basic same plan, but using sqlmaint.exe
2. Check server network utility and client network utility (for instance if
you have configured some
alias).
The error suggests that sqlmaint.exe can't find the sql server. Perhaps the
sql server doesn't
listen to the IP netlib. Also, check the errorlog file. This should include
info about the netlibs
listened to and also if there were any errors with this.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"H Lee" <anon@.anon.com> wrote in message news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...[vbc
ol=seagreen]
> I've been setting up database maintenance plans for years, but lately, I'v
e been stumped by this
> particular database maintenance plan.
> All it contains are full backup routines for 2 databases in Simple Recover
y Mode in a named
> instance to write out to a local drive. Every aspect of the plan deals wi
th local resources: e.g.
> not master / target server relationships, no UNC drive paths, no linked se
rvers, everything as
> simple as can be. Drive space is more than ample. However, executing the
database maintenance
> plan-created job will fail. Maintenance Plan reports show nothing. Searc
hing google and KB has
> yielded nothing.
> When I create a separate full backup job by using the 'BACKUP DATABASE' co
mmand that virtually has
> the same characteristics as the maintenance plan (same schedule, dumps to
the same dir), this
> particular job runs flawlessly.
> The job and SQL Server Agent are assigned to accounts that have unrestrict
ed access to the system
> at hand.
> However, what I did was take the command from the job created by the Datab
ase Maintenance Plan and
> attempt to run it in QA. Here are the results.
> COMMAND
> --
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID 0763D5A4-5A35-4993-B7FA-0CC4D44DF
EE3 -Rpt "G:\Program
> Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt
" -DelTxtRpt
> 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program File
s\Microsoft SQL
> Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
>
> output
> ----
----
----
--[/vbcol]
--
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
> Copyright (C) Microsoft Corporation, 1995 - 1998
> NULL
> [Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft]
1;ODBC SQL Server Driver][TCP/IP
> Sockets]SQL Server does not exist or access denied.
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionO
pen (Connect()).
> NULL
> (7 row(s) affected)
> Server: Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> Here's my system information:
> --
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.2 (Build 3790: )
>|||I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
follows:
d:
cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
sqlmaint
-S <appropriate_server_name>
-U "_test_sa"
-P "_test_sa"
-D master
and received the following error:
Executed as user: <domain_name>\<user_name>. The process could not be
created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason: Access
is denied). The step failed.
I'll check the server network utility on the server soon. Client network
Utility seems OK-- my SQL EM and QA have been connecting fine to the server
and are still able to connect successfully.
ERRORLOG's show that SQL is successfully listening on TCP. This server has
had many users who successfully connect to it multiple times each day.
"SQL server listening on TCP, Shared Memory, Named Pipes"
I do see one error before this, however:
"Resource Manager Creation Failed: Result Code = 0x8004d01c"
Any help would be appreciated.
Thanks,
- H -
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...
>I would do two things.
> 1. Try the basic same plan, but using sqlmaint.exe
> 2. Check server network utility and client network utility (for instance
> if you have configured some alias).
> The error suggests that sqlmaint.exe can't find the sql server. Perhaps
> the sql server doesn't listen to the IP netlib. Also, check the errorlog
> file. This should include info about the netlibs listened to and also if
> there were any errors with this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "H Lee" <anon@.anon.com> wrote in message
> news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
--[vbcol=seagreen]
>|||It turns out that, indeed, an alias in the SQL Server's own Client Network
Utility was referring to itself by its own NetBIOS name but had a
manually-set port number that was different from what the server was
actually listening on.
Craziness.
Thanks for your help.
"H Lee" <anon@.anon.com> wrote in message
news:%237eYXQzVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
>follows:
>
> d:
> cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
> sqlmaint
> -S <appropriate_server_name>
> -U "_test_sa"
> -P "_test_sa"
> -D master
>
> and received the following error:
> Executed as user: <domain_name>\<user_name>. The process could not be
> created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason:
> Access is denied). The step failed.
> I'll check the server network utility on the server soon. Client network
> Utility seems OK-- my SQL EM and QA have been connecting fine to the
> server and are still able to connect successfully.
> ERRORLOG's show that SQL is successfully listening on TCP. This server
> has had many users who successfully connect to it multiple times each day.
> "SQL server listening on TCP, Shared Memory, Named Pipes"
> I do see one error before this, however:
> "Resource Manager Creation Failed: Result Code = 0x8004d01c"
> Any help would be appreciated.
> Thanks,
> - H -
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...
--[vbcol=seagreen]
>

Database Maintenance Plan Grief

I've been setting up database maintenance plans for years, but lately, I've
been stumped by this particular database maintenance plan.
All it contains are full backup routines for 2 databases in Simple Recovery
Mode in a named instance to write out to a local drive. Every aspect of the
plan deals with local resources: e.g. not master / target server
relationships, no UNC drive paths, no linked servers, everything as simple
as can be. Drive space is more than ample. However, executing the database
maintenance plan-created job will fail. Maintenance Plan reports show
nothing. Searching google and KB has yielded nothing.
When I create a separate full backup job by using the 'BACKUP DATABASE'
command that virtually has the same characteristics as the maintenance plan
(same schedule, dumps to the same dir), this particular job runs flawlessly.
The job and SQL Server Agent are assigned to accounts that have unrestricted
access to the system at hand.
However, what I did was take the command from the job created by the
Database Maintenance Plan and attempt to run it in QA. Here are the
results.
COMMAND
--
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program Files\Microsoft SQL
Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program
Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
output
-----------
NULL
Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
Copyright (C) Microsoft Corporation, 1995 - 1998
NULL
[Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL
Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
(Connect()).
NULL
(7 row(s) affected)
Server: Msg 22029, Level 16, State 1, Line 0
sqlmaint.exe failed.
Here's my system information:
--
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: )I would do two things.
1. Try the basic same plan, but using sqlmaint.exe
2. Check server network utility and client network utility (for instance if you have configured some
alias).
The error suggests that sqlmaint.exe can't find the sql server. Perhaps the sql server doesn't
listen to the IP netlib. Also, check the errorlog file. This should include info about the netlibs
listened to and also if there were any errors with this.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"H Lee" <anon@.anon.com> wrote in message news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
> I've been setting up database maintenance plans for years, but lately, I've been stumped by this
> particular database maintenance plan.
> All it contains are full backup routines for 2 databases in Simple Recovery Mode in a named
> instance to write out to a local drive. Every aspect of the plan deals with local resources: e.g.
> not master / target server relationships, no UNC drive paths, no linked servers, everything as
> simple as can be. Drive space is more than ample. However, executing the database maintenance
> plan-created job will fail. Maintenance Plan reports show nothing. Searching google and KB has
> yielded nothing.
> When I create a separate full backup job by using the 'BACKUP DATABASE' command that virtually has
> the same characteristics as the maintenance plan (same schedule, dumps to the same dir), this
> particular job runs flawlessly.
> The job and SQL Server Agent are assigned to accounts that have unrestricted access to the system
> at hand.
> However, what I did was take the command from the job created by the Database Maintenance Plan and
> attempt to run it in QA. Here are the results.
> COMMAND
> --
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID 0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program
> Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
> 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program Files\Microsoft SQL
> Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
>
> output
> -----------
> NULL
> Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
> Copyright (C) Microsoft Corporation, 1995 - 1998
> NULL
> [Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL Server Driver][TCP/IP
> Sockets]SQL Server does not exist or access denied.
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen (Connect()).
> NULL
> (7 row(s) affected)
> Server: Msg 22029, Level 16, State 1, Line 0
> sqlmaint.exe failed.
>
> Here's my system information:
> --
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Enterprise Edition on Windows NT 5.2 (Build 3790: )
>|||I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
follows:
d:
cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
sqlmaint
-S <appropriate_server_name>
-U "_test_sa"
-P "_test_sa"
-D master
and received the following error:
Executed as user: <domain_name>\<user_name>. The process could not be
created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason: Access
is denied). The step failed.
I'll check the server network utility on the server soon. Client network
Utility seems OK-- my SQL EM and QA have been connecting fine to the server
and are still able to connect successfully.
ERRORLOG's show that SQL is successfully listening on TCP. This server has
had many users who successfully connect to it multiple times each day.
"SQL server listening on TCP, Shared Memory, Named Pipes"
I do see one error before this, however:
"Resource Manager Creation Failed: Result Code = 0x8004d01c"
Any help would be appreciated.
Thanks,
- H -
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...
>I would do two things.
> 1. Try the basic same plan, but using sqlmaint.exe
> 2. Check server network utility and client network utility (for instance
> if you have configured some alias).
> The error suggests that sqlmaint.exe can't find the sql server. Perhaps
> the sql server doesn't listen to the IP netlib. Also, check the errorlog
> file. This should include info about the netlibs listened to and also if
> there were any errors with this.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "H Lee" <anon@.anon.com> wrote in message
> news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
>> I've been setting up database maintenance plans for years, but lately,
>> I've been stumped by this particular database maintenance plan.
>> All it contains are full backup routines for 2 databases in Simple
>> Recovery Mode in a named instance to write out to a local drive. Every
>> aspect of the plan deals with local resources: e.g. not master / target
>> server relationships, no UNC drive paths, no linked servers, everything
>> as simple as can be. Drive space is more than ample. However, executing
>> the database maintenance plan-created job will fail. Maintenance Plan
>> reports show nothing. Searching google and KB has yielded nothing.
>> When I create a separate full backup job by using the 'BACKUP DATABASE'
>> command that virtually has the same characteristics as the maintenance
>> plan (same schedule, dumps to the same dir), this particular job runs
>> flawlessly.
>> The job and SQL Server Agent are assigned to accounts that have
>> unrestricted access to the system at hand.
>> However, what I did was take the command from the job created by the
>> Database Maintenance Plan and attempt to run it in QA. Here are the
>> results.
>> COMMAND
>> --
>> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
>> 0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program Files\Microsoft SQL
>> Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
>> 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program
>> Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
>>
>> output
>> -----------
>> NULL
>> Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
>> Copyright (C) Microsoft Corporation, 1995 - 1998
>> NULL
>> [Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL
>> Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.
>> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
>> (Connect()).
>> NULL
>> (7 row(s) affected)
>> Server: Msg 22029, Level 16, State 1, Line 0
>> sqlmaint.exe failed.
>>
>> Here's my system information:
>> --
>> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
>> Dec 17 2002 14:22:05
>> Copyright (c) 1988-2003 Microsoft Corporation
>> Enterprise Edition on Windows NT 5.2 (Build 3790: )
>|||It turns out that, indeed, an alias in the SQL Server's own Client Network
Utility was referring to itself by its own NetBIOS name but had a
manually-set port number that was different from what the server was
actually listening on.
Craziness.
Thanks for your help.
"H Lee" <anon@.anon.com> wrote in message
news:%237eYXQzVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>I tried creating a CmdExec SQL Server Agent job to run sqlmaint.exe as
>follows:
>
> d:
> cd d:\"Program Files"\"Microsoft SQL Server"\<server_name_dir>\binn
> sqlmaint
> -S <appropriate_server_name>
> -U "_test_sa"
> -P "_test_sa"
> -D master
>
> and received the following error:
> Executed as user: <domain_name>\<user_name>. The process could not be
> created for step 1 of job 0x8982332A9E97994B8A010AEC322ABCAB (reason:
> Access is denied). The step failed.
> I'll check the server network utility on the server soon. Client network
> Utility seems OK-- my SQL EM and QA have been connecting fine to the
> server and are still able to connect successfully.
> ERRORLOG's show that SQL is successfully listening on TCP. This server
> has had many users who successfully connect to it multiple times each day.
> "SQL server listening on TCP, Shared Memory, Named Pipes"
> I do see one error before this, however:
> "Resource Manager Creation Failed: Result Code = 0x8004d01c"
> Any help would be appreciated.
> Thanks,
> - H -
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OguZDcxVFHA.3176@.TK2MSFTNGP12.phx.gbl...
>>I would do two things.
>> 1. Try the basic same plan, but using sqlmaint.exe
>> 2. Check server network utility and client network utility (for instance
>> if you have configured some alias).
>> The error suggests that sqlmaint.exe can't find the sql server. Perhaps
>> the sql server doesn't listen to the IP netlib. Also, check the errorlog
>> file. This should include info about the netlibs listened to and also if
>> there were any errors with this.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "H Lee" <anon@.anon.com> wrote in message
>> news:%23qD5qUxVFHA.2328@.TK2MSFTNGP10.phx.gbl...
>> I've been setting up database maintenance plans for years, but lately,
>> I've been stumped by this particular database maintenance plan.
>> All it contains are full backup routines for 2 databases in Simple
>> Recovery Mode in a named instance to write out to a local drive. Every
>> aspect of the plan deals with local resources: e.g. not master / target
>> server relationships, no UNC drive paths, no linked servers, everything
>> as simple as can be. Drive space is more than ample. However,
>> executing the database maintenance plan-created job will fail.
>> Maintenance Plan reports show nothing. Searching google and KB has
>> yielded nothing.
>> When I create a separate full backup job by using the 'BACKUP DATABASE'
>> command that virtually has the same characteristics as the maintenance
>> plan (same schedule, dumps to the same dir), this particular job runs
>> flawlessly.
>> The job and SQL Server Agent are assigned to accounts that have
>> unrestricted access to the system at hand.
>> However, what I did was take the command from the job created by the
>> Database Maintenance Plan and attempt to run it in QA. Here are the
>> results.
>> COMMAND
>> --
>> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
>> 0763D5A4-5A35-4993-B7FA-0CC4D44DFEE3 -Rpt "G:\Program Files\Microsoft
>> SQL Server\MSSQL$ABSSQL_CLU1\LOG\DB Maintenance Plan14.txt" -DelTxtRpt
>> 1WEEKS -WriteHistory -VrfyBackup -BkUpMedia DISK -BkUpDB "G:\Program
>> Files\Microsoft SQL Server\MSSQL$ABSSQL_CLU1\BACKUP" -BkExt "BAK"'
>>
>> output
>> -----------
>> NULL
>> Microsoft (R) SQLMaint Utility (Unicode), Version 8.00.760
>> Copyright (C) Microsoft Corporation, 1995 - 1998
>> NULL
>> [Microsoft SQL-DMO (ODBC SQLState: 08001)] Error 0: [Microsoft][ODBC SQL
>> Server Driver][TCP/IP Sockets]SQL Server does not exist or access
>> denied.
>> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionOpen
>> (Connect()).
>> NULL
>> (7 row(s) affected)
>> Server: Msg 22029, Level 16, State 1, Line 0
>> sqlmaint.exe failed.
>>
>> Here's my system information:
>> --
>> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
>> Dec 17 2002 14:22:05
>> Copyright (c) 1988-2003 Microsoft Corporation
>> Enterprise Edition on Windows NT 5.2 (Build 3790: )
>>
>

Tuesday, February 14, 2012

Database last accessed

Hello All,
Is there a way to figure out/track when was the last time/date a
particular database was accessed by users? I am trying to determine
which databases haven't been used/accessed by users in a while so I can
find out if they are still needed or not. My environment is SQL 2000
SP3 with Windows 2000 as the OS. Any help will be appreciated.
Thanks,
Raziq.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi,
First option will be enable Profiler , otherwise write triggers to identify
the last accessed database.
Thanks
Hari
MCDBA
"Raziq Shekha" <raziq_shekha@.anadarko.com> wrote in message
news:eiZlyPr2DHA.1700@.TK2MSFTNGP12.phx.gbl...
> Hello All,
> Is there a way to figure out/track when was the last time/date a
> particular database was accessed by users? I am trying to determine
> which databases haven't been used/accessed by users in a while so I can
> find out if they are still needed or not. My environment is SQL 2000
> SP3 with Windows 2000 as the OS. Any help will be appreciated.
> Thanks,
> Raziq.
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!