Re: SELECT is fine, but INSERT gets Timeout Expired
- From: "Slim" <Slim@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Oct 2005 19:38:42 -0700
Hi Russell,
Thank you for your reply. I tried that at first, but did not solve my
problem. However, I figured it out. The login I was connecting to the
database with did not have specific read/write permission on that database.
However, what is weird is that I have also tried with the 'sa' account, and I
had the same problem.... but now I gave the other login read/write
permission, I can insert and update the table fine using 'sa' account......
weird...
Well i'm happy at least this step is resolved. Maybe I'll be back with some
more questions, hopefully with somthing more challenging :)
Thanks again.
"Russell Fields" wrote:
> Slim,
>
> Of course an INSERT can take longer than a SELECT. I suspect that you are
> being blocked by some lock in the system and your INSERT is timing out after
> 30 seconds. Things to do:
>
> 1 - Do your insert and then run (in query analyzer) sp_who. Look to see if
> your process (spid) is being blocked by another. If so, in the BLK column
> will be the spid that is getting in your way. Check that process to see it
> is doing. That may be where a change is needed.
>
> 2 - Increase the timeout from the default of 30 seconds.
>
> RLF
>
>
> "Slim" <Slim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:F14E5D52-167E-4259-80C0-1521E4062A64@xxxxxxxxxxxxxxxx
> >I have a computer A in Domain AA,
> > and have SQL Server installed on computer B in Domain BB.
> >
> > When I connect from computer A to SQL intance in B using script or C#
> > program, SELECT statements work fine, but when I try INSERT I get "Timeout
> > expired." Does anyone know what I can try to remedy the situation?
> >
> > For example, I have following connectionstring in vbs:
> >
> > oCn.ConnectionString = "Provider=sqloledb;Data
> > Source=ipaddress,1433;Network
> > Library=DBMSSOCN;Initial Catalog=databasename;User ID="& sLogin &
> > ";Password="& sPwd & ";"
> >
> > Following works fine:
> > oCn.open
> > oRs.Open "exec spgetstatus", oCn
> > (spgetstatus stored proc simply does select from a table),
> >
> > But following I get error:
> > oRs.Open "Insert into tblTestTable (TMAName) values ('from script')", oCn
> >
> > I get "Microsoft OLE DB Provider for SQL Server: Timeout expired" error.
> >
> > Any suggestions on what I need to change from the connecting machine
> > and/or
> > on the sql server installed machine??
> >
> > Thank you!!
>
>
>
.
- References:
- Re: SELECT is fine, but INSERT gets Timeout Expired
- From: Russell Fields
- Re: SELECT is fine, but INSERT gets Timeout Expired
- Prev by Date: Re: Executing Procedures through LInked Server
- Next by Date: Re: [ODBC SQL Server Driver]Communication link failure
- Previous by thread: Re: SELECT is fine, but INSERT gets Timeout Expired
- Next by thread: Re: [ODBC SQL Server Driver]Communication link failure
- Index(es):
Relevant Pages
|