Hi,
[Microsoft][ODBC SQL Server Driver]Timeout expired
I am getting the above error all the time:
In are old verison of the App it is not working.
The query is updating are table that has varchar(8000) columns and text(16)
columns.
Is there anything I can do to make this run faster. If you run the whole
query in SQL Analyzer it runs in milliseconds, but through the ASP pages that
are updating a record it Timeouts. And it is only happening to this one
table, we have other similar tables that have text and large varchars, that
run in are ASP pages just fine.
Thanks,
MattHi
Whist it is running, run sp_who2
Check for blocked processes
Looks like you have processes blocking each other so eventually the query
times out.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
that
> run in are ASP pages just fine.
> Thanks,
> Matt
>|||Can you post the DDL for the table and exactly how you are updating the row?
--
Andrew J. Kelly SQL MVP
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
> text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
> that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
> that
> run in are ASP pages just fine.
> Thanks,
> Matt
>
Showing posts with label old. Show all posts
Showing posts with label old. Show all posts
Tuesday, March 6, 2012
[Microsoft][ODBC SQL Server Driver]Timeout expired
Hi,
[Microsoft][ODBC SQL Server Driver]Timeout expired
I am getting the above error all the time:
In are old verison of the App it is not working.
The query is updating are table that has varchar(8000) columns and text(16)
columns.
Is there anything I can do to make this run faster. If you run the whole
query in SQL Analyzer it runs in milliseconds, but through the ASP pages that
are updating a record it Timeouts. And it is only happening to this one
table, we have other similar tables that have text and large varchars, that
run in are ASP pages just fine.
Thanks,
Matt
Hi
Whist it is running, run sp_who2
Check for blocked processes
Looks like you have processes blocking each other so eventually the query
times out.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
that
> run in are ASP pages just fine.
> Thanks,
> Matt
>
|||Can you post the DDL for the table and exactly how you are updating the row?
Andrew J. Kelly SQL MVP
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
> text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
> that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
> that
> run in are ASP pages just fine.
> Thanks,
> Matt
>
[Microsoft][ODBC SQL Server Driver]Timeout expired
I am getting the above error all the time:
In are old verison of the App it is not working.
The query is updating are table that has varchar(8000) columns and text(16)
columns.
Is there anything I can do to make this run faster. If you run the whole
query in SQL Analyzer it runs in milliseconds, but through the ASP pages that
are updating a record it Timeouts. And it is only happening to this one
table, we have other similar tables that have text and large varchars, that
run in are ASP pages just fine.
Thanks,
Matt
Hi
Whist it is running, run sp_who2
Check for blocked processes
Looks like you have processes blocking each other so eventually the query
times out.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
that
> run in are ASP pages just fine.
> Thanks,
> Matt
>
|||Can you post the DDL for the table and exactly how you are updating the row?
Andrew J. Kelly SQL MVP
"Jaffa" <Jaffa@.discussions.microsoft.com> wrote in message
news:EE8F55E6-C237-4262-920D-B0E889DE29CD@.microsoft.com...
> Hi,
> [Microsoft][ODBC SQL Server Driver]Timeout expired
>
> I am getting the above error all the time:
> In are old verison of the App it is not working.
> The query is updating are table that has varchar(8000) columns and
> text(16)
> columns.
> Is there anything I can do to make this run faster. If you run the whole
> query in SQL Analyzer it runs in milliseconds, but through the ASP pages
> that
> are updating a record it Timeouts. And it is only happening to this one
> table, we have other similar tables that have text and large varchars,
> that
> run in are ASP pages just fine.
> Thanks,
> Matt
>
Thursday, February 9, 2012
@@servername gives old name
Hi
I have changed mycomputername from test1 to test2
I can connect to sql server 2000 in query analyzer using test2 name , but
when I give query
select @.@.servername is gives old name test1
why this happens?
ThanksChanging the servername is not only a thing on windows, there are entries
you have to make via stored procedure on the systables, what does the table
sysserver tell (located in master)
HTH, Jens Suessmeyer.
"AM" <anonymous@.examnotes.net> schrieb im Newsbeitrag
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Changing the name of your server does not automatically change the name of t
he
SQL Server instance. Changing the name of a server running SQL Server is a
significant undertaking and should not be done without considerable forethou
ght.
Here's a link on the Microsoft KB that might help:
http://support.microsoft.com/defaul...kb;en-us;303774
Of course, this doesn't account for all applications that will have to chang
e to
point to the new server.
Thomas
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Execute the following on your server:
sp_dropserver <old_name>
go
sp_addserver <new_name>
go
When you rename a server, it doesn't update the master..sysservers table,
which is where @.@.servername gets its value. In SQL Server Books Online go
to index and type "Renaming servers" and you'll get a good topic discussing
it.
Mike
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||http://www.karaszi.com/SQLServer/in...server_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"AM" <anonymous@.examnotes.net> wrote in message news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.ph
x.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>
I have changed mycomputername from test1 to test2
I can connect to sql server 2000 in query analyzer using test2 name , but
when I give query
select @.@.servername is gives old name test1
why this happens?
ThanksChanging the servername is not only a thing on windows, there are entries
you have to make via stored procedure on the systables, what does the table
sysserver tell (located in master)
HTH, Jens Suessmeyer.
"AM" <anonymous@.examnotes.net> schrieb im Newsbeitrag
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Changing the name of your server does not automatically change the name of t
he
SQL Server instance. Changing the name of a server running SQL Server is a
significant undertaking and should not be done without considerable forethou
ght.
Here's a link on the Microsoft KB that might help:
http://support.microsoft.com/defaul...kb;en-us;303774
Of course, this doesn't account for all applications that will have to chang
e to
point to the new server.
Thomas
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||Execute the following on your server:
sp_dropserver <old_name>
go
sp_addserver <new_name>
go
When you rename a server, it doesn't update the master..sysservers table,
which is where @.@.servername gets its value. In SQL Server Books Online go
to index and type "Renaming servers" and you'll get a good topic discussing
it.
Mike
"AM" <anonymous@.examnotes.net> wrote in message
news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.phx.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>|||http://www.karaszi.com/SQLServer/in...server_name.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"AM" <anonymous@.examnotes.net> wrote in message news:%23$T53ICTFHA.3696@.TK2MSFTNGP15.ph
x.gbl...
> Hi
> I have changed mycomputername from test1 to test2
> I can connect to sql server 2000 in query analyzer using test2 name , but
> when I give query
> select @.@.servername is gives old name test1
> why this happens?
> Thanks
>
@@ROWCOUNT = 0 in a trigger
I'm going over some triggers in an old database we have and have come
accross the following...
...
IF (@.ROWCOUNT = 0)
RETURN
...
Can a trigger ever fire if zero rows were affected? Should I remove this
from the trigger?
Thanks.>> Can a trigger ever fire if zero rows were affected?
Yes, the trigger will fire once the corresponding DML is invoked. The number
of rows has no impact on its execution.
As a recommended practice, you should not.
Anith|||> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
Yes it will be fired. Just be careful using "set nocount on" before
inquiring for @.@.rowcount.
Example:
create table t1 (
c1 int not null default(0)
)
go
create trigger tr_t1_ins on t1
for insert
as
set nocount on
print '(' + ltrim(@.@.rowcount) + ' row(s) inserted' + ')'
go
create trigger tr_t1_ins_1 on t1
for insert
as
print '(' + ltrim(@.@.rowcount) + ' row(s) inserted' + ')'
go
create trigger tr_t1_upd on t1
for update
as
print '(' + ltrim(@.@.rowcount) + ' row(s) updated' + ')'
go
create trigger tr_t1_del on t1
for delete
as
print '(' + ltrim(@.@.rowcount) + ' row(s) deleted' + ')'
go
insert into t1 default values
go
update t1
set c1 = 1
where c1 = 2
go
delete t1
where c1 = 2
go
drop table t1
go
AMB
"C-W" wrote:
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>
>|||Thanks for the information,
Chris
"C-W" <nomailplease@.microsoft.nospam> wrote in message
news:u25d8jPnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>|||As others mentioned, the trigger will fire once per the corresponding
statement. This includes 0, 1, >1 affected rows.
In some cases you may want to apply different logic depending on the number
of affected rows. @.@.rowcount is your best tool to achieve this:
IF @.@.rowcount - 0 RETURN;
IF @.@.rowcount = 1
BEGIN -- 1 affected row logic
..
END
ELSE
BEGIN -- >1 affected rows logic
..
END
BG, SQL Server MVP
www.SolidQualityLearning.com
"C-W" <nomailplease@.microsoft.nospam> wrote in message
news:u25d8jPnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>
accross the following...
...
IF (@.ROWCOUNT = 0)
RETURN
...
Can a trigger ever fire if zero rows were affected? Should I remove this
from the trigger?
Thanks.>> Can a trigger ever fire if zero rows were affected?
Yes, the trigger will fire once the corresponding DML is invoked. The number
of rows has no impact on its execution.
As a recommended practice, you should not.
Anith|||> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
Yes it will be fired. Just be careful using "set nocount on" before
inquiring for @.@.rowcount.
Example:
create table t1 (
c1 int not null default(0)
)
go
create trigger tr_t1_ins on t1
for insert
as
set nocount on
print '(' + ltrim(@.@.rowcount) + ' row(s) inserted' + ')'
go
create trigger tr_t1_ins_1 on t1
for insert
as
print '(' + ltrim(@.@.rowcount) + ' row(s) inserted' + ')'
go
create trigger tr_t1_upd on t1
for update
as
print '(' + ltrim(@.@.rowcount) + ' row(s) updated' + ')'
go
create trigger tr_t1_del on t1
for delete
as
print '(' + ltrim(@.@.rowcount) + ' row(s) deleted' + ')'
go
insert into t1 default values
go
update t1
set c1 = 1
where c1 = 2
go
delete t1
where c1 = 2
go
drop table t1
go
AMB
"C-W" wrote:
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>
>|||Thanks for the information,
Chris
"C-W" <nomailplease@.microsoft.nospam> wrote in message
news:u25d8jPnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>|||As others mentioned, the trigger will fire once per the corresponding
statement. This includes 0, 1, >1 affected rows.
In some cases you may want to apply different logic depending on the number
of affected rows. @.@.rowcount is your best tool to achieve this:
IF @.@.rowcount - 0 RETURN;
IF @.@.rowcount = 1
BEGIN -- 1 affected row logic
..
END
ELSE
BEGIN -- >1 affected rows logic
..
END
BG, SQL Server MVP
www.SolidQualityLearning.com
"C-W" <nomailplease@.microsoft.nospam> wrote in message
news:u25d8jPnFHA.3480@.TK2MSFTNGP10.phx.gbl...
> I'm going over some triggers in an old database we have and have come
> accross the following...
> ...
> IF (@.ROWCOUNT = 0)
> RETURN
> ...
> Can a trigger ever fire if zero rows were affected? Should I remove this
> from the trigger?
> Thanks.
>
Subscribe to:
Posts (Atom)