Showing posts with label production. Show all posts
Showing posts with label production. Show all posts

Thursday, March 29, 2012

Distributed Queries

We are using MS SQL Server 2000 service pack 4.
On our production servers the following scenerio works, our LAN
department recently rebuilt one of our development servers and we are
having problems.
On our central development server I create a temp table CREATE TABLE
#Temp(dur_code char(1) NOT NULL, tmc_code char(1) NOT NULL)
-- Inserting into the temp table on our central server from our DEV2
server works when called this way:
INSERT #temp
SELECT dur_code, tmc_code
FROM dev1.sms.dbo.term_cds
--This dynamic statement works from the central server to dev2 server
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
EXEC (@.vcCmd)
-- Inserting to the same temp table on the central server from the same
DEV2 server does not work when it is called dynamically.
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
INSERT #temp EXEC (@.vcCmd)
I am running this code through SQL Query Analyzer. This code works on
our central server when we call our other development server remotely
(and on all of our production servers). The Distributed Transaction
Coordinator is running on both servers.
Any ideas on what we have done wrong?Karen (karen.jones@.tusd1.org) writes:
> -- Inserting to the same temp table on the central server from the same
> DEV2 server does not work when it is called dynamically.
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> INSERT #temp EXEC (@.vcCmd)
What "does not work" mean? If there is an error message, please post it.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||CLARIFICATION:
We are inserting into a table on our central server and making a
dynamic call to the dev2 server.
Karen wrote:
> We are using MS SQL Server 2000 service pack 4.
> On our production servers the following scenerio works, our LAN
> department recently rebuilt one of our development servers and we are
> having problems.
> On our central development server I create a temp table CREATE TABLE
> #Temp(dur_code char(1) NOT NULL, tmc_code char(1) NOT NULL)
> -- Inserting into the temp table on our central server from our DEV2
> server works when called this way:
> INSERT #temp
> SELECT dur_code, tmc_code
> FROM dev1.sms.dbo.term_cds
>
> --This dynamic statement works from the central server to dev2 server
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> EXEC (@.vcCmd)
>
> -- Inserting to the same temp table on the central server from the same
> DEV2 server does not work when it is called dynamically.
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT dur_code, tmc_code FROM dev2.sms.dbo.term_cds'
> INSERT #temp EXEC (@.vcCmd)
> I am running this code through SQL Query Analyzer. This code works on
> our central server when we call our other development server remotely
> (and on all of our production servers). The Distributed Transaction
> Coordinator is running on both servers.
> Any ideas on what we have done wrong?|||CLARIFICATION:
There is no error... it just hangs and never returns. It will not even
let you cancel the query, you have to end Query Analyzer through task
manager.
Erland Sommarskog wrote:
> Karen (karen.jones@.tusd1.org) writes:
> What "does not work" mean? If there is an error message, please post it.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Karen,
Please help us out in clarifying a few points.
1. DEV1 = "Central Server"
2. DEV2 = "Development Server"
3. You have a temp table #Temp created on DEV1
4. INSERTS into #Temp succeed when executed on DEV1
5. INSERTS into #Temp FAIL when executed on DEV2
6. DEV2 does NOT have a #Temp table
#Temp tables are accessible only to the connection that created them. It is
logical that #Temp would be accessible and the INSERT would succeed when
executed from DEV1. And also that the INSERT would FAIL when you attempt to
insert into DEV1's #Temp table from code executed on DEV2.
Perhaps you need to investigate using a 'global' ##Temp table. (2 pound
signs) This form of ##Temp table is accessible by all connections and stays
in scope as long as there is any single connection open.
If I have properly understood the issue, let me know. Also you might check
in BOL about #Temp / ##Temp tables and scope.
Regards,
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Karen" <karen.jones@.tusd1.org> wrote in message
news:1151102931.892749.87140@.p79g2000cwp.googlegroups.com...
> CLARIFICATION:
> We are inserting into a table on our central server and making a
> dynamic call to the dev2 server.
>
> Karen wrote:
>|||I am running the query on the central server through Query Analyzer.
Lets call that DEV1. The data is being added to the temp table on DEV1
from a table on DEV2.
A: The temp table exists on DEV1 and I am executing the statement on
DEV1
INSERT #temp EXEC ('SELECT x, y FROM DEV2.sms.dbo.table')
The above code works.
B:Using the same scenerio (A:) I execute the following code
DECLARE @.vcCmd varchar(255)
SET @.vcCmd = 'SELECT x, y, FROM DEV2.sms.dbo.table'
INSERT #temp EXEC(@.vcCmd)
The above code does not work.
The same code as above (example B:) works on our production servers but
does not work on one (1) of our development servers, all other
development servers can run this code just fine.
Recently our LAN staff rebuilt the DEV2 server and this is when the
problem started.
Since example A: works we know it has nothing to do with the linked
server setup
and the DTC is running.
Arnie Rowland wrote:
> Karen,
> Please help us out in clarifying a few points.
> 1. DEV1 = "Central Server"
> 2. DEV2 = "Development Server"
> 3. You have a temp table #Temp created on DEV1
> 4. INSERTS into #Temp succeed when executed on DEV1
> 5. INSERTS into #Temp FAIL when executed on DEV2
> 6. DEV2 does NOT have a #Temp table
> #Temp tables are accessible only to the connection that created them. It i
s
> logical that #Temp would be accessible and the INSERT would succeed when
> executed from DEV1. And also that the INSERT would FAIL when you attempt t
o
> insert into DEV1's #Temp table from code executed on DEV2.
> Perhaps you need to investigate using a 'global' ##Temp table. (2 pound
> signs) This form of ##Temp table is accessible by all connections and stay
s
> in scope as long as there is any single connection open.
> If I have properly understood the issue, let me know. Also you might check
> in BOL about #Temp / ##Temp tables and scope.
> Regards,
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Karen" <karen.jones@.tusd1.org> wrote in message
> news:1151102931.892749.87140@.p79g2000cwp.googlegroups.com...|||Karen wrote:
> I am running the query on the central server through Query Analyzer.
> Lets call that DEV1. The data is being added to the temp table on DEV1
> from a table on DEV2.
> A: The temp table exists on DEV1 and I am executing the statement on
> DEV1
> INSERT #temp EXEC ('SELECT x, y FROM DEV2.sms.dbo.table')
> The above code works.
> B:Using the same scenerio (A:) I execute the following code
> DECLARE @.vcCmd varchar(255)
> SET @.vcCmd = 'SELECT x, y, FROM DEV2.sms.dbo.table'
> INSERT #temp EXEC(@.vcCmd)
> The above code does not work.
> The same code as above (example B:) works on our production servers but
> does not work on one (1) of our development servers, all other
> development servers can run this code just fine.
> Recently our LAN staff rebuilt the DEV2 server and this is when the
> problem started.
> Since example A: works we know it has nothing to do with the linked
> server setup
> and the DTC is running.
>
Have you looked at sysprocesses on each server while this statement is
executing? Look there for any blocking, and also see what waittype is
specified for the spid that is running your statement.
Also look at perfmon on each machine, look at CPU and Average Disk Queue
length to see if either machine is CPU or I/O bound.|||No one is using these servers except myself. No other processes are
running on either server. The table I am accessing has 10 rows. I
believe this is a configuration problem.
Tracy McKibben wrote:
> Karen wrote:
> Have you looked at sysprocesses on each server while this statement is
> executing? Look there for any blocking, and also see what waittype is
> specified for the spid that is running your statement.
> Also look at perfmon on each machine, look at CPU and Average Disk Queue
> length to see if either machine is CPU or I/O bound.|||Karen (karen.jones@.tusd1.org) writes:
> CLARIFICATION:
> There is no error... it just hangs and never returns. It will not even
> let you cancel the query, you have to end Query Analyzer through task
> manager.
Ah, this behaviour. I've have one such situation at work as well. Alas,
I don't have a solution, as I've never cared about getting it fixed.
The only difference to your description is that for me it suffices to
to:
CREATE TABLE #dates (d datetime)
go
INSERT #dates (d)
EXEC ('SELECT * FROM NEMO.sec_93_stb.dbo.dates')
I don't have to put the SQL command in a variable. (And that should not
matter.)
What I have observed is that if I look in sysprocesses on NEMO, the
machice I connect to, there is an entry for a process with host name
JAMIE4K, the machine I connect from. So my conclusion is that the problem
occurs when NEMO tries to connect back to JAMIE4K, but never get a
response. As I've said, I have not dug into this, but our symin people
are very fond of running firewalls about everywhere, and they also lock
down the service accounts for SQL Server.
It is also worth noting that NEMO, the machine I connect to, runs
Windows 2003, whereas JAMIE4K where I connect from runs Windows 2000.
I guess you will have to talk with your LAN people, and ask them to
review what they did with the network.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Karen wrote:
> No one is using these servers except myself. No other processes are
> running on either server. The table I am accessing has 10 rows. I
> believe this is a configuration problem.
>
It very well could be a configuration problem, and looking at
sysprocesses to see what waittype, if any, the process is reporting, you
might well be able to figure out what is misconfigured. Perfmon might
also reveal some important clues. Suggestion is there, use it as you wish.

distribute the part of data to different database on Same server

Hello
I have a very general question on SQL memory management. We have a SQL 2000
(64 bit) on Windows 2003 server. Our production database is growing in no
time. And we do see lot of contention on the Temp db on load. We are planning
to distribute the part of data to different database on the same server. By
doing this will there be any improvement in contention & performance? Is it
advisable.
By doing this we will be adding the overhead on different procedure writing
cross database queries.
Your help will be appreciated
Thanks
Naveen
The one file per CPU is recommended in 2000, and there is also a trace flag
that -might- help (if the situation is correct). See:
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
Agreed, though, this is probably a situation where pretty straightforward
optimization will do the trick.
The OP mentioned that it was during a data load, so I'm curious as to how
the data is being loaded? Are bulk loads being done, and if so, what is the
batch size being used? Larger batch sizes will buffer to tempdb. The
general recommendation I've seen is to shoot for batch sizes of around 10000
rows to avoid problems.

Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Will Alber" <junk@.crazy-pug.co.uk> wrote in message
news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
> Moving data into another database on the same server will not help tempdb
> at all, unless the 'other database' is in a separate instance of SQL
> Server - and then you'll still get IO contention unless you ensure that
> tempdb for the new instance is on a separate set of disks.
> My first approach would have to be identifying what is causing the tempdb
> contention - it might be one or two major queries, or widespread
> throughout the DB. If the former, well, optimise - if the latter, either
> rearchitect or split the load between different instances, or even better,
> different boxes.
> Does tempdb comprise multiple files? You should have one file per CPU, if
> I remember correctly - at least, for MSSQL 2005 this is recommended, and
> it can't hurt 2000...
> "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
>
|||Thanks for your input.
We did all the optimization on the queries. We don’t load huge data on the
application but number of transaction are huge….(close to 200 call per sec )
Now ..reason for moving the data to different database on the same server is
because of the load we expecting on the system in upcoming releases. The
data we are moving to different database is the area where we are expecting
the load and we are bringing in couple of thousand more users. The CPU is
around 65 % and we do see the spike to 80 % during the month end and temp DB
contention goes up as well.
If new database on to different disks will that any way to reduce the Server
load…We don’t want to move to different server because the application is so
tightly integrated we defiantly need to have cross queries.
"Adam Machanic" wrote:

> The one file per CPU is recommended in 2000, and there is also a trace flag
> that -might- help (if the situation is correct). See:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
> Agreed, though, this is probably a situation where pretty straightforward
> optimization will do the trick.
> The OP mentioned that it was during a data load, so I'm curious as to how
> the data is being loaded? Are bulk loads being done, and if so, what is the
> batch size being used? Larger batch sizes will buffer to tempdb. The
> general recommendation I've seen is to shoot for batch sizes of around 10000
> rows to avoid problems.
>
> --
> Adam Machanic
> SQL Server MVP
> Author, "Expert SQL Server 2005 Development"
> http://www.apress.com/book/bookDisplay.html?bID=10220
>
> "Will Alber" <junk@.crazy-pug.co.uk> wrote in message
> news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
>
|||What kind of device do you have tempdb on? How big is it? There are lots
of options for optimizing it... More spindles, a RamSan, or even a RAM disk
(if you can afford losing the memory to tempdb)...
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Naveen" <Naveen@.discussions.microsoft.com> wrote in message
news:BFF130E0-463C-4F3F-9F21-63581066FB12@.microsoft.com...[vbcol=seagreen]
> Thanks for your input.
> We did all the optimization on the queries. We don’t load huge data on
> the
> application but number of transaction are huge….(close to 200 call per
> sec )
> Now ..reason for moving the data to different database on the same server
> is
> because of the load we expecting on the system in upcoming releases. The
> data we are moving to different database is the area where we are
> expecting
> the load and we are bringing in couple of thousand more users. The CPU is
> around 65 % and we do see the spike to 80 % during the month end and temp
> DB
> contention goes up as well.
> If new database on to different disks will that any way to reduce the
> Server
> load…We don’t want to move to different server because the application is
> so
> tightly integrated we defiantly need to have cross queries.
>
> "Adam Machanic" wrote:
|||Huu...I need to verify this information with the Server Administration
team.Will get back to you as Soon as I have the ifnormation
"Adam Machanic" wrote:

> What kind of device do you have tempdb on? How big is it? There are lots
> of options for optimizing it... More spindles, a RamSan, or even a RAM disk
> (if you can afford losing the memory to tempdb)...
>
> --
> Adam Machanic
> SQL Server MVP
> Author, "Expert SQL Server 2005 Development"
> http://www.apress.com/book/bookDisplay.html?bID=10220
>
> "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> news:BFF130E0-463C-4F3F-9F21-63581066FB12@.microsoft.com...
>

Tuesday, March 27, 2012

distribute the part of data to different database on Same server

Hello
I have a very general question on SQL memory management. We have a SQL 2000
(64 bit) on Windows 2003 server. Our production database is growing in no
time. And we do see lot of contention on the Temp db on load. We are planning
to distribute the part of data to different database on the same server. By
doing this will there be any improvement in contention & performance? Is it
advisable.
By doing this we will be adding the overhead on different procedure writing
cross database queries.
Your help will be appreciated
Thanks
NaveenMoving data into another database on the same server will not help tempdb at
all, unless the 'other database' is in a separate instance of SQL Server -
and then you'll still get IO contention unless you ensure that tempdb for
the new instance is on a separate set of disks.
My first approach would have to be identifying what is causing the tempdb
contention - it might be one or two major queries, or widespread throughout
the DB. If the former, well, optimise - if the latter, either rearchitect
or split the load between different instances, or even better, different
boxes.
Does tempdb comprise multiple files? You should have one file per CPU, if I
remember correctly - at least, for MSSQL 2005 this is recommended, and it
can't hurt 2000...
"Naveen" <Naveen@.discussions.microsoft.com> wrote in message
news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
> Hello
> I have a very general question on SQL memory management. We have a SQL
> 2000
> (64 bit) on Windows 2003 server. Our production database is growing in no
> time. And we do see lot of contention on the Temp db on load. We are
> planning
> to distribute the part of data to different database on the same server.
> By
> doing this will there be any improvement in contention & performance? Is
> it
> advisable.
> By doing this we will be adding the overhead on different procedure
> writing
> cross database queries.
> Your help will be appreciated
> Thanks
> Naveen|||The one file per CPU is recommended in 2000, and there is also a trace flag
that -might- help (if the situation is correct). See:
http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
Agreed, though, this is probably a situation where pretty straightforward
optimization will do the trick.
The OP mentioned that it was during a data load, so I'm curious as to how
the data is being loaded? Are bulk loads being done, and if so, what is the
batch size being used? Larger batch sizes will buffer to tempdb. The
general recommendation I've seen is to shoot for batch sizes of around 10000
rows to avoid problems.
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Will Alber" <junk@.crazy-pug.co.uk> wrote in message
news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
> Moving data into another database on the same server will not help tempdb
> at all, unless the 'other database' is in a separate instance of SQL
> Server - and then you'll still get IO contention unless you ensure that
> tempdb for the new instance is on a separate set of disks.
> My first approach would have to be identifying what is causing the tempdb
> contention - it might be one or two major queries, or widespread
> throughout the DB. If the former, well, optimise - if the latter, either
> rearchitect or split the load between different instances, or even better,
> different boxes.
> Does tempdb comprise multiple files? You should have one file per CPU, if
> I remember correctly - at least, for MSSQL 2005 this is recommended, and
> it can't hurt 2000...
> "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
>> Hello
>> I have a very general question on SQL memory management. We have a SQL
>> 2000
>> (64 bit) on Windows 2003 server. Our production database is growing in no
>> time. And we do see lot of contention on the Temp db on load. We are
>> planning
>> to distribute the part of data to different database on the same server.
>> By
>> doing this will there be any improvement in contention & performance? Is
>> it
>> advisable.
>> By doing this we will be adding the overhead on different procedure
>> writing
>> cross database queries.
>> Your help will be appreciated
>> Thanks
>> Naveen
>|||Thanks for your input.
We did all the optimization on the queries. We donâ't load huge data on the
application but number of transaction are hugeâ?¦.(close to 200 call per sec )
Now ..reason for moving the data to different database on the same server is
because of the load we expecting on the system in upcoming releases. The
data we are moving to different database is the area where we are expecting
the load and we are bringing in couple of thousand more users. The CPU is
around 65 % and we do see the spike to 80 % during the month end and temp DB
contention goes up as well.
If new database on to different disks will that any way to reduce the Server
loadâ?¦We donâ't want to move to different server because the application is so
tightly integrated we defiantly need to have cross queries.
"Adam Machanic" wrote:
> The one file per CPU is recommended in 2000, and there is also a trace flag
> that -might- help (if the situation is correct). See:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
> Agreed, though, this is probably a situation where pretty straightforward
> optimization will do the trick.
> The OP mentioned that it was during a data load, so I'm curious as to how
> the data is being loaded? Are bulk loads being done, and if so, what is the
> batch size being used? Larger batch sizes will buffer to tempdb. The
> general recommendation I've seen is to shoot for batch sizes of around 10000
> rows to avoid problems.
>
> --
> Adam Machanic
> SQL Server MVP
> Author, "Expert SQL Server 2005 Development"
> http://www.apress.com/book/bookDisplay.html?bID=10220
>
> "Will Alber" <junk@.crazy-pug.co.uk> wrote in message
> news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
> > Moving data into another database on the same server will not help tempdb
> > at all, unless the 'other database' is in a separate instance of SQL
> > Server - and then you'll still get IO contention unless you ensure that
> > tempdb for the new instance is on a separate set of disks.
> >
> > My first approach would have to be identifying what is causing the tempdb
> > contention - it might be one or two major queries, or widespread
> > throughout the DB. If the former, well, optimise - if the latter, either
> > rearchitect or split the load between different instances, or even better,
> > different boxes.
> >
> > Does tempdb comprise multiple files? You should have one file per CPU, if
> > I remember correctly - at least, for MSSQL 2005 this is recommended, and
> > it can't hurt 2000...
> >
> > "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> > news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
> >> Hello
> >>
> >> I have a very general question on SQL memory management. We have a SQL
> >> 2000
> >> (64 bit) on Windows 2003 server. Our production database is growing in no
> >> time. And we do see lot of contention on the Temp db on load. We are
> >> planning
> >> to distribute the part of data to different database on the same server.
> >> By
> >> doing this will there be any improvement in contention & performance? Is
> >> it
> >> advisable.
> >>
> >> By doing this we will be adding the overhead on different procedure
> >> writing
> >> cross database queries.
> >>
> >> Your help will be appreciated
> >>
> >> Thanks
> >> Naveen
> >
> >
>|||No matter where you move the database to, if you're within the same instance
of SQL Server you will still be hitting the same tempdb, so your contention
will not decrease.
Are you planning on having a separate instance on the box?
"Naveen" <Naveen@.discussions.microsoft.com> wrote in message
news:BFF130E0-463C-4F3F-9F21-63581066FB12@.microsoft.com...
> Thanks for your input.
> We did all the optimization on the queries. We don't load huge data on
> the
> application but number of transaction are huge..(close to 200 call per
> sec )
> Now ..reason for moving the data to different database on the same server
> is
> because of the load we expecting on the system in upcoming releases. The
> data we are moving to different database is the area where we are
> expecting
> the load and we are bringing in couple of thousand more users. The CPU is
> around 65 % and we do see the spike to 80 % during the month end and temp
> DB
> contention goes up as well.
> If new database on to different disks will that any way to reduce the
> Server
> load.We don't want to move to different server because the application is
> so
> tightly integrated we defiantly need to have cross queries.
>
> "Adam Machanic" wrote:
>> The one file per CPU is recommended in 2000, and there is also a trace
>> flag
>> that -might- help (if the situation is correct). See:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
>> Agreed, though, this is probably a situation where pretty straightforward
>> optimization will do the trick.
>> The OP mentioned that it was during a data load, so I'm curious as to how
>> the data is being loaded? Are bulk loads being done, and if so, what is
>> the
>> batch size being used? Larger batch sizes will buffer to tempdb. The
>> general recommendation I've seen is to shoot for batch sizes of around
>> 10000
>> rows to avoid problems.
>>
>> --
>> Adam Machanic
>> SQL Server MVP
>> Author, "Expert SQL Server 2005 Development"
>> http://www.apress.com/book/bookDisplay.html?bID=10220
>>
>> "Will Alber" <junk@.crazy-pug.co.uk> wrote in message
>> news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> > Moving data into another database on the same server will not help
>> > tempdb
>> > at all, unless the 'other database' is in a separate instance of SQL
>> > Server - and then you'll still get IO contention unless you ensure that
>> > tempdb for the new instance is on a separate set of disks.
>> >
>> > My first approach would have to be identifying what is causing the
>> > tempdb
>> > contention - it might be one or two major queries, or widespread
>> > throughout the DB. If the former, well, optimise - if the latter,
>> > either
>> > rearchitect or split the load between different instances, or even
>> > better,
>> > different boxes.
>> >
>> > Does tempdb comprise multiple files? You should have one file per CPU,
>> > if
>> > I remember correctly - at least, for MSSQL 2005 this is recommended,
>> > and
>> > it can't hurt 2000...
>> >
>> > "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
>> > news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
>> >> Hello
>> >>
>> >> I have a very general question on SQL memory management. We have a SQL
>> >> 2000
>> >> (64 bit) on Windows 2003 server. Our production database is growing in
>> >> no
>> >> time. And we do see lot of contention on the Temp db on load. We are
>> >> planning
>> >> to distribute the part of data to different database on the same
>> >> server.
>> >> By
>> >> doing this will there be any improvement in contention & performance?
>> >> Is
>> >> it
>> >> advisable.
>> >>
>> >> By doing this we will be adding the overhead on different procedure
>> >> writing
>> >> cross database queries.
>> >>
>> >> Your help will be appreciated
>> >>
>> >> Thanks
>> >> Naveen
>> >
>> >|||What kind of device do you have tempdb on? How big is it? There are lots
of options for optimizing it... More spindles, a RamSan, or even a RAM disk
(if you can afford losing the memory to tempdb)...
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Naveen" <Naveen@.discussions.microsoft.com> wrote in message
news:BFF130E0-463C-4F3F-9F21-63581066FB12@.microsoft.com...
> Thanks for your input.
> We did all the optimization on the queries. We donâ't load huge data on
> the
> application but number of transaction are hugeâ?¦.(close to 200 call per
> sec )
> Now ..reason for moving the data to different database on the same server
> is
> because of the load we expecting on the system in upcoming releases. The
> data we are moving to different database is the area where we are
> expecting
> the load and we are bringing in couple of thousand more users. The CPU is
> around 65 % and we do see the spike to 80 % during the month end and temp
> DB
> contention goes up as well.
> If new database on to different disks will that any way to reduce the
> Server
> loadâ?¦We donâ't want to move to different server because the application is
> so
> tightly integrated we defiantly need to have cross queries.
>
> "Adam Machanic" wrote:
>> The one file per CPU is recommended in 2000, and there is also a trace
>> flag
>> that -might- help (if the situation is correct). See:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
>> Agreed, though, this is probably a situation where pretty straightforward
>> optimization will do the trick.
>> The OP mentioned that it was during a data load, so I'm curious as to how
>> the data is being loaded? Are bulk loads being done, and if so, what is
>> the
>> batch size being used? Larger batch sizes will buffer to tempdb. The
>> general recommendation I've seen is to shoot for batch sizes of around
>> 10000
>> rows to avoid problems.
>>
>> --
>> Adam Machanic
>> SQL Server MVP
>> Author, "Expert SQL Server 2005 Development"
>> http://www.apress.com/book/bookDisplay.html?bID=10220
>>
>> "Will Alber" <junk@.crazy-pug.co.uk> wrote in message
>> news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
>> > Moving data into another database on the same server will not help
>> > tempdb
>> > at all, unless the 'other database' is in a separate instance of SQL
>> > Server - and then you'll still get IO contention unless you ensure that
>> > tempdb for the new instance is on a separate set of disks.
>> >
>> > My first approach would have to be identifying what is causing the
>> > tempdb
>> > contention - it might be one or two major queries, or widespread
>> > throughout the DB. If the former, well, optimise - if the latter,
>> > either
>> > rearchitect or split the load between different instances, or even
>> > better,
>> > different boxes.
>> >
>> > Does tempdb comprise multiple files? You should have one file per CPU,
>> > if
>> > I remember correctly - at least, for MSSQL 2005 this is recommended,
>> > and
>> > it can't hurt 2000...
>> >
>> > "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
>> > news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
>> >> Hello
>> >>
>> >> I have a very general question on SQL memory management. We have a SQL
>> >> 2000
>> >> (64 bit) on Windows 2003 server. Our production database is growing in
>> >> no
>> >> time. And we do see lot of contention on the Temp db on load. We are
>> >> planning
>> >> to distribute the part of data to different database on the same
>> >> server.
>> >> By
>> >> doing this will there be any improvement in contention & performance?
>> >> Is
>> >> it
>> >> advisable.
>> >>
>> >> By doing this we will be adding the overhead on different procedure
>> >> writing
>> >> cross database queries.
>> >>
>> >> Your help will be appreciated
>> >>
>> >> Thanks
>> >> Naveen
>> >
>> >|||Huu...I need to verify this information with the Server Administration
team.Will get back to you as Soon as I have the ifnormation
"Adam Machanic" wrote:
> What kind of device do you have tempdb on? How big is it? There are lots
> of options for optimizing it... More spindles, a RamSan, or even a RAM disk
> (if you can afford losing the memory to tempdb)...
>
> --
> Adam Machanic
> SQL Server MVP
> Author, "Expert SQL Server 2005 Development"
> http://www.apress.com/book/bookDisplay.html?bID=10220
>
> "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> news:BFF130E0-463C-4F3F-9F21-63581066FB12@.microsoft.com...
> > Thanks for your input.
> >
> > We did all the optimization on the queries. We donâ't load huge data on
> > the
> > application but number of transaction are hugeâ?¦.(close to 200 call per
> > sec )
> > Now ..reason for moving the data to different database on the same server
> > is
> > because of the load we expecting on the system in upcoming releases. The
> > data we are moving to different database is the area where we are
> > expecting
> > the load and we are bringing in couple of thousand more users. The CPU is
> > around 65 % and we do see the spike to 80 % during the month end and temp
> > DB
> > contention goes up as well.
> >
> > If new database on to different disks will that any way to reduce the
> > Server
> > loadâ?¦We donâ't want to move to different server because the application is
> > so
> > tightly integrated we defiantly need to have cross queries.
> >
> >
> >
> > "Adam Machanic" wrote:
> >
> >> The one file per CPU is recommended in 2000, and there is also a trace
> >> flag
> >> that -might- help (if the situation is correct). See:
> >>
> >> http://support.microsoft.com/default.aspx?scid=kb;en-us;328551
> >>
> >> Agreed, though, this is probably a situation where pretty straightforward
> >> optimization will do the trick.
> >>
> >> The OP mentioned that it was during a data load, so I'm curious as to how
> >> the data is being loaded? Are bulk loads being done, and if so, what is
> >> the
> >> batch size being used? Larger batch sizes will buffer to tempdb. The
> >> general recommendation I've seen is to shoot for batch sizes of around
> >> 10000
> >> rows to avoid problems.
> >>
> >>
> >> --
> >>
> >> Adam Machanic
> >> SQL Server MVP
> >>
> >> Author, "Expert SQL Server 2005 Development"
> >> http://www.apress.com/book/bookDisplay.html?bID=10220
> >>
> >>
> >>
> >> "Will Alber" <junk@.crazy-pug.co.uk> wrote in message
> >> news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
> >> > Moving data into another database on the same server will not help
> >> > tempdb
> >> > at all, unless the 'other database' is in a separate instance of SQL
> >> > Server - and then you'll still get IO contention unless you ensure that
> >> > tempdb for the new instance is on a separate set of disks.
> >> >
> >> > My first approach would have to be identifying what is causing the
> >> > tempdb
> >> > contention - it might be one or two major queries, or widespread
> >> > throughout the DB. If the former, well, optimise - if the latter,
> >> > either
> >> > rearchitect or split the load between different instances, or even
> >> > better,
> >> > different boxes.
> >> >
> >> > Does tempdb comprise multiple files? You should have one file per CPU,
> >> > if
> >> > I remember correctly - at least, for MSSQL 2005 this is recommended,
> >> > and
> >> > it can't hurt 2000...
> >> >
> >> > "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> >> > news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
> >> >> Hello
> >> >>
> >> >> I have a very general question on SQL memory management. We have a SQL
> >> >> 2000
> >> >> (64 bit) on Windows 2003 server. Our production database is growing in
> >> >> no
> >> >> time. And we do see lot of contention on the Temp db on load. We are
> >> >> planning
> >> >> to distribute the part of data to different database on the same
> >> >> server.
> >> >> By
> >> >> doing this will there be any improvement in contention & performance?
> >> >> Is
> >> >> it
> >> >> advisable.
> >> >>
> >> >> By doing this we will be adding the overhead on different procedure
> >> >> writing
> >> >> cross database queries.
> >> >>
> >> >> Your help will be appreciated
> >> >>
> >> >> Thanks
> >> >> Naveen
> >> >
> >> >
> >>
>sql

distribute the part of data to different database on Same server

Hello
I have a very general question on SQL memory management. We have a SQL 2000
(64 bit) on Windows 2003 server. Our production database is growing in no
time. And we do see lot of contention on the Temp db on load. We are plannin
g
to distribute the part of data to different database on the same server. By
doing this will there be any improvement in contention & performance? Is it
advisable.
By doing this we will be adding the overhead on different procedure writing
cross database queries.
Your help will be appreciated
Thanks
NaveenMoving data into another database on the same server will not help tempdb at
all, unless the 'other database' is in a separate instance of SQL Server -
and then you'll still get IO contention unless you ensure that tempdb for
the new instance is on a separate set of disks.
My first approach would have to be identifying what is causing the tempdb
contention - it might be one or two major queries, or widespread throughout
the DB. If the former, well, optimise - if the latter, either rearchitect
or split the load between different instances, or even better, different
boxes.
Does tempdb comprise multiple files? You should have one file per CPU, if I
remember correctly - at least, for MSSQL 2005 this is recommended, and it
can't hurt 2000...
"Naveen" <Naveen@.discussions.microsoft.com> wrote in message
news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
> Hello
> I have a very general question on SQL memory management. We have a SQL
> 2000
> (64 bit) on Windows 2003 server. Our production database is growing in no
> time. And we do see lot of contention on the Temp db on load. We are
> planning
> to distribute the part of data to different database on the same server.
> By
> doing this will there be any improvement in contention & performance? Is
> it
> advisable.
> By doing this we will be adding the overhead on different procedure
> writing
> cross database queries.
> Your help will be appreciated
> Thanks
> Naveen|||The one file per CPU is recommended in 2000, and there is also a trace flag
that -might- help (if the situation is correct). See:
http://support.microsoft.com/defaul...kb;en-us;328551
Agreed, though, this is probably a situation where pretty straightforward
optimization will do the trick.
The OP mentioned that it was during a data load, so I'm curious as to how
the data is being loaded? Are bulk loads being done, and if so, what is the
batch size being used? Larger batch sizes will buffer to tempdb. The
general recommendation I've seen is to shoot for batch sizes of around 10000
rows to avoid problems.
Adam Machanic
SQL Server MVP
Author, "Expert SQL Server 2005 Development"
http://www.apress.com/book/bookDisplay.html?bID=10220
"Will Alber" <junk@.crazy-pug.co.uk> wrote in message
news:%23BSljDBuHHA.3480@.TK2MSFTNGP04.phx.gbl...
> Moving data into another database on the same server will not help tempdb
> at all, unless the 'other database' is in a separate instance of SQL
> Server - and then you'll still get IO contention unless you ensure that
> tempdb for the new instance is on a separate set of disks.
> My first approach would have to be identifying what is causing the tempdb
> contention - it might be one or two major queries, or widespread
> throughout the DB. If the former, well, optimise - if the latter, either
> rearchitect or split the load between different instances, or even better,
> different boxes.
> Does tempdb comprise multiple files? You should have one file per CPU, if
> I remember correctly - at least, for MSSQL 2005 this is recommended, and
> it can't hurt 2000...
> "Naveen" <Naveen@.discussions.microsoft.com> wrote in message
> news:DB650185-CA27-4AFA-8513-B7E91529D4C9@.microsoft.com...
>

Saturday, February 25, 2012

Display truncating on SQL Profiler

Greetings,

I am having a problem debugging an XML error we are getting in our production environment because I can't view the entire call to the stored procedure in Profiler. I have successfully traced the error, but when I go to the line with the call to the SP that caused the error, it doesn't show me the entire call. It only shows me the 'exec sproc_name and then the first 16 characters of the XML string parameter that is being passed to the proc. For some reason it's doing this to ONLY the stored procs that have XML parameters...on procs that use standard parameters, it displays the entire call correctly.

I have looked for some type of setting that controls this, but haven't been able to find it. I also have looked through many forums for this issue but to no avail. Does anyone know why this is happening? And, is there a workaround/fix?

Thanks in advance...

SBIs it because it's a text column? Do you see anny other calls using text, ntext or image?