Showing posts with label insert. Show all posts
Showing posts with label insert. Show all posts

Thursday, March 22, 2012

crystal reports pciture resolution

Hi All,
I have a quesiton about picture quality in the crystal reports. It seems that picture which insert to the crystal report will be degraded.
Do you guy have any solutions of it? I will be appreciate it
my email is : myee@.lyctech.com
Thank youxqpeng@.tsinghua.org.cn

TIA|||vzsoft@.walla.com

Thanks

Tuesday, March 20, 2012

Crystal Reports - Suppress Section

Hi,

How do one suppress a section if ANOTHER section is suppressed.

The one section holds details such as Name, Surname, Contact Number.
I have insert a "Suppress Blank Section" that will suppress that section if it's blank. However, how do i suppress the OTHER section based on this section.

Suppression Rule: ??

English: Suppress section 1 if section 2 is suppressed

Thanks in advance.Is that another section a GF/GH ?
If yes, yo can suppress it conditionally when:

Count ({table.name}, {table.group_field})=0

Thursday, March 8, 2012

Crystal Report 9 suppress difficulty

Hi, I don't know how too :

- print the same report 5 time but with different header on each copy

- suppress the "insert box" and the "insert text objet" with the parameter field I know how too suppress the"insert text objet" with the parameter field but not the "insert box"

can you help me please

thanksIs the header selection based on an input parameter? You could create 5 header sections and use a parameter to select or suppress the header sections accordingly.

I don't think you can suppress a box. My only suggestion is to do as above, create the section twice, one with box, one without, and then suppress an entire section instead of trying to suppress the box.

Crystal Report 10

I have crystal report 10 and programmatically insert reports. right now I am try to Programmatically uncheck the check box for "Prompt the user for database logon when viewing"
please help. thanks!set CR.Enablepopupmenu=false

Wednesday, March 7, 2012

Crystal report

Hi all,

I have a very simple question on Crystal Reports.

Is it possible to insert lines (horizontal and vertical) in between the datas in DETAIL section of Crystal report. If yes, how can I do this? If no, what is the possibility to make complete table using Crys. Rep.

ThanksYou can draw lines using crystal reports. Click on 'Insert', select 'Line'.

Then you can draw the lines in the form of the boxes. For the vertical lines, make sure that you format the line. In the 'Format Line...' options, check 'Extend to the bottom of the section when Printing'. For the horizontal lines, in the 'Format Line...' option, check 'Move to Bottpn of Section when Printing'.

You can even use 'Insert Box' option, but I find the line option more useful and flexible.|||Thanks,

This was really simple.

Sunday, February 19, 2012

Cross table copy working in Query Analyser, but not from code

I'm trying to copy a row from one table to another for audit purposes
using a 'INSERT INTO x SELECT y FROM z' statement. This works
absolutely fine in query analyser, however, when running the exact same
statement from code (.NET via oledb), it fails with the error:
An explicit value for the identity column in table 'x' can only be
specified when a column list is used and IDENTITY_INSERT is ON.
or when specifying all columns:
Cannot insert explicit value for identity column in table 'x' when
IDENTITY_INSERT is set to OFF
Table 'x' has no identity columns, table 'y' has one (integer ID)
identity column.
Anyone have any ideas why this statement would work in the query
analyser, and not in code?
(SQL Server 2000, service pack 3a, .NET v1.1, latest MDAC)I would guess you are connected to different databases/instances and the
table schema are different. If needed, you can run a Profiler trace to
verify this.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rory" <rory.smith@.gmail.com> wrote in message
news:1137432432.481007.178730@.f14g2000cwb.googlegroups.com...
> I'm trying to copy a row from one table to another for audit purposes
> using a 'INSERT INTO x SELECT y FROM z' statement. This works
> absolutely fine in query analyser, however, when running the exact same
> statement from code (.NET via oledb), it fails with the error:
> An explicit value for the identity column in table 'x' can only be
> specified when a column list is used and IDENTITY_INSERT is ON.
> or when specifying all columns:
> Cannot insert explicit value for identity column in table 'x' when
> IDENTITY_INSERT is set to OFF
> Table 'x' has no identity columns, table 'y' has one (integer ID)
> identity column.
> Anyone have any ideas why this statement would work in the query
> analyser, and not in code?
> (SQL Server 2000, service pack 3a, .NET v1.1, latest MDAC)
>|||That's definately not the issue. I'm fairly experienced with database
applications, despite using .net. I've just never come across an
instance whereby the query analyser gave different results to the oledb
components.
Does either the Query Analyser or oledb .net component do anything
unusual behind the scenes? Or is it a possibility that this is
happening because in my program it is taking place inside a
transaction? (it's the first thing in the transaction, and the
exception is thrown immediately on adding the command to the
transaction)
Thanks for the reply Dan|||A Profiler trace should show all that is going on. I can't think of
anything that would cause different behavior for a single statement like
this. The error clearly indicates the target table has an identity column.
Hope this helps.
Dan Guzman
SQL Server MVP
"Rory" <rory.smith@.gmail.com> wrote in message
news:1137437890.787728.312550@.o13g2000cwo.googlegroups.com...
> That's definately not the issue. I'm fairly experienced with database
> applications, despite using .net. I've just never come across an
> instance whereby the query analyser gave different results to the oledb
> components.
> Does either the Query Analyser or oledb .net component do anything
> unusual behind the scenes? Or is it a possibility that this is
> happening because in my program it is taking place inside a
> transaction? (it's the first thing in the transaction, and the
> exception is thrown immediately on adding the command to the
> transaction)
> Thanks for the reply Dan
>|||Rory (rory.smith@.gmail.com) writes:
> I'm trying to copy a row from one table to another for audit purposes
> using a 'INSERT INTO x SELECT y FROM z' statement. This works
> absolutely fine in query analyser, however, when running the exact same
> statement from code (.NET via oledb), it fails with the error:
> An explicit value for the identity column in table 'x' can only be
> specified when a column list is used and IDENTITY_INSERT is ON.
> or when specifying all columns:
> Cannot insert explicit value for identity column in table 'x' when
> IDENTITY_INSERT is set to OFF
> Table 'x' has no identity columns, table 'y' has one (integer ID)
> identity column.
> Anyone have any ideas why this statement would work in the query
> analyser, and not in code?
One thing to check is that there are not two table x in the database.
Own owned by dbo, which I assume that you run as from Query Analyzer,
and one owned by the user that you connect with from the application.
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|||Erland - you were right - I'm unsure of where the 'phantom' table came
from - I created the database from a script which only has one instance
of the table. Anyway, all sorted now.
Many thanks to you both

Tuesday, February 14, 2012

cross database insert

I have an application inserting, deleteing and changing records at a high
volume. Normally I get about 3 million of my transaction a second. For
each transaction I add a log entry to a table. My problem is that I wanted
to create a second database to store the log entries. Once I changed the
log insert to use the second database it cuts my transaction count down to
about 400K an hour. So is doing an insert to a second database always going
to be slow? Is there anything that can be done to improve performance? The
insert is done in a stored procedure in the first database.
Bob
I can imagine two reasons why the cross database work makes it slower:
You do it all in one transaction, and going across databases makes the transaction implemented
internally using a 2-phase commit protocol (more expensive than if inside one database).
You are pushing the log writes so that you end up with waiting for physical writes, and if you have
the transaction log files for the two databases on the same physical disk(s), you end up waiting for
head-movement.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Bob" <msgdev@.hotmail.com> wrote in message news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>I have an application inserting, deleteing and changing records at a high volume. Normally I get
>about 3 million of my transaction a second. For each transaction I add a log entry to a table. My
>problem is that I wanted to create a second database to store the log entries. Once I changed the
>log insert to use the second database it cuts my transaction count down to about 400K an hour. So
>is doing an insert to a second database always going to be slow? Is there anything that can be
>done to improve performance? The insert is done in a stored procedure in the first database.
>
> Bob
>
|||The only reason I am doing this is because of the size limitation of
SQLExpress. I need more space for my logs. Anyone have any suggestion on
another work around beside upgrading to the full version of SQL server?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>I can imagine two reasons why the cross database work makes it slower:
> You do it all in one transaction, and going across databases makes the
> transaction implemented internally using a 2-phase commit protocol (more
> expensive than if inside one database).
> You are pushing the log writes so that you end up with waiting for
> physical writes, and if you have the transaction log files for the two
> databases on the same physical disk(s), you end up waiting for
> head-movement.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>
|||The cross database insert is always going to do a distributed transaction
and distributed commits get serialized so it's going to be slow. The people
around here that do this have several empty databases created and when they
get above a certain size, they change the database name for their inserts.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
> The only reason I am doing this is because of the size limitation of
> SQLExpress. I need more space for my logs. Anyone have any suggestion on
> another work around beside upgrading to the full version of SQL server?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>
|||Thats going to be hard in my situation. I have serveral processes adding
records to a table. A second process doing a select on that table then
passing each record to a worker thread. The thread process the data and
then deletes the original record from the table. After each event the
status is logged to another table. This logging is what is causing my
problem. It would be hard to switch tables since I could have about 100k
items queued to be processed at any time.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
> The cross database insert is always going to do a distributed transaction
> and distributed commits get serialized so it's going to be slow. The
> people around here that do this have several empty databases created and
> when they get above a certain size, they change the database name for
> their inserts.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
>
|||How critical is losing a log record? You could try logging in a different
transaction or even logging to a file if you ca afford to lose a log record
when the system loses power.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:O$dwuaAWGHA.4360@.TK2MSFTNGP14.phx.gbl...
> Thats going to be hard in my situation. I have serveral processes adding
> records to a table. A second process doing a select on that table then
> passing each record to a worker thread. The thread process the data and
> then deletes the original record from the table. After each event the
> status is logged to another table. This logging is what is causing my
> problem. It would be hard to switch tables since I could have about 100k
> items queued to be processed at any time.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
>

cross database insert

I have an application inserting, deleteing and changing records at a high
volume. Normally I get about 3 million of my transaction a second. For
each transaction I add a log entry to a table. My problem is that I wanted
to create a second database to store the log entries. Once I changed the
log insert to use the second database it cuts my transaction count down to
about 400K an hour. So is doing an insert to a second database always going
to be slow? Is there anything that can be done to improve performance? The
insert is done in a stored procedure in the first database.
BobI can imagine two reasons why the cross database work makes it slower:
You do it all in one transaction, and going across databases makes the transaction implemented
internally using a 2-phase commit protocol (more expensive than if inside one database).
You are pushing the log writes so that you end up with waiting for physical writes, and if you have
the transaction log files for the two databases on the same physical disk(s), you end up waiting for
head-movement.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Bob" <msgdev@.hotmail.com> wrote in message news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>I have an application inserting, deleteing and changing records at a high volume. Normally I get
>about 3 million of my transaction a second. For each transaction I add a log entry to a table. My
>problem is that I wanted to create a second database to store the log entries. Once I changed the
>log insert to use the second database it cuts my transaction count down to about 400K an hour. So
>is doing an insert to a second database always going to be slow? Is there anything that can be
>done to improve performance? The insert is done in a stored procedure in the first database.
>
> Bob
>|||The only reason I am doing this is because of the size limitation of
SQLExpress. I need more space for my logs. Anyone have any suggestion on
another work around beside upgrading to the full version of SQL server?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>I can imagine two reasons why the cross database work makes it slower:
> You do it all in one transaction, and going across databases makes the
> transaction implemented internally using a 2-phase commit protocol (more
> expensive than if inside one database).
> You are pushing the log writes so that you end up with waiting for
> physical writes, and if you have the transaction log files for the two
> databases on the same physical disk(s), you end up waiting for
> head-movement.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>>I have an application inserting, deleteing and changing records at a high
>>volume. Normally I get about 3 million of my transaction a second. For
>>each transaction I add a log entry to a table. My problem is that I
>>wanted to create a second database to store the log entries. Once I
>>changed the log insert to use the second database it cuts my transaction
>>count down to about 400K an hour. So is doing an insert to a second
>>database always going to be slow? Is there anything that can be done to
>>improve performance? The insert is done in a stored procedure in the
>>first database.
>>
>> Bob
>|||The cross database insert is always going to do a distributed transaction
and distributed commits get serialized so it's going to be slow. The people
around here that do this have several empty databases created and when they
get above a certain size, they change the database name for their inserts.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
> The only reason I am doing this is because of the size limitation of
> SQLExpress. I need more space for my logs. Anyone have any suggestion on
> another work around beside upgrading to the full version of SQL server?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>>I can imagine two reasons why the cross database work makes it slower:
>> You do it all in one transaction, and going across databases makes the
>> transaction implemented internally using a 2-phase commit protocol (more
>> expensive than if inside one database).
>> You are pushing the log writes so that you end up with waiting for
>> physical writes, and if you have the transaction log files for the two
>> databases on the same physical disk(s), you end up waiting for
>> head-movement.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Bob" <msgdev@.hotmail.com> wrote in message
>> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>>I have an application inserting, deleteing and changing records at a high
>>volume. Normally I get about 3 million of my transaction a second. For
>>each transaction I add a log entry to a table. My problem is that I
>>wanted to create a second database to store the log entries. Once I
>>changed the log insert to use the second database it cuts my transaction
>>count down to about 400K an hour. So is doing an insert to a second
>>database always going to be slow? Is there anything that can be done to
>>improve performance? The insert is done in a stored procedure in the
>>first database.
>>
>> Bob
>>
>|||Thats going to be hard in my situation. I have serveral processes adding
records to a table. A second process doing a select on that table then
passing each record to a worker thread. The thread process the data and
then deletes the original record from the table. After each event the
status is logged to another table. This logging is what is causing my
problem. It would be hard to switch tables since I could have about 100k
items queued to be processed at any time.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
> The cross database insert is always going to do a distributed transaction
> and distributed commits get serialized so it's going to be slow. The
> people around here that do this have several empty databases created and
> when they get above a certain size, they change the database name for
> their inserts.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
>> The only reason I am doing this is because of the size limitation of
>> SQLExpress. I need more space for my logs. Anyone have any suggestion
>> on another work around beside upgrading to the full version of SQL
>> server?
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>>I can imagine two reasons why the cross database work makes it slower:
>> You do it all in one transaction, and going across databases makes the
>> transaction implemented internally using a 2-phase commit protocol (more
>> expensive than if inside one database).
>> You are pushing the log writes so that you end up with waiting for
>> physical writes, and if you have the transaction log files for the two
>> databases on the same physical disk(s), you end up waiting for
>> head-movement.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Bob" <msgdev@.hotmail.com> wrote in message
>> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>>I have an application inserting, deleteing and changing records at a
>>high volume. Normally I get about 3 million of my transaction a second.
>>For each transaction I add a log entry to a table. My problem is that I
>>wanted to create a second database to store the log entries. Once I
>>changed the log insert to use the second database it cuts my transaction
>>count down to about 400K an hour. So is doing an insert to a second
>>database always going to be slow? Is there anything that can be done to
>>improve performance? The insert is done in a stored procedure in the
>>first database.
>>
>> Bob
>>
>>
>|||How critical is losing a log record? You could try logging in a different
transaction or even logging to a file if you ca afford to lose a log record
when the system loses power.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:O$dwuaAWGHA.4360@.TK2MSFTNGP14.phx.gbl...
> Thats going to be hard in my situation. I have serveral processes adding
> records to a table. A second process doing a select on that table then
> passing each record to a worker thread. The thread process the data and
> then deletes the original record from the table. After each event the
> status is logged to another table. This logging is what is causing my
> problem. It would be hard to switch tables since I could have about 100k
> items queued to be processed at any time.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
>> The cross database insert is always going to do a distributed transaction
>> and distributed commits get serialized so it's going to be slow. The
>> people around here that do this have several empty databases created and
>> when they get above a certain size, they change the database name for
>> their inserts.
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> Use of included script samples are subject to the terms specified at
>> http://www.microsoft.com/info/cpyright.htm
>> "Bob" <msgdev@.hotmail.com> wrote in message
>> news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
>> The only reason I am doing this is because of the size limitation of
>> SQLExpress. I need more space for my logs. Anyone have any suggestion
>> on another work around beside upgrading to the full version of SQL
>> server?
>>
>> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
>> in message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>>I can imagine two reasons why the cross database work makes it slower:
>> You do it all in one transaction, and going across databases makes the
>> transaction implemented internally using a 2-phase commit protocol
>> (more expensive than if inside one database).
>> You are pushing the log writes so that you end up with waiting for
>> physical writes, and if you have the transaction log files for the two
>> databases on the same physical disk(s), you end up waiting for
>> head-movement.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Bob" <msgdev@.hotmail.com> wrote in message
>> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>>I have an application inserting, deleteing and changing records at a
>>high volume. Normally I get about 3 million of my transaction a
>>second. For each transaction I add a log entry to a table. My problem
>>is that I wanted to create a second database to store the log entries.
>>Once I changed the log insert to use the second database it cuts my
>>transaction count down to about 400K an hour. So is doing an insert to
>>a second database always going to be slow? Is there anything that can
>>be done to improve performance? The insert is done in a stored
>>procedure in the first database.
>>
>> Bob
>>
>>
>>
>

cross database insert

I have an application inserting, deleteing and changing records at a high
volume. Normally I get about 3 million of my transaction a second. For
each transaction I add a log entry to a table. My problem is that I wanted
to create a second database to store the log entries. Once I changed the
log insert to use the second database it cuts my transaction count down to
about 400K an hour. So is doing an insert to a second database always going
to be slow? Is there anything that can be done to improve performance? The
insert is done in a stored procedure in the first database.
BobI can imagine two reasons why the cross database work makes it slower:
You do it all in one transaction, and going across databases makes the trans
action implemented
internally using a 2-phase commit protocol (more expensive than if inside on
e database).
You are pushing the log writes so that you end up with waiting for physical
writes, and if you have
the transaction log files for the two databases on the same physical disk(s)
, you end up waiting for
head-movement.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Bob" <msgdev@.hotmail.com> wrote in message news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...[
vbcol=seagreen]
>I have an application inserting, deleteing and changing records at a high v
olume. Normally I get
>about 3 million of my transaction a second. For each transaction I add a l
og entry to a table. My
>problem is that I wanted to create a second database to store the log entri
es. Once I changed the
>log insert to use the second database it cuts my transaction count down to
about 400K an hour. So
>is doing an insert to a second database always going to be slow? Is there
anything that can be
>done to improve performance? The insert is done in a stored procedure in t
he first database.
>
> Bob
>[/vbcol]|||The only reason I am doing this is because of the size limitation of
SQLExpress. I need more space for my logs. Anyone have any suggestion on
another work around beside upgrading to the full version of SQL server?
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>I can imagine two reasons why the cross database work makes it slower:
> You do it all in one transaction, and going across databases makes the
> transaction implemented internally using a 2-phase commit protocol (more
> expensive than if inside one database).
> You are pushing the log writes so that you end up with waiting for
> physical writes, and if you have the transaction log files for the two
> databases on the same physical disk(s), you end up waiting for
> head-movement.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:%23wv9my$VGHA.5668@.TK2MSFTNGP15.phx.gbl...
>|||The cross database insert is always going to do a distributed transaction
and distributed commits get serialized so it's going to be slow. The people
around here that do this have several empty databases created and when they
get above a certain size, they change the database name for their inserts.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
> The only reason I am doing this is because of the size limitation of
> SQLExpress. I need more space for my logs. Anyone have any suggestion on
> another work around beside upgrading to the full version of SQL server?
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:OPUNT5$VGHA.5076@.TK2MSFTNGP14.phx.gbl...
>|||Thats going to be hard in my situation. I have serveral processes adding
records to a table. A second process doing a select on that table then
passing each record to a worker thread. The thread process the data and
then deletes the original record from the table. After each event the
status is logged to another table. This logging is what is causing my
problem. It would be hard to switch tables since I could have about 100k
items queued to be processed at any time.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
> The cross database insert is always going to do a distributed transaction
> and distributed commits get serialized so it's going to be slow. The
> people around here that do this have several empty databases created and
> when they get above a certain size, they change the database name for
> their inserts.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Bob" <msgdev@.hotmail.com> wrote in message
> news:eB2PzCAWGHA.5036@.TK2MSFTNGP15.phx.gbl...
>|||How critical is losing a log record? You could try logging in a different
transaction or even logging to a file if you ca afford to lose a log record
when the system loses power.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Bob" <msgdev@.hotmail.com> wrote in message
news:O$dwuaAWGHA.4360@.TK2MSFTNGP14.phx.gbl...
> Thats going to be hard in my situation. I have serveral processes adding
> records to a table. A second process doing a select on that table then
> passing each record to a worker thread. The thread process the data and
> then deletes the original record from the table. After each event the
> status is logged to another table. This logging is what is causing my
> problem. It would be hard to switch tables since I could have about 100k
> items queued to be processed at any time.
>
> "Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
> news:%23bq9IHAWGHA.2360@.TK2MSFTNGP09.phx.gbl...
>