Showing posts with label idea. Show all posts
Showing posts with label idea. Show all posts

Monday, March 26, 2012

Long blocked transaction logging

Is there anyone know any feature in SQL server which can detect/log the transaction which has been blocked unusually long? My idea is:

If a transaction has run for over 30 minutes, then log the following information in SQL server log:

1. State of the transaction : Blocked, Running, Sleeping

2. Time happeing

3. Duration

4. Last SQL it run

5. Blocked by which thread and info of the thread : the last SQL it run, the state of the thread.

Possibly it would be run in SQL server agent or SQL profiler has such feature, I am not sure about it. Can anyone suggest? Thanks.

If you are using SQL 2005, refer to the usage of the dynamic management view sys.dm_tran_active_transactions in Books Online.

For SQL 2000, this article may help:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q271509

|||

Thanks Arnie, I am using 2005 and this link is helpful:

http://msdn2.microsoft.com/en-us/library/ms191168.aspx

It provides the infomation of the Blocked Process Report Event Class object

Long blocked transaction logging

Is there anyone know any feature in SQL server which can detect/log the transaction which has been blocked unusually long? My idea is:

If a transaction has run for over 30 minutes, then log the following information in SQL server log:

1. State of the transaction : Blocked, Running, Sleeping

2. Time happeing

3. Duration

4. Last SQL it run

5. Blocked by which thread and info of the thread : the last SQL it run, the state of the thread.

Possibly it would be run in SQL server agent or SQL profiler has such feature, I am not sure about it. Can anyone suggest? Thanks.

If you are using SQL 2005, refer to the usage of the dynamic management view sys.dm_tran_active_transactions in Books Online.

For SQL 2000, this article may help:

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q271509

|||

Thanks Arnie, I am using 2005 and this link is helpful:

http://msdn2.microsoft.com/en-us/library/ms191168.aspx

It provides the infomation of the Blocked Process Report Event Class object

Monday, March 19, 2012

Logon prompts twice

Any idea why the logon prompts again when clicking on a report after
succesfully logging into the reporting services the first time? The report
opens with no problem. I am using Windows Server 2003, SQL Server 2000
Standard Edition, and IIS 6. Thanks.
FabianStill looking for a solution to this problem with no luck so far. Here is
some additional information that might help pinpoint the problem.
The title of the first logon window is "Connect to www.mywebsite.com" while
the title of the second logon window is "Connect to ServerName"
Any suggestions on how to fix this?
"Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
news:ufXbp1w3EHA.2788@.TK2MSFTNGP15.phx.gbl...
> Any idea why the logon prompts again when clicking on a report after
> succesfully logging into the reporting services the first time? The report
> opens with no problem. I am using Windows Server 2003, SQL Server 2000
> Standard Edition, and IIS 6. Thanks.
> Fabian
>|||You need to change the server name in your *.config files (search through
your RS installation folders) to a fully qualified domain name (FQDN). The
authentication cookies aren't crossing domain names.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
news:OgClS%2373EHA.1260@.TK2MSFTNGP12.phx.gbl...
> Still looking for a solution to this problem with no luck so far. Here is
> some additional information that might help pinpoint the problem.
>
> The title of the first logon window is "Connect to www.mywebsite.com"
> while the title of the second logon window is "Connect to ServerName"
>
> Any suggestions on how to fix this?
>
> "Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
> news:ufXbp1w3EHA.2788@.TK2MSFTNGP15.phx.gbl...
>> Any idea why the logon prompts again when clicking on a report after
>> succesfully logging into the reporting services the first time? The
>> report opens with no problem. I am using Windows Server 2003, SQL Server
>> 2000 Standard Edition, and IIS 6. Thanks.
>> Fabian
>|||Thanks Jeff.
It is fixed!
I modified the RSWebApplication.config located at: C:\Program
Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer
From: <ReportServerUrl>Server/ReportServer</ReportServerUrl>
To:
<ReportServerUrl>http://www.mywebsite.com/ReportServer</ReportServerUrl>
Fabian Cevallos
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:%235GqrOU4EHA.2192@.TK2MSFTNGP14.phx.gbl...
> You need to change the server name in your *.config files (search through
> your RS installation folders) to a fully qualified domain name (FQDN).
> The authentication cookies aren't crossing domain names.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
> news:OgClS%2373EHA.1260@.TK2MSFTNGP12.phx.gbl...
>> Still looking for a solution to this problem with no luck so far. Here
>> is some additional information that might help pinpoint the problem.
>>
>> The title of the first logon window is "Connect to www.mywebsite.com"
>> while the title of the second logon window is "Connect to ServerName"
>>
>> Any suggestions on how to fix this?
>>
>> "Fabian Cevallos" <fcevallos@.bellsouth.net> wrote in message
>> news:ufXbp1w3EHA.2788@.TK2MSFTNGP15.phx.gbl...
>> Any idea why the logon prompts again when clicking on a report after
>> succesfully logging into the reporting services the first time? The
>> report opens with no problem. I am using Windows Server 2003, SQL
>> Server 2000 Standard Edition, and IIS 6. Thanks.
>> Fabian
>>
>

Friday, March 9, 2012

login works with SQL but not MSDE

Any idea why the following dmo connection string would not work on MSDE, but
does work on SQL Personal Edition? It appears to connects, but then can't
find the server name. In both cases we are using the latest SQL Personal,
MSDE, and Windows XP.
Thanks for any guidance.
Neil
connection string:
server=myserver;trusted_connection="yes";database= northwind;connection
timeout=10;
exception:
[INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
timeout=10;
[EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login, Object
Password)
at SQLServer.Connect()
Was MSDE installed with the network protocols enabled? With SP3a they are
turned off by default.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> Any idea why the following dmo connection string would not work on MSDE,
but
> does work on SQL Personal Edition? It appears to connects, but then can't
> find the server name. In both cases we are using the latest SQL Personal,
> MSDE, and Windows XP.
> Thanks for any guidance.
> Neil
> connection string:
> server=myserver;trusted_connection="yes";database= northwind;connection
> timeout=10;
> exception:
> [INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
> timeout=10;
> [EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login,
Object
> Password)
> at SQLServer.Connect()
>
|||This took me a little bit further. I can now actually see the tables in in
my program using the dmo calls. Thanks! owever, when I try to access the
individual columns, I continue to get errors such as:
EXCEPTION] 20040520 08:37:30.955 (sqlserver.myObject) Error retrieving info
from test2: Server user 'mymachine\mylogin' is not a valid user in database
'test2'.
Again, this all works fine using SQL Personal Edition.
Neil
"Jim Young" <thorium48@.hotmail.com> wrote in message
Was MSDE installed with the network protocols enabled? With SP3a they are
turned off by default.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> Any idea why the following dmo connection string would not work on MSDE,
but
> does work on SQL Personal Edition? It appears to connects, but then can't
> find the server name. In both cases we are using the latest SQL Personal,
> MSDE, and Windows XP.
> Thanks for any guidance.
> Neil
> connection string:
> server=myserver;trusted_connection="yes";database= northwind;connection
> timeout=10;
> exception:
> [INFO] 20040517 17:59:34.598 (myControl) Connected successfully to
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection
> timeout=10;
> [EXCEPTION] 20040517 17:59:51.352 (SQLServer) Cannot connect
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
> access denied.
> [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()).
> at SQLDMO.SQLServerClass.Connect(Object ServerName, Object Login,
Object
> Password)
> at SQLServer.Connect()
>
|||Carefully read the error message. You need to make the user you are
connecting with, in this case a Windows login, a user in the database you
are trying to use. Everyone that can connect to a server can see the schema
of any database, but you can't select or change any data until you are given
explicit permissions in a database.
Jim
"Neil W." <neilw@.netlib.com> wrote in message
news:OShgsvmPEHA.2468@.TK2MSFTNGP11.phx.gbl...
> This took me a little bit further. I can now actually see the tables in
in
> my program using the dmo calls. Thanks! owever, when I try to access the
> individual columns, I continue to get errors such as:
> EXCEPTION] 20040520 08:37:30.955 (sqlserver.myObject) Error retrieving
info
> from test2: Server user 'mymachine\mylogin' is not a valid user in
database[vbcol=seagreen]
> 'test2'.
> Again, this all works fine using SQL Personal Edition.
> Neil
>
> "Jim Young" <thorium48@.hotmail.com> wrote in message
> Was MSDE installed with the network protocols enabled? With SP3a they are
> turned off by default.
> Jim
> "Neil W." <neilw@.netlib.com> wrote in message
> news:eC6V4XdPEHA.1276@.TK2MSFTNGP11.phx.gbl...
> but
can't[vbcol=seagreen]
Personal,
>
server=VPC1W2KSQL\VPC1MSDE;Trusted_Connection=yes; database=master;connection[vbcol=seagreen]
or
> Object
>
>

Monday, February 20, 2012

Login Problem

Hi All,
I am not able to login into my SQL Server using Query Analyser using a valid
SA Password. But My web application is working fine.
Any Idea why it is happening.
Thanks & Regards
Balaji Prabhu.TBalaji,
Your message this thin... what's the error message ? Are you timing out whi
le attempting to connect ?
Need more info.