Thursday, March 29, 2012

Failed to start jobs in sql agent after restart service

We have clustered sql2005 (sp2) installed in win2003 (sp2). Recently, we
encountered a problem which failed to start jobs in sql agent after restart
mssql server and aql agent services. It failed with exception error in the
job status dialogue.
There is no error message in event viewer and we found an error aqlagent.out
it shows
2007-07-28 02:08:11 - ! [165] ODBC Error: 0, Unable to complete login
process due to delay in opening server connection [SQLSTATE 08001]
Kindly advise and thanks in advanceCheck your service account (SQLAgent) and permissions related to this job.
Plus, check your cluster resources pertaining to SQL Agent service
"stephanie" <stephanie@.discussions.microsoft.com> wrote in message
news:754761F4-D5A9-460F-904A-BA0FC63CFBC6@.microsoft.com...
> We have clustered sql2005 (sp2) installed in win2003 (sp2). Recently, we
> encountered a problem which failed to start jobs in sql agent after
> restart
> mssql server and aql agent services. It failed with exception error in
> the
> job status dialogue.
>
> There is no error message in event viewer and we found an error
> aqlagent.out
> it shows
>
> 2007-07-28 02:08:11 - ! [165] ODBC Error: 0, Unable to complete login
> process due to delay in opening server connection [SQLSTATE 08001]
>
> Kindly advise and thanks in advance
>|||This problem only exist in node A. If failover to Node B , the agent works
normally.
the sql agent service a/c is an administrator. I compared the permission and
sql agent setting in cluster admin. Thery are the same
Kindly advise. Thanks a lot.
"bass_player [SBS-MVP]" wrote:

> Check your service account (SQLAgent) and permissions related to this job.
> Plus, check your cluster resources pertaining to SQL Agent service
>
> "stephanie" <stephanie@.discussions.microsoft.com> wrote in message
> news:754761F4-D5A9-460F-904A-BA0FC63CFBC6@.microsoft.com...
>
>

Failed to start jobs in sql agent after restart service

We have clustered sql2005 (sp2) installed in win2003 (sp2). Recently, we
encountered a problem which failed to start jobs in sql agent after restart
mssql server and aql agent services. It failed with exception error in the
job status dialogue.
There is no error message in event viewer and we found an error aqlagent.out
it shows
2007-07-28 02:08:11 - ! [165] ODBC Error: 0, Unable to complete login
process due to delay in opening server connection [SQLSTATE 08001]
Kindly advise and thanks in advanceCheck your service account (SQLAgent) and permissions related to this job.
Plus, check your cluster resources pertaining to SQL Agent service
"stephanie" <stephanie@.discussions.microsoft.com> wrote in message
news:754761F4-D5A9-460F-904A-BA0FC63CFBC6@.microsoft.com...
> We have clustered sql2005 (sp2) installed in win2003 (sp2). Recently, we
> encountered a problem which failed to start jobs in sql agent after
> restart
> mssql server and aql agent services. It failed with exception error in
> the
> job status dialogue.
>
> There is no error message in event viewer and we found an error
> aqlagent.out
> it shows
>
> 2007-07-28 02:08:11 - ! [165] ODBC Error: 0, Unable to complete login
> process due to delay in opening server connection [SQLSTATE 08001]
>
> Kindly advise and thanks in advance
>|||This problem only exist in node A. If failover to Node B , the agent works
normally.
the sql agent service a/c is an administrator. I compared the permission and
sql agent setting in cluster admin. Thery are the same
Kindly advise. Thanks a lot.
"bass_player [SBS-MVP]" wrote:
> Check your service account (SQLAgent) and permissions related to this job.
> Plus, check your cluster resources pertaining to SQL Agent service
>
> "stephanie" <stephanie@.discussions.microsoft.com> wrote in message
> news:754761F4-D5A9-460F-904A-BA0FC63CFBC6@.microsoft.com...
> > We have clustered sql2005 (sp2) installed in win2003 (sp2). Recently, we
> > encountered a problem which failed to start jobs in sql agent after
> > restart
> > mssql server and aql agent services. It failed with exception error in
> > the
> > job status dialogue.
> >
> >
> >
> > There is no error message in event viewer and we found an error
> > aqlagent.out
> >
> > it shows
> >
> >
> >
> > 2007-07-28 02:08:11 - ! [165] ODBC Error: 0, Unable to complete login
> > process due to delay in opening server connection [SQLSTATE 08001]
> >
> >
> >
> > Kindly advise and thanks in advance
> >
>
>

Failed to start a new trace - SQL PROFILER

SQL Profiler is running under Domain account and has
access to local folders... still it is throwing this error
message...
Another issue is double clicking the SQL Profiler Icon
does not start Profiler... I have to explicitly run it
under current user account...
Version MS SQL 2000/OS Windows XP Professional...
Any idea?Check to see if this is your issue.
295461 FIX: Profiler Fails To Start New Trace When User Environment Variable
http://support.microsoft.com/?id=295461
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||I have already verified it. Its not the issue.
I am not able to start SQL profiler as well as SQL Query
Analyzer by simply double clicking it. I have to
explicitly run it under current user account... Initially
I was not able to access any Profiler template files saved
under Desktop, then I granted rights to the logged in
Domain user... Now it is able to access the files but
could not start trace...
Hope this helps...
quote:

>--Original Message--
>Check to see if this is your issue.
>295461 FIX: Profiler Fails To Start New Trace When User

Environment Variable
quote:

>http://support.microsoft.com/?id=295461
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and

confers no rights.
quote:

>
>.
>
|||previous post:
"I am not able to start SQL profiler as well as SQL Query
Analyzer by simply double clicking it. I have to
explicitly run it under current user account... Initially
I was not able to access any Profiler template files saved
under Desktop, then I granted rights to the logged in
Domain user... Now it is able to access the files but
could not start trace...
"
Please explain what account you're logging into the machine with.
What groups does this user belong to?
Are there any Group Policies loaded ?
Also, did you create new desktop shortcuts to Profiler and Query Analyser?
Do the programs run if you launch them from the menu as opposed to your
shortcuts?
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Please explain what account you're logging into the
machine with.
Active Directory Domain User
What groups does this user belong to?
Local Administrator
Domain Users
Debugger users
Are there any Group Policies loaded ?
Yes. I just refreshed it.
Also, did you create new desktop shortcuts to Profiler and
Query Analyser?
No. I was able to access it using short cut previously.
Do the programs run if you launch them from the menu as
opposed to your shortcuts?
No It doesn't run from anywhere. Not from Shortcut, Menu
and SQL Enterprise Manager/Tools.
quote:

>--Original Message--
>previous post:
>"I am not able to start SQL profiler as well as SQL Query
>Analyzer by simply double clicking it. I have to
>explicitly run it under current user account... Initially
>I was not able to access any Profiler template files

saved
quote:

>under Desktop, then I granted rights to the logged in
>Domain user... Now it is able to access the files but
>could not start trace...
>"
>Please explain what account you're logging into the

machine with.
quote:

>What groups does this user belong to?
>Are there any Group Policies loaded ?
>Also, did you create new desktop shortcuts to Profiler

and Query Analyser?
quote:

>Do the programs run if you launch them from the menu as

opposed to your
quote:

>shortcuts?
>
>Thanks,
>Kevin McDonnell
>Microsoft Corporation
>This posting is provided AS IS with no warranties, and

confers no rights.
quote:

>
>.
>
|||You may want to try running FileMon.exe from www.sysinternals.com to see
where the permission problem is.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Failed to set proper user name ('domain\username') for the connection

Im runnning a Trace from Production against a Development box and getting
this error message:
Failed to set proper user name ('domain\username') for the connection
.. I have removed the db_id from the Trace table. Also, all the Logins/ Users
are set to the proper default DB. So Im really confused as to why I would be
getting this? Any ideas?
TIA, ChrisR
Hi
Have you got the same db_id for the database(s) on the production and
development servers? You may want to restore master! Alternatively try to
save the trace as a SQL File and then run that, you should not get this
problem and it will be easier to debug any problems that you do get.
John
"ChrisR" <ChrisR@.noEmail.com> wrote in message
news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> Im runnning a Trace from Production against a Development box and getting
> this error message:
> Failed to set proper user name ('domain\username') for the connection
> . I have removed the db_id from the Trace table. Also, all the Logins/
> Users
> are set to the proper default DB. So Im really confused as to why I would
> be
> getting this? Any ideas?
>
> TIA, ChrisR
>
|||John if Im not mistaken, the problem should have been fixed by simply
removing the db_id... therefore not requiring the restore of Master.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> Hi
> Have you got the same db_id for the database(s) on the production and
> development servers? You may want to restore master! Alternatively try to
> save the trace as a SQL File and then run that, you should not get this
> problem and it will be easier to debug any problems that you do get.
> John
> "ChrisR" <ChrisR@.noEmail.com> wrote in message
> news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
getting[vbcol=seagreen]
would
>
|||Hi
That is not what I understand! Profiling it may help.
John
ChrisR wrote:[vbcol=seagreen]
> John if Im not mistaken, the problem should have been fixed by simply
> removing the db_id... therefore not requiring the restore of Master.
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
and[vbcol=seagreen]
try to[vbcol=seagreen]
this[vbcol=seagreen]
get.[vbcol=seagreen]
> getting
connection[vbcol=seagreen]
Logins/[vbcol=seagreen]
I[vbcol=seagreen]
> would
|||It generally does work if you remove database ids from the
trace. Double check to make sure all the users captured in
the trace have a default database of the target database.
The commands should then be executed in the default database
so the database id isn't an issue.
-Sue
On 8 Feb 2005 00:01:01 -0800, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:
[vbcol=seagreen]
>Hi
>That is not what I understand! Profiling it may help.
>John
>ChrisR wrote:
>and
>try to
>this
>get.
>connection
>Logins/
>I
|||Hi
Another through, although you say there default databases are set for
all users, check that there are no orphaned users.
John
John Bell wrote:[vbcol=seagreen]
> Hi
> That is not what I understand! Profiling it may help.
> John
> ChrisR wrote:
simply[vbcol=seagreen]
Master.[vbcol=seagreen]
> and
Alternatively[vbcol=seagreen]
> try to
get[vbcol=seagreen]
> this
> get.
and[vbcol=seagreen]
> connection
> Logins/
why[vbcol=seagreen]
> I
sql

Failed to set proper user name ('domain\username') for the connection

Im runnning a Trace from Production against a Development box and getting
this error message:
Failed to set proper user name ('domain\username') for the connection
. I have removed the db_id from the Trace table. Also, all the Logins/ Users
are set to the proper default DB. So Im really confused as to why I would be
getting this? Any ideas?
TIA, ChrisRHi
Have you got the same db_id for the database(s) on the production and
development servers? You may want to restore master! Alternatively try to
save the trace as a SQL File and then run that, you should not get this
problem and it will be easier to debug any problems that you do get.
John
"ChrisR" <ChrisR@.noEmail.com> wrote in message
news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> Im runnning a Trace from Production against a Development box and getting
> this error message:
> Failed to set proper user name ('domain\username') for the connection
> . I have removed the db_id from the Trace table. Also, all the Logins/
> Users
> are set to the proper default DB. So Im really confused as to why I would
> be
> getting this? Any ideas?
>
> TIA, ChrisR
>|||John if Im not mistaken, the problem should have been fixed by simply
removing the db_id... therefore not requiring the restore of Master.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> Have you got the same db_id for the database(s) on the production and
> development servers? You may want to restore master! Alternatively try to
> save the trace as a SQL File and then run that, you should not get this
> problem and it will be easier to debug any problems that you do get.
> John
> "ChrisR" <ChrisR@.noEmail.com> wrote in message
> news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> > Im runnning a Trace from Production against a Development box and
getting
> > this error message:
> >
> > Failed to set proper user name ('domain\username') for the connection
> >
> > . I have removed the db_id from the Trace table. Also, all the Logins/
> > Users
> > are set to the proper default DB. So Im really confused as to why I
would
> > be
> > getting this? Any ideas?
> >
> >
> >
> > TIA, ChrisR
> >
> >
>|||Hi
That is not what I understand! Profiling it may help.
John
ChrisR wrote:
> John if Im not mistaken, the problem should have been fixed by simply
> removing the db_id... therefore not requiring the restore of Master.
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
> > Hi
> >
> > Have you got the same db_id for the database(s) on the production
and
> > development servers? You may want to restore master! Alternatively
try to
> > save the trace as a SQL File and then run that, you should not get
this
> > problem and it will be easier to debug any problems that you do
get.
> >
> > John
> >
> > "ChrisR" <ChrisR@.noEmail.com> wrote in message
> > news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> > > Im runnning a Trace from Production against a Development box and
> getting
> > > this error message:
> > >
> > > Failed to set proper user name ('domain\username') for the
connection
> > >
> > > . I have removed the db_id from the Trace table. Also, all the
Logins/
> > > Users
> > > are set to the proper default DB. So Im really confused as to why
I
> would
> > > be
> > > getting this? Any ideas?
> > >
> > >
> > >
> > > TIA, ChrisR
> > >
> > >
> >
> >|||It generally does work if you remove database ids from the
trace. Double check to make sure all the users captured in
the trace have a default database of the target database.
The commands should then be executed in the default database
so the database id isn't an issue.
-Sue
On 8 Feb 2005 00:01:01 -0800, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:
>Hi
>That is not what I understand! Profiling it may help.
>John
>ChrisR wrote:
>> John if Im not mistaken, the problem should have been fixed by simply
>> removing the db_id... therefore not requiring the restore of Master.
>>
>> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
>> news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
>> > Hi
>> >
>> > Have you got the same db_id for the database(s) on the production
>and
>> > development servers? You may want to restore master! Alternatively
>try to
>> > save the trace as a SQL File and then run that, you should not get
>this
>> > problem and it will be easier to debug any problems that you do
>get.
>> >
>> > John
>> >
>> > "ChrisR" <ChrisR@.noEmail.com> wrote in message
>> > news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
>> > > Im runnning a Trace from Production against a Development box and
>> getting
>> > > this error message:
>> > >
>> > > Failed to set proper user name ('domain\username') for the
>connection
>> > >
>> > > . I have removed the db_id from the Trace table. Also, all the
>Logins/
>> > > Users
>> > > are set to the proper default DB. So Im really confused as to why
>I
>> would
>> > > be
>> > > getting this? Any ideas?
>> > >
>> > >
>> > >
>> > > TIA, ChrisR
>> > >
>> > >
>> >
>> >|||Hi
Another through, although you say there default databases are set for
all users, check that there are no orphaned users.
John
John Bell wrote:
> Hi
> That is not what I understand! Profiling it may help.
> John
> ChrisR wrote:
> > John if Im not mistaken, the problem should have been fixed by
simply
> > removing the db_id... therefore not requiring the restore of
Master.
> >
> >
> > "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> > news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
> > > Hi
> > >
> > > Have you got the same db_id for the database(s) on the production
> and
> > > development servers? You may want to restore master!
Alternatively
> try to
> > > save the trace as a SQL File and then run that, you should not
get
> this
> > > problem and it will be easier to debug any problems that you do
> get.
> > >
> > > John
> > >
> > > "ChrisR" <ChrisR@.noEmail.com> wrote in message
> > > news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> > > > Im runnning a Trace from Production against a Development box
and
> > getting
> > > > this error message:
> > > >
> > > > Failed to set proper user name ('domain\username') for the
> connection
> > > >
> > > > . I have removed the db_id from the Trace table. Also, all the
> Logins/
> > > > Users
> > > > are set to the proper default DB. So Im really confused as to
why
> I
> > would
> > > > be
> > > > getting this? Any ideas?
> > > >
> > > >
> > > >
> > > > TIA, ChrisR
> > > >
> > > >
> > >
> > >

Failed to set proper user name ('domain\username') for the connection

Im runnning a Trace from Production against a Development box and getting
this error message:
Failed to set proper user name ('domain\username') for the connection
. I have removed the db_id from the Trace table. Also, all the Logins/ User
s
are set to the proper default DB. So Im really confused as to why I would be
getting this? Any ideas?
TIA, ChrisRHi
Have you got the same db_id for the database(s) on the production and
development servers? You may want to restore master! Alternatively try to
save the trace as a SQL File and then run that, you should not get this
problem and it will be easier to debug any problems that you do get.
John
"ChrisR" <ChrisR@.noEmail.com> wrote in message
news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
> Im runnning a Trace from Production against a Development box and getting
> this error message:
> Failed to set proper user name ('domain\username') for the connection
> . I have removed the db_id from the Trace table. Also, all the Logins/
> Users
> are set to the proper default DB. So Im really confused as to why I would
> be
> getting this? Any ideas?
>
> TIA, ChrisR
>|||John if Im not mistaken, the problem should have been fixed by simply
removing the db_id... therefore not requiring the restore of Master.
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message
news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
> Hi
> Have you got the same db_id for the database(s) on the production and
> development servers? You may want to restore master! Alternatively try to
> save the trace as a SQL File and then run that, you should not get this
> problem and it will be easier to debug any problems that you do get.
> John
> "ChrisR" <ChrisR@.noEmail.com> wrote in message
> news:%23qqMGq7CFHA.4052@.TK2MSFTNGP15.phx.gbl...
getting[vbcol=seagreen]
would[vbcol=seagreen]
>|||Hi
That is not what I understand! Profiling it may help.
John
ChrisR wrote:[vbcol=seagreen]
> John if Im not mistaken, the problem should have been fixed by simply
> removing the db_id... therefore not requiring the restore of Master.
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:e6jSfhHDFHA.2180@.TK2MSFTNGP10.phx.gbl...
and[vbcol=seagreen]
try to[vbcol=seagreen]
this[vbcol=seagreen]
get.[vbcol=seagreen]
> getting
connection[vbcol=seagreen]
Logins/[vbcol=seagreen]
I[vbcol=seagreen]
> would|||It generally does work if you remove database ids from the
trace. Double check to make sure all the users captured in
the trace have a default database of the target database.
The commands should then be executed in the default database
so the database id isn't an issue.
-Sue
On 8 Feb 2005 00:01:01 -0800, "John Bell"
<jbellnewsposts@.hotmail.com> wrote:
[vbcol=seagreen]
>Hi
>That is not what I understand! Profiling it may help.
>John
>ChrisR wrote:
>and
>try to
>this
>get.
>connection
>Logins/
>I|||Hi
Another through, although you say there default databases are set for
all users, check that there are no orphaned users.
John
John Bell wrote:[vbcol=seagreen]
> Hi
> That is not what I understand! Profiling it may help.
> John
> ChrisR wrote:
simply[vbcol=seagreen]
Master.[vbcol=seagreen]
> and
Alternatively[vbcol=seagreen]
> try to
get[vbcol=seagreen]
> this
> get.
and[vbcol=seagreen]
> connection
> Logins/
why[vbcol=seagreen]
> I

failed to search using d.DateCreated >='05/07/2007' AND d.DateCreated<= '05/07/2007'

hi all programmers.
i want to find the record that created on only 05/07/2007
the datetime in my database is 5/7/2007 4:09:00 PM
i used this (d.DateCreated >='05/07/2007' AND d.DateCreated<= '05/07/2007' ) inside the where clause.
but it returns no result.
please help me on this issue. thanks for all helps.

Try this


d.DateCreated >='05/07/2007' AND d.DateCreated< '06/07/2007'

|||

Or, to avoid ambiguity caused by your connection's language settings, you might want to use the following date format:

yyyy-mm-dd hh:mi: ss.mmm

<ignore the space after mi: - excluding it from forum posts results in this: miTongue Tied >

e.g.

d.DateCreated >= '2007-07-05 00:00:00.000' AND d.DateCreated < '2007-07-06 00:00:00.000'

or

d.DateCreated >= '2007-05-07 00:00:00.000' AND d.DateCreated < '2007-05-08 00:00:00.000'

(depending on the format of the date that you oiginally provided)

Chris

|||try this one

CONVERT(smalldatetime,CONVERT(varchar(10),d.DateCreated,101)) >=CONVERT(smalldatetime,'05/07/2007') AND
CONVERT(smalldatetime,CONVERT(varchar(10), d.DateCreated,101))<= CONVERT(smalldatetime,'05/07/2007')|||The where clause you specified is only looking for EXACTLY midnight, 5/07/2007 12:00am. If you want to search for anything on 5/7 use:

DateCreated >='5/7/2007' AND DateCreated < '5/8/2007'