Showing posts with label thereim. Show all posts
Showing posts with label thereim. Show all posts

Wednesday, March 7, 2012

connection to another server

Hello there
I'm working with query anlyser.
Is there a way with code to transfare to another server?
Roy,
Transfer what? Can you please explain in a little more detail what you want
to accomplish?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Hello there
> I'm working with query anlyser.
> Is there a way with code to transfare to another server?
>
|||Yes Andrew
It begun from another issue i've asked on DTS aboud the log file.
I dound the property you said about TABLOCK by using sp_tableoption and it
worked fine: the log file hasen't grow in a bit. Thanks
I could run the store procedure only on the destination object by connect it
by query anlyser
I'm trying to build store procedure that will do all the options. In order
to do that i must run sp_tableoption on the destination tables on the
diffrent server. and the store procedure must start from the source server
How can i do that?
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> Roy,
> Transfer what? Can you please explain in a little more detail what you
want
> to accomplish?
> --
> Andrew J. Kelly SQL MVP
>
> "Roy Goldhammer" <roy@.hotmail.com> wrote in message
> news:%23akEH2GCGHA.1312@.TK2MSFTNGP09.phx.gbl...
>
|||It doesn't matter where you run QA from as the code itself is always run on
the server itself, not the client. So I am still confused as to what you
want to do that you can't already. Is it a permissions issue?
Andrew J. Kelly SQL MVP
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:%23Y2h8LJCGHA.3936@.TK2MSFTNGP12.phx.gbl...
> Yes Andrew
> It begun from another issue i've asked on DTS aboud the log file.
> I dound the property you said about TABLOCK by using sp_tableoption and it
> worked fine: the log file hasen't grow in a bit. Thanks
> I could run the store procedure only on the destination object by connect
> it
> by query anlyser
> I'm trying to build store procedure that will do all the options. In order
> to do that i must run sp_tableoption on the destination tables on the
> diffrent server. and the store procedure must start from the source server
> How can i do that?
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> wrote in message
> news:elQeVHJCGHA.4040@.TK2MSFTNGP12.phx.gbl...
> want
>

connection timeout

Hi there
I'm using SQL Server 2000. I often use the UPDATE ... SET ... statements to
change data in my database, affecting up to 3 million rows of data. If I
issue the statements from Enterprise Manager I get a "timeout expired" error
on large queries, whereas if I execute the queries from Query Analyser, they
perform fine if very slowly. Mostly at the moment I'm happy that they
execute.
Now, if I issue the statements over an ADO connection from Microsoft Excel
(using a VBA procedure, with the statements issued either on-the-fly or via
a stored query), I get the same "timeout expired" error.
Any ideas?
Best regards
Loane
Hi
Make sure that your database and log file have been grown big enough before
you run the update.
Make sure that the Where clause column is indexed.
If possible, break up your update into smaller pieces.
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/
"Loane Sharp" <look_sharp_not@.hotmail.com> wrote in message
news:u$mMC4GZFHA.228@.TK2MSFTNGP12.phx.gbl...
> Hi there
> I'm using SQL Server 2000. I often use the UPDATE ... SET ... statements
> to change data in my database, affecting up to 3 million rows of data. If
> I issue the statements from Enterprise Manager I get a "timeout expired"
> error on large queries, whereas if I execute the queries from Query
> Analyser, they perform fine if very slowly. Mostly at the moment I'm happy
> that they execute.
> Now, if I issue the statements over an ADO connection from Microsoft Excel
> (using a VBA procedure, with the statements issued either on-the-fly or
> via a stored query), I get the same "timeout expired" error.
> Any ideas?
> Best regards
> Loane
>
|||That is because EM has a default timeout for connections at 30 seconds as do
most drivers. QA on the other hand defaults to 0 which means it never times
out. When ever possible try to avoid doing operations on so many rows all
in one transaction. Most operations such as that can sit in a loop and do
the updates in smaller batches of say 10 or 20 thousand rows at a time.
That way you should never timeout and won't block other users as much or for
as long a period of time. There are plenty of ways to approach a situation
such as that. If you need help then post the DDL for the table and the
update statement you normally would use.
Andrew J. Kelly SQL MVP
"Loane Sharp" <look_sharp_not@.hotmail.com> wrote in message
news:u$mMC4GZFHA.228@.TK2MSFTNGP12.phx.gbl...
> Hi there
> I'm using SQL Server 2000. I often use the UPDATE ... SET ... statements
> to change data in my database, affecting up to 3 million rows of data. If
> I issue the statements from Enterprise Manager I get a "timeout expired"
> error on large queries, whereas if I execute the queries from Query
> Analyser, they perform fine if very slowly. Mostly at the moment I'm happy
> that they execute.
> Now, if I issue the statements over an ADO connection from Microsoft Excel
> (using a VBA procedure, with the statements issued either on-the-fly or
> via a stored query), I get the same "timeout expired" error.
> Any ideas?
> Best regards
> Loane
>