Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Friday, March 30, 2012

Information Wont Post To My Database

I'm having a weird problem with an easy process. I have a section that allows people to enter their name and email address if they wish to be contacted. I have it set up so that when they enter that information into the text boxes, the info is then sent to my SQL database. The code looks right to me, but it never comes up. Here is the code I have for the button_click.

Dim

NTAdatasourceAsNew SqlDataSource()

NTAdatasource.ConnectionString = ConfigurationManager.ConnectionStrings(

"DatabaseConnectionString1").ToString()

NTAdatasource.InsertCommandType = SqlDataSourceCommandType.Text

NTAdatasource.InsertCommand =

"INSERT into ContactUs (YourName, EmailAddress, DateTimeStamp) VALUES (@.YourName, @.EmailAddress, @.DateTimeStamp)"

NTAdatasource.InsertParameters.Add(

"YourName", txtYourName.Text)

NTAdatasource.InsertParameters.Add(

"EmailAddress", txtEmailAddress.Text)

NTAdatasource.InsertParameters.Add(

"DateTimeStamp", DateTime.Now)Dim RowsAddedAsInteger = 0Try

RowsAdded = NTAdatabase.Insert()

Catch exAs Exception

Server.Transfer(

"problem.aspx")EndTry

If RowsAdded <> 1Then

Server.Transfer(

"problem.aspx")Else

Server.Transfer(

"success.aspx")EndIf

EndSub

The strange thing is that when I debug, the "rowsadded" value comes up to 1. The process runs through debugging just fine and redirects me to my "success.aspx" page. What am I doing wrong?

Thanks

Never mind...figured it out.

Wednesday, March 28, 2012

Information on MSAS parameters

hello all

I need more information about 2 parameters of MSAS :

OLAP/Process/DatabaseConnectionPoolMax

How works MSAS when the maximum number of connection in the pool is full ?

What is the impact if i increase the parameters 'OLAP/Process/DatabaseConnectionPoolMax' ? for CPU/RAM ?

Can i have more Connection pool on MSAS ?

DataMining/MaxConcurrentPredictionQueries

What is the impact on MSAS or Databases if I change the default value ?

I want to know all about this Smile

regards

hello

noone have any information of this ?

regards

|||

Hi,

You looked here? http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=429241&SiteID=1

and here?

http://216.239.59.104/search?q=cache:rRIieCncEPIJBig Smileownload.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/SSASProperties.doc+DatabaseConnectionPoolMax&hl=en&ct=clnk&cd=4&gl=uk

Or googled it?

Hope that helps


Matt

sql

Information on MSAS parameters

hello all

I need more information about 2 parameters of MSAS :

OLAP/Process/DatabaseConnectionPoolMax

How works MSAS when the maximum number of connection in the pool is full ?

What is the impact if i increase the parameters 'OLAP/Process/DatabaseConnectionPoolMax' ? for CPU/RAM ?

Can i have more Connection pool on MSAS ?

DataMining/MaxConcurrentPredictionQueries

What is the impact on MSAS or Databases if I change the default value ?

I want to know all about this Smile

regards

hello

noone have any information of this ?

regards

|||

Hi,

You looked here? http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=429241&SiteID=1

and here?

http://216.239.59.104/search?q=cache:rRIieCncEPIJBig Smileownload.microsoft.com/download/4/7/a/47a548b9-249e-484c-abd7-29f31282b04d/SSASProperties.doc+DatabaseConnectionPoolMax&hl=en&ct=clnk&cd=4&gl=uk

Or googled it?

Hope that helps


Matt

Monday, March 26, 2012

INFO Requested Distributed DB Design

I am in a Process of designing database deployment layout for a system.
There are 4 major subsystem in the application each uses its own database.
Database :
1) Primary DB
2) Processing A DB
3) Reporting DB
4) Processing B DB
The Purpose of Primary is to hold all the Input data in unmodified state.
Processing A DB is a Exact copy of Primary DB.
In Processing A DB the the computation & Validation happens .The Results (
More than one Table )of Processing A is updated in Primary DB.
This Updates needs to be transfered to Reporting DB , Processing B DB.
In Processing B DB some status column is updated and this Updates needs
to be propogated back to the Primary
I am Looking at transactional Replication as a Option for this . Let me
know your views on this
You are trying to do work flow. Replication is not an easy fit with this.
Basically with a replication solution you need a server which will act as
the clearing house figuring out what goes where. With sql2000 you do not
have this - with SQL 2005 you sort of do with the peer to peer replication
model with transactional replication.
It seems that your data flow is this
Primary -> Processing A -> Reporting
-> Processing B -> Primary
Primary <- (with filtering) Processing A
By what criteria does data flow from Processing A back to Primary and how
are you going to prevent data from Processing B flowing back to Processing
A?
If you can filter this data, you could use transactional replication from
one node to another. If you can't I don't think transactional replication
will be a good fit.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Raaj" <Raaj@.discussions.microsoft.com> wrote in message
news:DF063537-EE93-4742-AFBB-8BBAF557CEE4@.microsoft.com...
> I am in a Process of designing database deployment layout for a system.
> There are 4 major subsystem in the application each uses its own
database.
> Database :
> 1) Primary DB
> 2) Processing A DB
> 3) Reporting DB
> 4) Processing B DB
>
> The Purpose of Primary is to hold all the Input data in unmodified
state.
> Processing A DB is a Exact copy of Primary DB.
> In Processing A DB the the computation & Validation happens .The Results (
> More than one Table )of Processing A is updated in Primary DB.
> This Updates needs to be transfered to Reporting DB , Processing B DB.
> In Processing B DB some status column is updated and this Updates needs
> to be propogated back to the Primary
> I am Looking at transactional Replication as a Option for this . Let me
> know your views on this
>
|||Thanks for your response.
Well I have a Status Column on the Primary field based on which i Push the
(Set of tables) data to the Processing A DB .
Process A DB does some computation and Updates Data & the staus field on th
Tables .
My Question is whats the Best way of Pushing this data back(from Processing
A) to the Primary server .
There are around 30 table which gets updated .
I am currently looking at DTS/ Transactional Replication to move the
tables back to the Primay DB. I feel there would be Cyclic Updates ?
any advice on this
Best Reagrds
"Hilary Cotter" wrote:

> You are trying to do work flow. Replication is not an easy fit with this.
> Basically with a replication solution you need a server which will act as
> the clearing house figuring out what goes where. With sql2000 you do not
> have this - with SQL 2005 you sort of do with the peer to peer replication
> model with transactional replication.
> It seems that your data flow is this
> Primary -> Processing A -> Reporting
> -> Processing B -> Primary
> Primary <- (with filtering) Processing A
> By what criteria does data flow from Processing A back to Primary and how
> are you going to prevent data from Processing B flowing back to Processing
> A?
> If you can filter this data, you could use transactional replication from
> one node to another. If you can't I don't think transactional replication
> will be a good fit.
>
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Raaj" <Raaj@.discussions.microsoft.com> wrote in message
> news:DF063537-EE93-4742-AFBB-8BBAF557CEE4@.microsoft.com...
> database.
> state.
>
>
|||I think you want to replicate these tables back, but ensure that the
replication stored procedures have logic built in them to only execute is
the status column is an update.
For instance going from primary to processing a the status column might have
a value of 0, when processed on A it is updated to 1.
In your update replication procs have a wrapper which looks like this going
back to Primary.
if StatusColumn=1 then
do work
else
return 0
In your update replication procs have a wrapper which looks like this going
to PRocessing A.
if StatusColumn=0 then
do work
else
return 0
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Raaj" <Raaj@.discussions.microsoft.com> wrote in message
news:2242A1DF-2047-4C2B-A8F6-A63835767DF5@.microsoft.com...
> Thanks for your response.
> Well I have a Status Column on the Primary field based on which i Push the
> (Set of tables) data to the Processing A DB .
> Process A DB does some computation and Updates Data & the staus field on
th
> Tables .
> My Question is whats the Best way of Pushing this data back(from
Processing[vbcol=seagreen]
> A) to the Primary server .
> There are around 30 table which gets updated .
> I am currently looking at DTS/ Transactional Replication to move the
> tables back to the Primay DB. I feel there would be Cyclic Updates ?
> any advice on this
> Best Reagrds
>
> "Hilary Cotter" wrote:
this.[vbcol=seagreen]
as[vbcol=seagreen]
replication[vbcol=seagreen]
how[vbcol=seagreen]
Processing[vbcol=seagreen]
from[vbcol=seagreen]
replication[vbcol=seagreen]
system.[vbcol=seagreen]
Results ([vbcol=seagreen]
DB.[vbcol=seagreen]
needs[vbcol=seagreen]
me[vbcol=seagreen]
|||Thanks Hilary
Well I have not yet decided on the mechanism to updating the data back to
primary
Server .
I am considering to create a Publication on the Processing A server and
let Primary server subscribe this datas ( seems to me a cyclic and bit over
head) .
Note : there will be more that 30 table updates which needs to be send
back-forth
do you have any suggesstion
"Hilary Cotter" wrote:

> I think you want to replicate these tables back, but ensure that the
> replication stored procedures have logic built in them to only execute is
> the status column is an update.
> For instance going from primary to processing a the status column might have
> a value of 0, when processed on A it is updated to 1.
> In your update replication procs have a wrapper which looks like this going
> back to Primary.
> if StatusColumn=1 then
> do work
> else
> return 0
> In your update replication procs have a wrapper which looks like this going
> to PRocessing A.
> if StatusColumn=0 then
> do work
> else
> return 0
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Raaj" <Raaj@.discussions.microsoft.com> wrote in message
> news:2242A1DF-2047-4C2B-A8F6-A63835767DF5@.microsoft.com...
> th
> Processing
> this.
> as
> replication
> how
> Processing
> from
> replication
> system.
> Results (
> DB.
> needs
> me
>
>
|||it will be cyclic unless you can figure out some criteria to use as a basis
for not applying the transaction. Use this criteria as a basis as to whether
the proc applies the data on the subscriber/publisher or not.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Raaj" <Raaj@.discussions.microsoft.com> wrote in message
news:127378BB-BBAB-4F77-9A10-817170920414@.microsoft.com...
> Thanks Hilary
> Well I have not yet decided on the mechanism to updating the data back to
> primary
> Server .
> I am considering to create a Publication on the Processing A server and
> let Primary server subscribe this datas ( seems to me a cyclic and bit
over[vbcol=seagreen]
> head) .
> Note : there will be more that 30 table updates which needs to be send
> back-forth
> do you have any suggesstion
>
> "Hilary Cotter" wrote:
is[vbcol=seagreen]
have[vbcol=seagreen]
going[vbcol=seagreen]
going[vbcol=seagreen]
the[vbcol=seagreen]
on[vbcol=seagreen]
?[vbcol=seagreen]
act[vbcol=seagreen]
not[vbcol=seagreen]
and[vbcol=seagreen]
unmodified[vbcol=seagreen]
B[vbcol=seagreen]
Updates[vbcol=seagreen]
Let[vbcol=seagreen]
|||Thanks for the info .
Can you please suggest me a mechanism for updatating the data back to the
primary server from the Processing A DB .
I am planning to use replication from Processing A back to the primary
server ... any suggestion here
Raj
"Hilary Cotter" wrote:

> it will be cyclic unless you can figure out some criteria to use as a basis
> for not applying the transaction. Use this criteria as a basis as to whether
> the proc applies the data on the subscriber/publisher or not.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Raaj" <Raaj@.discussions.microsoft.com> wrote in message
> news:127378BB-BBAB-4F77-9A10-817170920414@.microsoft.com...
> over
> is
> have
> going
> going
> the
> on
> ?
> act
> not
> and
> unmodified
> B
> Updates
> Let
>
>
|||replication with custom stored procedures.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Raaj" <Raaj@.discussions.microsoft.com> wrote in message
news:501BF2AB-FF83-4EE4-9927-F80606684F85@.microsoft.com...[vbcol=seagreen]
> Thanks for the info .
> Can you please suggest me a mechanism for updatating the data back to the
> primary server from the Processing A DB .
> I am planning to use replication from Processing A back to the primary
> server ... any suggestion here
> Raj
> "Hilary Cotter" wrote:
basis[vbcol=seagreen]
whether[vbcol=seagreen]
back to[vbcol=seagreen]
and[vbcol=seagreen]
bit[vbcol=seagreen]
execute[vbcol=seagreen]
might[vbcol=seagreen]
this[vbcol=seagreen]
this[vbcol=seagreen]
Push[vbcol=seagreen]
field[vbcol=seagreen]
the[vbcol=seagreen]
Updates[vbcol=seagreen]
with[vbcol=seagreen]
will[vbcol=seagreen]
you do[vbcol=seagreen]
Primary[vbcol=seagreen]
Primary[vbcol=seagreen]
replication[vbcol=seagreen]
for a[vbcol=seagreen]
own[vbcol=seagreen]
..The[vbcol=seagreen]
DB.[vbcol=seagreen]
Processing[vbcol=seagreen]
this .[vbcol=seagreen]

Friday, March 23, 2012

Individual Process CPU utilization

MS SQL Server 2000 Enterprise with SP3a
Is there a way to known which process is causing 100% cpu.
Is cpu column in sysprocesses gives that.
How can we see the plan of current running process. Sybase has sp_showplan.
Is there any equivalent stored proc in sql server.
Thanks.
Satwinder..Hi
The CPU column is the cumulative CPU usage, therefore you should be looking
at the rate of change for this value. You may want to look at SET STATISTICS
TIME. Also check out SQL Profiler which will show what statements (including
a duration and I/O details) are being run on the server.
John
"Satwinder" wrote:
> MS SQL Server 2000 Enterprise with SP3a
> Is there a way to known which process is causing 100% cpu.
> Is cpu column in sysprocesses gives that.
> How can we see the plan of current running process. Sybase has sp_showplan.
> Is there any equivalent stored proc in sql server.
> Thanks.
> Satwinder..|||yesterday my server had cpu of 100% for an hour. During that time i did not
want to run profiler and put more load on server.
By looking at processes can we tell which process is utilising max. cpu.
cheers
Satwinder
"John Bell" wrote:
> Hi
> The CPU column is the cumulative CPU usage, therefore you should be looking
> at the rate of change for this value. You may want to look at SET STATISTICS
> TIME. Also check out SQL Profiler which will show what statements (including
> a duration and I/O details) are being run on the server.
> John
> "Satwinder" wrote:
> > MS SQL Server 2000 Enterprise with SP3a
> > Is there a way to known which process is causing 100% cpu.
> >
> > Is cpu column in sysprocesses gives that.
> >
> > How can we see the plan of current running process. Sybase has sp_showplan.
> > Is there any equivalent stored proc in sql server.
> >
> > Thanks.
> > Satwinder..|||Hi,
run the following querry
select spid,hostname,program_name, cpu from master..sysprocesses order by
cpu desc
Amo Lembhe
"Satwinder" wrote:
> yesterday my server had cpu of 100% for an hour. During that time i did not
> want to run profiler and put more load on server.
> By looking at processes can we tell which process is utilising max. cpu.
> cheers
> Satwinder
> "John Bell" wrote:
> > Hi
> >
> > The CPU column is the cumulative CPU usage, therefore you should be looking
> > at the rate of change for this value. You may want to look at SET STATISTICS
> > TIME. Also check out SQL Profiler which will show what statements (including
> > a duration and I/O details) are being run on the server.
> >
> > John
> >
> > "Satwinder" wrote:
> >
> > > MS SQL Server 2000 Enterprise with SP3a
> > > Is there a way to known which process is causing 100% cpu.
> > >
> > > Is cpu column in sysprocesses gives that.
> > >
> > > How can we see the plan of current running process. Sybase has sp_showplan.
> > > Is there any equivalent stored proc in sql server.
> > >
> > > Thanks.
> > > Satwinder..|||CPU in sysprocesses does not indicate currently process comsuning high cpu.
cheers
"Amol Lembhe" wrote:
> Hi,
> run the following querry
> select spid,hostname,program_name, cpu from master..sysprocesses order by
> cpu desc
> Amo Lembhe
> "Satwinder" wrote:
> > yesterday my server had cpu of 100% for an hour. During that time i did not
> > want to run profiler and put more load on server.
> > By looking at processes can we tell which process is utilising max. cpu.
> >
> > cheers
> >
> > Satwinder
> >
> > "John Bell" wrote:
> >
> > > Hi
> > >
> > > The CPU column is the cumulative CPU usage, therefore you should be looking
> > > at the rate of change for this value. You may want to look at SET STATISTICS
> > > TIME. Also check out SQL Profiler which will show what statements (including
> > > a duration and I/O details) are being run on the server.
> > >
> > > John
> > >
> > > "Satwinder" wrote:
> > >
> > > > MS SQL Server 2000 Enterprise with SP3a
> > > > Is there a way to known which process is causing 100% cpu.
> > > >
> > > > Is cpu column in sysprocesses gives that.
> > > >
> > > > How can we see the plan of current running process. Sybase has sp_showplan.
> > > > Is there any equivalent stored proc in sql server.
> > > >
> > > > Thanks.
> > > > Satwinder..|||Anyone in the world who can help me on this. We have 500 process and finding
which one is causing cpu to go 100.
Is this at all possible in SQL server.
Help...
"Satwinder" wrote:
> CPU in sysprocesses does not indicate currently process comsuning high cpu.
> cheers
> "Amol Lembhe" wrote:
> > Hi,
> > run the following querry
> > select spid,hostname,program_name, cpu from master..sysprocesses order by
> > cpu desc
> >
> > Amo Lembhe
> >
> > "Satwinder" wrote:
> >
> > > yesterday my server had cpu of 100% for an hour. During that time i did not
> > > want to run profiler and put more load on server.
> > > By looking at processes can we tell which process is utilising max. cpu.
> > >
> > > cheers
> > >
> > > Satwinder
> > >
> > > "John Bell" wrote:
> > >
> > > > Hi
> > > >
> > > > The CPU column is the cumulative CPU usage, therefore you should be looking
> > > > at the rate of change for this value. You may want to look at SET STATISTICS
> > > > TIME. Also check out SQL Profiler which will show what statements (including
> > > > a duration and I/O details) are being run on the server.
> > > >
> > > > John
> > > >
> > > > "Satwinder" wrote:
> > > >
> > > > > MS SQL Server 2000 Enterprise with SP3a
> > > > > Is there a way to known which process is causing 100% cpu.
> > > > >
> > > > > Is cpu column in sysprocesses gives that.
> > > > >
> > > > > How can we see the plan of current running process. Sybase has sp_showplan.
> > > > > Is there any equivalent stored proc in sql server.
> > > > >
> > > > > Thanks.
> > > > > Satwinder..|||Hi
If you are running at 100% for that length of time it sounds like you are
already in trouble, therefore the faster you fix it the better regardless of
short term inconvenience. A server side trace will use less resources than
using the GUI and using a disc not used by SQL Server for the output will
reduce any resource conflicts further. It would not require a great deal of
profiling to identify what is wrong especially if you already have a baseline
for the performance, and you will know exactly what piece of code the problem
is occuring. You could even automate the collection of a trace using a
perfmon alert.
John
"Satwinder" wrote:
> yesterday my server had cpu of 100% for an hour. During that time i did not
> want to run profiler and put more load on server.
> By looking at processes can we tell which process is utilising max. cpu.
> cheers
> Satwinder
> "John Bell" wrote:
> > Hi
> >
> > The CPU column is the cumulative CPU usage, therefore you should be looking
> > at the rate of change for this value. You may want to look at SET STATISTICS
> > TIME. Also check out SQL Profiler which will show what statements (including
> > a duration and I/O details) are being run on the server.
> >
> > John
> >
> > "Satwinder" wrote:
> >
> > > MS SQL Server 2000 Enterprise with SP3a
> > > Is there a way to known which process is causing 100% cpu.
> > >
> > > Is cpu column in sysprocesses gives that.
> > >
> > > How can we see the plan of current running process. Sybase has sp_showplan.
> > > Is there any equivalent stored proc in sql server.
> > >
> > > Thanks.
> > > Satwinder..|||On Tue, 1 Aug 2006 04:56:01 -0700, Satwinder
<Satwinder@.discussions.microsoft.com> wrote:
>MS SQL Server 2000 Enterprise with SP3a
>Is there a way to known which process is causing 100% cpu.
>Is cpu column in sysprocesses gives that.
>How can we see the plan of current running process. Sybase has sp_showplan.
>Is there any equivalent stored proc in sql server.
exec sp_who2
>Thanks.
>Satwinder..|||Hi,
get cpu consume for each program
select program_name, sum(cpu) from master..sysprocesses
group by program_name
u can querry system tables to get required info.
"Satwinder" wrote:
> CPU in sysprocesses does not indicate currently process comsuning high cpu.
> cheers
> "Amol Lembhe" wrote:
> > Hi,
> > run the following querry
> > select spid,hostname,program_name, cpu from master..sysprocesses order by
> > cpu desc
> >
> > Amo Lembhe
> >
> > "Satwinder" wrote:
> >
> > > yesterday my server had cpu of 100% for an hour. During that time i did not
> > > want to run profiler and put more load on server.
> > > By looking at processes can we tell which process is utilising max. cpu.
> > >
> > > cheers
> > >
> > > Satwinder
> > >
> > > "John Bell" wrote:
> > >
> > > > Hi
> > > >
> > > > The CPU column is the cumulative CPU usage, therefore you should be looking
> > > > at the rate of change for this value. You may want to look at SET STATISTICS
> > > > TIME. Also check out SQL Profiler which will show what statements (including
> > > > a duration and I/O details) are being run on the server.
> > > >
> > > > John
> > > >
> > > > "Satwinder" wrote:
> > > >
> > > > > MS SQL Server 2000 Enterprise with SP3a
> > > > > Is there a way to known which process is causing 100% cpu.
> > > > >
> > > > > Is cpu column in sysprocesses gives that.
> > > > >
> > > > > How can we see the plan of current running process. Sybase has sp_showplan.
> > > > > Is there any equivalent stored proc in sql server.
> > > > >
> > > > > Thanks.
> > > > > Satwinder..|||My question is whenever cpu is 100%, then i start the sql profiler, will it
capture the query causing high cpu. Profiler does not capture already running
queries.
cheers, satwinder
"Satwinder" wrote:
> MS SQL Server 2000 Enterprise with SP3a
> Is there a way to known which process is causing 100% cpu.
> Is cpu column in sysprocesses gives that.
> How can we see the plan of current running process. Sybase has sp_showplan.
> Is there any equivalent stored proc in sql server.
> Thanks.
> Satwinder..|||On Wed, 2 Aug 2006 02:26:01 -0700, Satwinder
<Satwinder@.discussions.microsoft.com> wrote:
>My question is whenever cpu is 100%, then i start the sql profiler, will it
>capture the query causing high cpu. Profiler does not capture already running
>queries.
Yes, it will capture that when complete, even if it was started before
the profiler. I'm pretty certain of that, because I've done traces
catching both begins and ends, and had orphans!
J.sql

Individual Process CPU utilization

MS SQL Server 2000 Enterprise with SP3a
Is there a way to known which process is causing 100% cpu.
Is cpu column in sysprocesses gives that.
How can we see the plan of current running process. Sybase has sp_showplan.
Is there any equivalent stored proc in sql server.
Thanks.
Satwinder..Hi
The CPU column is the cumulative CPU usage, therefore you should be looking
at the rate of change for this value. You may want to look at SET STATISTICS
TIME. Also check out SQL Profiler which will show what statements (including
a duration and I/O details) are being run on the server.
John
"Satwinder" wrote:

> MS SQL Server 2000 Enterprise with SP3a
> Is there a way to known which process is causing 100% cpu.
> Is cpu column in sysprocesses gives that.
> How can we see the plan of current running process. Sybase has sp_showplan
.
> Is there any equivalent stored proc in sql server.
> Thanks.
> Satwinder..|||yesterday my server had cpu of 100% for an hour. During that time i did not
want to run profiler and put more load on server.
By looking at processes can we tell which process is utilising max. cpu.
cheers
Satwinder
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> The CPU column is the cumulative CPU usage, therefore you should be lookin
g
> at the rate of change for this value. You may want to look at SET STATISTI
CS
> TIME. Also check out SQL Profiler which will show what statements (includi
ng
> a duration and I/O details) are being run on the server.
> John
> "Satwinder" wrote:
>|||Hi,
run the following querry
select spid,hostname,program_name, cpu from master..sysprocesses order by
cpu desc
Amo Lembhe
"Satwinder" wrote:
[vbcol=seagreen]
> yesterday my server had cpu of 100% for an hour. During that time i did no
t
> want to run profiler and put more load on server.
> By looking at processes can we tell which process is utilising max. cpu.
> cheers
> Satwinder
> "John Bell" wrote:
>|||CPU in sysprocesses does not indicate currently process comsuning high cpu.
cheers
"Amol Lembhe" wrote:
[vbcol=seagreen]
> Hi,
> run the following querry
> select spid,hostname,program_name, cpu from master..sysprocesses order by
> cpu desc
> Amo Lembhe
> "Satwinder" wrote:
>|||Anyone in the world who can help me on this. We have 500 process and finding
which one is causing cpu to go 100.
Is this at all possible in SQL server.
Help...
"Satwinder" wrote:
[vbcol=seagreen]
> CPU in sysprocesses does not indicate currently process comsuning high cpu
.
> cheers
> "Amol Lembhe" wrote:
>|||Hi
If you are running at 100% for that length of time it sounds like you are
already in trouble, therefore the faster you fix it the better regardless of
short term inconvenience. A server side trace will use less resources than
using the GUI and using a disc not used by SQL Server for the output will
reduce any resource conflicts further. It would not require a great deal of
profiling to identify what is wrong especially if you already have a baselin
e
for the performance, and you will know exactly what piece of code the proble
m
is occuring. You could even automate the collection of a trace using a
perfmon alert.
John
"Satwinder" wrote:
[vbcol=seagreen]
> yesterday my server had cpu of 100% for an hour. During that time i did no
t
> want to run profiler and put more load on server.
> By looking at processes can we tell which process is utilising max. cpu.
> cheers
> Satwinder
> "John Bell" wrote:
>|||On Tue, 1 Aug 2006 04:56:01 -0700, Satwinder
<Satwinder@.discussions.microsoft.com> wrote:

>MS SQL Server 2000 Enterprise with SP3a
>Is there a way to known which process is causing 100% cpu.
>Is cpu column in sysprocesses gives that.
>How can we see the plan of current running process. Sybase has sp_showplan.
>Is there any equivalent stored proc in sql server.
exec sp_who2

>Thanks.
>Satwinder..|||Hi,
get cpu consume for each program
select program_name, sum(cpu) from master..sysprocesses
group by program_name
u can querry system tables to get required info.
"Satwinder" wrote:
[vbcol=seagreen]
> CPU in sysprocesses does not indicate currently process comsuning high cpu
.
> cheers
> "Amol Lembhe" wrote:
>|||My question is whenever cpu is 100%, then i start the sql profiler, will it
capture the query causing high cpu. Profiler does not capture already runnin
g
queries.
cheers, satwinder
"Satwinder" wrote:

> MS SQL Server 2000 Enterprise with SP3a
> Is there a way to known which process is causing 100% cpu.
> Is cpu column in sysprocesses gives that.
> How can we see the plan of current running process. Sybase has sp_showplan
.
> Is there any equivalent stored proc in sql server.
> Thanks.
> Satwinder..

Wednesday, March 21, 2012

indexing question (getting started with index selection)

hi. this may sound super obvious but i am curious about the thought process that goes into index selection for a table. I have designed a new database and have read up on indexes. What i am unclear about is what value to originally assign the index? Say I have 5 tables. Should OneID = 1, TwoID = 2, ThreeID = 3 and so on? what happens when the index of table one and the index of table two are the same values, does that matter? I have run the index selection wizard and used the profiler to create a trace table but, when i am inserting data into my tables, i am asked to insert an index value... i am not sure where i should start/what numbers i should use (without simply putting down something random).

some "getting started" thoughts on indexing would be appreciated.
thanks in advance.I'm not sure what to ask...

huh?

Got any code you can post?|||sorry, i was afraid that would be confusing...
what i am trying to get at is what values do i use as my index id for each table? does it matter what i use. for example, if i have a table:

Create Table Table1
(
TableID
Row1
Row2
Row3
Row4
ForeignKeyID
)

and then i do an first insert:
Insert into table1 (tableid, row1, row2, row3, row4, foreignkeyid)
values (?, value, value, value, value, ?)

what should i be inserting for my Indexes? Right now i am simly assigning random values... 1000 for TableID and 2000 for the foreign keyid, and so on. Will this cause complications as the table grows and numbers overlap, etc?

If this question still sounds awkward, maybe somebody could point me to a good resouce on INdex Selection for new tables? I haven't found anything good online.

thanks again.|||I would make [TableID] an Identity field that would insure a unique value.
And you need to have the value of the foreign key before you insert a new record. Whether it's unique or not it depends on your appliciation (1 to 1 or 1 to many).|||Not clear on what you are asking but maybe these help:

http://www.sql-server-performance.com/gv_index_data_structures.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/createdb/cm_8_des_05_5h6b.asp

http://www.sqlservercentral.com/columnists/chedgate/clusterthatindex.asp

if you read these and still have questions, come on back!!|||it appears that you are asking for a unique key value for each primary key column..
if this is correct you can use the identity function on the column to generate a auto incrementing monotonic key.

identity has 2 arguments the seed and the increment.
seed is the inital start value when the first row is inserted into the table
increment is the step between the previous number and the next number
so an seed of 2000 and an increment of 50 would be
2000
2050
2100
2150
2200

Create table test
(
col1 int Identity(2000,50) not null
)
Hope thi helps.|||I usually use the largest possible negative number for the seed, with an increment of one. I don't consider the possible overlap of ID values to mean diddly squat.

-PatP

Friday, February 24, 2012

Indexes

Hi,
We have a process which deletes and inserts between 100,000 to 150,000
records on a daily basis in 2-3 of our tables. These tables are queried on
certain fields. So we have created some non-clustered indexes on these
tables. The indexes gave us performance gain while querying however, our
deletion and insertion process has now started taking longer time.
To avoid the delay during deletion and insertion process i am planning to
drop the indexes before this process runs and then create them after the
process has ran.
Now the question is - Does dropping and creating indexes on a daily basis
will create any problems?
Thanks and Regards,
Parag> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
As long as your maintenance window allows this, there is no harm in
recreating indexes. Be aware that in the FULL or BULK_LOGGED recovery
model, log space and log backup space requirements will reflect the index
rebuild activity..
Hope this helps.
Dan Guzman
SQL Server MVP
"Parag Gaikwad" <Parag Gaikwad@.discussions.microsoft.com> wrote in message
news:4234885A-EF64-482F-B43E-08CA69699B21@.microsoft.com...
> Hi,
> We have a process which deletes and inserts between 100,000 to 150,000
> records on a daily basis in 2-3 of our tables. These tables are queried on
> certain fields. So we have created some non-clustered indexes on these
> tables. The indexes gave us performance gain while querying however, our
> deletion and insertion process has now started taking longer time.
> To avoid the delay during deletion and insertion process i am planning to
> drop the indexes before this process runs and then create them after the
> process has ran.
> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
> Thanks and Regards,
> Parag

Indexes

Hi,
We have a process which deletes and inserts between 100,000 to 150,000
records on a daily basis in 2-3 of our tables. These tables are queried on
certain fields. So we have created some non-clustered indexes on these
tables. The indexes gave us performance gain while querying however, our
deletion and insertion process has now started taking longer time.
To avoid the delay during deletion and insertion process i am planning to
drop the indexes before this process runs and then create them after the
process has ran.
Now the question is - Does dropping and creating indexes on a daily basis
will create any problems?
Thanks and Regards,
Parag> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
As long as your maintenance window allows this, there is no harm in
recreating indexes. Be aware that in the FULL or BULK_LOGGED recovery
model, log space and log backup space requirements will reflect the index
rebuild activity..
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Parag Gaikwad" <Parag Gaikwad@.discussions.microsoft.com> wrote in message
news:4234885A-EF64-482F-B43E-08CA69699B21@.microsoft.com...
> Hi,
> We have a process which deletes and inserts between 100,000 to 150,000
> records on a daily basis in 2-3 of our tables. These tables are queried on
> certain fields. So we have created some non-clustered indexes on these
> tables. The indexes gave us performance gain while querying however, our
> deletion and insertion process has now started taking longer time.
> To avoid the delay during deletion and insertion process i am planning to
> drop the indexes before this process runs and then create them after the
> process has ran.
> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
> Thanks and Regards,
> Parag

Sunday, February 19, 2012

Indexes

Hi,
We have a process which deletes and inserts between 100,000 to 150,000
records on a daily basis in 2-3 of our tables. These tables are queried on
certain fields. So we have created some non-clustered indexes on these
tables. The indexes gave us performance gain while querying however, our
deletion and insertion process has now started taking longer time.
To avoid the delay during deletion and insertion process i am planning to
drop the indexes before this process runs and then create them after the
process has ran.
Now the question is - Does dropping and creating indexes on a daily basis
will create any problems?
Thanks and Regards,
Parag
> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
As long as your maintenance window allows this, there is no harm in
recreating indexes. Be aware that in the FULL or BULK_LOGGED recovery
model, log space and log backup space requirements will reflect the index
rebuild activity..
Hope this helps.
Dan Guzman
SQL Server MVP
"Parag Gaikwad" <Parag Gaikwad@.discussions.microsoft.com> wrote in message
news:4234885A-EF64-482F-B43E-08CA69699B21@.microsoft.com...
> Hi,
> We have a process which deletes and inserts between 100,000 to 150,000
> records on a daily basis in 2-3 of our tables. These tables are queried on
> certain fields. So we have created some non-clustered indexes on these
> tables. The indexes gave us performance gain while querying however, our
> deletion and insertion process has now started taking longer time.
> To avoid the delay during deletion and insertion process i am planning to
> drop the indexes before this process runs and then create them after the
> process has ran.
> Now the question is - Does dropping and creating indexes on a daily basis
> will create any problems?
> Thanks and Regards,
> Parag