Showing posts with label helloi. Show all posts
Showing posts with label helloi. Show all posts

Tuesday, March 27, 2012

Data file inlezen via Stored Procedure

Hello
I want to import a datafile into an sql database with stored procedure. But i have now idee how i must do that.
Also the procedure must be run automatily each morning at 10 a clock.
Greetz TomCreate stored procedure for importing data and setup job for running this procedure.

Sunday, March 11, 2012

data content comparison

Hello:
I'm looking for a free tool or procedures
to compare data content of two tables
which belongs to different servers.
Each table does not have any indexes or primary key. I need this as
verification procedures for my
log shipping process.
Thanks,
GBTake a look at Red Gate SQL Data Compare
(http://www.red-gate.com/products/SQ...mpare/index.htm)
http://sqlservercode.blogspot.com/|||I ask it for FREE.
"SQL" <denis.gobo@.gmail.com> wrote in message
news:1135192364.052961.258020@.z14g2000cwz.googlegroups.com...
> Take a look at Red Gate SQL Data Compare
> (http://www.red-gate.com/products/SQ...mpare/index.htm)
> http://sqlservercode.blogspot.com/
>|||when you say "each table does not have any indexes or primary key" do
you mean:
-- No tables have indexes/pks or
-- Some tables do, but not all of them
and
-- They don't have a pk [or unique?] constraint defined, but they do
have a logical pk or
-- They don't even have a logical pk defined
if it's that they don't even have a logical pk defined, then how would
you know what you're comparing? you'd have to be able to determine what
data constitutes being the same between the two similar tables on
different servers. [an identity/guid is most likely irrelevant in this
situation, as the chances that two tables in different servers have the
same identity value for the same data is extremely small]
even if it's that the pk (or unique?) constraint is not defined, then
you still might have duplicates within a singe table.
most comparison tools i've seen pull the pk dynamically, so if it's not
defined, you'll also need a tool that lets you specify the pk column(s).
GB wrote:
> Hello:
> I'm looking for a free tool or procedures
> to compare data content of two tables
> which belongs to different servers.
> Each table does not have any indexes or primary key. I need this as
> verification procedures for my
> log shipping process.
> Thanks,
> GB
>
>|||Some tables do, but not all of them
"Trey Walpole" <treypole@.newsgroups.nospam> wrote in message
news:up2tgcmBGHA.2040@.TK2MSFTNGP14.phx.gbl...
> when you say "each table does not have any indexes or primary key" do
> you mean:
> -- No tables have indexes/pks or
> -- Some tables do, but not all of them
> and
> -- They don't have a pk [or unique?] constraint defined, but they do
> have a logical pk or
> -- They don't even have a logical pk defined
> if it's that they don't even have a logical pk defined, then how would
> you know what you're comparing? you'd have to be able to determine what
> data constitutes being the same between the two similar tables on
> different servers. [an identity/guid is most likely irrelevant in this
> situation, as the chances that two tables in different servers have the
> same identity value for the same data is extremely small]
> even if it's that the pk (or unique?) constraint is not defined, then
> you still might have duplicates within a singe table.
> most comparison tools i've seen pull the pk dynamically, so if it's not
> defined, you'll also need a tool that lets you specify the pk column(s).
>
> GB wrote:|||>I ask it for FREE.
There is no FREE, one-click, easy button -- not even Staples has one of
those. So, you can invest the time in writing queries tailored to your
schema, or you can invest the money in a product that does the work for you.

Friday, February 17, 2012

Cyrstal Report and ASP- HEEEEELLLP!

Hello:

I am using ASP and Crystal report. I created a .rpt file on a dev server and I can access the report in pdf format using ASP.

But now I want to implement the same on production server. I copied the .rpt file and changed the database settings. The preview pane shows the new data. But when I call the report from ASP and convert it to pdf I get nothing. Just the report heading and no rows get selected.

I know there is data in the database, and I confirm that the db connection is ok.

Any clues?

Also why do we specify the
Set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo CStr(databaseServer), CStr(databaseTables), CStr(databaseUser), CStr(databasePassword)

in the ASP, when we have to specify the same credentials in the rpt file as well?

Is is adviced to save the report with data or without?

Your help will be greatly appreciated.
ThanksThe report is not to be saved with that data.If u save the report with the data the data will be not be refreshed each time while opening the report.

Set crtable = session("oRpt").Database.Tables.Item(1)
crtable.SetLogonInfo CStr(databaseServer), CStr(databaseTables), CStr(databaseUser), CStr(databasePassword)

These lines are written so that the report can log on to the data server.|||Hi

Iam going to include a crpt report in our existing asp application.
I dont have any idea to code for how to call and use crpt in asp file.

Pls, any one give me sample codings for the same.
mail id saravanakumar77@.yahoo.com

regards
Saravanakumar.D

CXPACKET and max degree of parallelism

Hello
I have a two node cluster with two SQL Server 2000 instances. The cluster is
made of two HP RX4640 servers with 4 x Itanium2 64bits processors and
32Gbytes of RAM . The servers are running Windows 2003 Enterprise Edition 64
bits and SQL Server 2000 64 bits. Each SQL 2000 instance has about 100
databases.
I am using the sp_waitstats procedure
(http://www.sqldev.net/misc/sp_waitstats.htm) from Gert Drapers website to
analyse to waittypes from both servers.
Using the storeprocedure I notice that 20% of the total wait type is made of
CXPACKET.
Reading the SQL Server 2000 Wait Types document
(http://sqldev.net/misc/waittypes.htm) I also notice that this wait type
happens because of parallel process waits. The document also says that one
possible way to solve that problema is to reduce the number of available
processor for parallel execution.
Now my questions (since I am not an expert on parallel execution)
1) Why the CXPACKET wait type happens?
2) If I reduce the number of processor or even turn off the parallel
execution, the queries will not take longer to complete?
3) What is the best way to reduce this wait type?
Regards.
Carlos Eduardo Selonke de Souza
http://carlos.geekbunker.orgBasically, parallel threads are used to speed up the execution of queries.
The idea is that on a multi-cpu system you can get more work done in
parallel then serially. Likewise, reducing the 'max degree of parallelism'
will probably slow down your queries and maintenance tasks. You would need
to test your system thoroughly to determine if there is a performance
impact.
The way parallelism works is that during the execution of some complex query
SQL might decide that the 'cost threshold for parallelism' will be exceeded
and it will spawn multiple threads (i.e. streams) to service each query
task. It will then gather streams, and if one is waiting on a resource other
threads will be blocked as well. You will see CXPACKET waittype at that
point.
To answer your third question, you won't be able to see anything beyond
CXPACKET to determine why a particular thread is waiting. If you set maxdop
to 1 you will see a different waittype at that point that might provide clue
as to where the bottleneck is.
If you are seeing a lot of CXPACKET waittypes you should try tuning queries
(excessive parallelism is frequently caused by poorly optimized queries),
and restrict parallelism to a smaller value but greater than 1.
Adrian
"Carlos Eduardo Selonke de Souza"
<CarlosEduardoSelonkedeSouza@.discussions.microsoft.com> wrote in message
news:64E1BFEB-4D00-4A35-BE53-1864804AD70E@.microsoft.com...
> Hello
> I have a two node cluster with two SQL Server 2000 instances. The cluster
> is
> made of two HP RX4640 servers with 4 x Itanium2 64bits processors and
> 32Gbytes of RAM . The servers are running Windows 2003 Enterprise Edition
> 64
> bits and SQL Server 2000 64 bits. Each SQL 2000 instance has about 100
> databases.
> I am using the sp_waitstats procedure
> (http://www.sqldev.net/misc/sp_waitstats.htm) from Gert Drapers website to
> analyse to waittypes from both servers.
> Using the storeprocedure I notice that 20% of the total wait type is made
> of
> CXPACKET.
> Reading the SQL Server 2000 Wait Types document
> (http://sqldev.net/misc/waittypes.htm) I also notice that this wait type
> happens because of parallel process waits. The document also says that one
> possible way to solve that problema is to reduce the number of available
> processor for parallel execution.
> Now my questions (since I am not an expert on parallel execution)
> 1) Why the CXPACKET wait type happens?
> 2) If I reduce the number of processor or even turn off the parallel
> execution, the queries will not take longer to complete?
> 3) What is the best way to reduce this wait type?
> Regards.
> --
> Carlos Eduardo Selonke de Souza
> http://carlos.geekbunker.org

CXPACKET and max degree of parallelism

Hello
I have a two node cluster with two SQL Server 2000 instances. The cluster is
made of two HP RX4640 servers with 4 x Itanium2 64bits processors and
32Gbytes of RAM . The servers are running Windows 2003 Enterprise Edition 64
bits and SQL Server 2000 64 bits. Each SQL 2000 instance has about 100
databases.
I am using the sp_waitstats procedure
(http://www.sqldev.net/misc/sp_waitstats.htm) from Gert Drapers website to
analyse to waittypes from both servers.
Using the storeprocedure I notice that 20% of the total wait type is made of
CXPACKET.
Reading the SQL Server 2000 Wait Types document
(http://sqldev.net/misc/waittypes.htm) I also notice that this wait type
happens because of parallel process waits. The document also says that one
possible way to solve that problema is to reduce the number of available
processor for parallel execution.
Now my questions (since I am not an expert on parallel execution)
1) Why the CXPACKET wait type happens?
2) If I reduce the number of processor or even turn off the parallel
execution, the queries will not take longer to complete?
3) What is the best way to reduce this wait type?
Regards.
Carlos Eduardo Selonke de Souza
http://carlos.geekbunker.org
Basically, parallel threads are used to speed up the execution of queries.
The idea is that on a multi-cpu system you can get more work done in
parallel then serially. Likewise, reducing the 'max degree of parallelism'
will probably slow down your queries and maintenance tasks. You would need
to test your system thoroughly to determine if there is a performance
impact.
The way parallelism works is that during the execution of some complex query
SQL might decide that the 'cost threshold for parallelism' will be exceeded
and it will spawn multiple threads (i.e. streams) to service each query
task. It will then gather streams, and if one is waiting on a resource other
threads will be blocked as well. You will see CXPACKET waittype at that
point.
To answer your third question, you won't be able to see anything beyond
CXPACKET to determine why a particular thread is waiting. If you set maxdop
to 1 you will see a different waittype at that point that might provide clue
as to where the bottleneck is.
If you are seeing a lot of CXPACKET waittypes you should try tuning queries
(excessive parallelism is frequently caused by poorly optimized queries),
and restrict parallelism to a smaller value but greater than 1.
Adrian
"Carlos Eduardo Selonke de Souza"
<CarlosEduardoSelonkedeSouza@.discussions.microsoft .com> wrote in message
news:64E1BFEB-4D00-4A35-BE53-1864804AD70E@.microsoft.com...
> Hello
> I have a two node cluster with two SQL Server 2000 instances. The cluster
> is
> made of two HP RX4640 servers with 4 x Itanium2 64bits processors and
> 32Gbytes of RAM . The servers are running Windows 2003 Enterprise Edition
> 64
> bits and SQL Server 2000 64 bits. Each SQL 2000 instance has about 100
> databases.
> I am using the sp_waitstats procedure
> (http://www.sqldev.net/misc/sp_waitstats.htm) from Gert Drapers website to
> analyse to waittypes from both servers.
> Using the storeprocedure I notice that 20% of the total wait type is made
> of
> CXPACKET.
> Reading the SQL Server 2000 Wait Types document
> (http://sqldev.net/misc/waittypes.htm) I also notice that this wait type
> happens because of parallel process waits. The document also says that one
> possible way to solve that problema is to reduce the number of available
> processor for parallel execution.
> Now my questions (since I am not an expert on parallel execution)
> 1) Why the CXPACKET wait type happens?
> 2) If I reduce the number of processor or even turn off the parallel
> execution, the queries will not take longer to complete?
> 3) What is the best way to reduce this wait type?
> Regards.
> --
> Carlos Eduardo Selonke de Souza
> http://carlos.geekbunker.org