Showing posts with label transaction. Show all posts
Showing posts with label transaction. Show all posts

Friday, March 30, 2012

Prediction with many attribute states

I have a large dataset of around 3 million records with accounting data for 2 years. Attributes are transaction amount (cont. / predict), account, cost centre, project, month and a few others. I want to predict any future transaction amount for a certain combination. For example; what will the next salary cost transaction amount in cost centre 123 probably be?

I have tried Decision trees and Neural nets. But the predictions are not good enough even if there should be clear patterns in normal accounting data.

I guess the problem is that many of the input attributes have many states. There are around 500 account, and 1000 cost centres, and 2000 projects etc. And the Decision tree doesn’t seem to be able to capture all the business rules in the company. I have tried to group the attribute states into groups based on their average amount, their parent account etc, but it doesn’t seem to solve the problem.

Please post any suggestion you might have how to improve the prediction. I will try them all and post back my findings!

/Erik

You may need to structure your model so that it creates independent models for all scenarios. Also if things like "Project" only have a few rows/state, there's likely not alot to learn from them.

To create independent models you need to move one of your attributes to a nested table. For example, if you thought that "accounts" were the most important you would create a model like this

CREATE MINING MODEL CostByAccount
{
Transaction LONG KEY,
AccountAmount TABLE
{
Account TEXT KEY,
Amount FLOAT CONTINUOUS PREDICT_ONLY
}
CostCenter LONG DISCRETE,
Project LONG DISCRETE,
Month TEXT DISCRETE,
...
} USING Microsoft_Decision_Trees(params)

This will create a different tree for each account based on input only for that account. To create this table in the UI, you will mark the source table as case and nested tables and then add Account as Key of the nested table.

|||

Thanx Jamie,

Seems like a good idea. Creating a forrest instead of a tree. The result looks as expected when browsing the created tree structres in the model viewer.

1. But is this kind of model supported by the accurancy chart? Can't seem to get it working. I add the case table, and the nested table (same table twice). But the drop-down "Predictabel column name" is empty.

2. How to write the predict query? Have used the query builder but it dosn't seem to work.

/Erik

|||

Actually, no, it doesn't work with the accuracy chart, so you would have to create your own accuracy test queries.

For predict, you should be able to do Predict(<Nested Table Name>,3) for example to get the 3 most likely categories. There are also additional tricks you can play, for example to get statistics you can do

Predict(<Nested Table Name>,INCLUDE_STATISTICS)

This will return all possible states with descriptive stats for each state. Since these functions return tables you can select from them, e.g.

SELECT (SELECT * FROM Predict(<Nested Table>, INCLUDE_STATISTICS) WHERE $Probability >0.25) as Result FROM MyModel ...

Will return all states with a 25% probability or higher.

|||

Can't follow you,

This is approx. what I would like to do. But it dosnt work. (A simplified version of the real model).

/Erik

SELECT
t.[TransactionID],
t.[Account],
t.[CostCentre],
t.[Project],
(t.[Amount]) as [ActualAmount],
(SELECT ([Amount]) as [EstimatedAmount] FROM [DesTree].[Transactions])
From
[DesTree]
PREDICTION JOIN
SHAPE {
OPENQUERY([Adb2],
'SELECT DISTINCT
[TransactionID],
[Account],
[CostCentre],
[Project],
[Amount]
FROM
[dbo].[Transactions]
ORDER BY
[TransactionID]')}
APPEND
({OPENQUERY([Adb2],
'SELECT
[Account],
[Amount],
[TransactionID]
FROM
[dbo].[Transactions]
ORDER BY
[TransactionID]')}
RELATE
[TransactionID] TO [TransactionID])
AS
[Transactions] AS t
ON
[DesTree].[Cost Centre] = t.[CostCentre] AND
[DesTree].[Project] = t.[Project] AND
[DesTree].[Transactions].[Account] = t.[Transactions].[Account] AND
[DesTree].[Transactions].[Amount] = t.[Transactions].[Amount]

|||

I think you want to do your nested select like this

SELECT FLATTENED

t.[TransactionID],
t.[Account],
t.[CostCentre],
t.[Project],
(t.[Amount]) as [ActualAmount],

(SELECT Account, Amount FROM Predict(Transactions) WHERE Account='MyAccount') as Prediction

FROM ...

The only problem here is that you can't compare the nested account to your input - only to a static string or parameter. E.g you can do WHERE Account=@.Account, but you can't do WHERE Account=t.Account.

Friday, March 23, 2012

Power failure using simple mode transaction Log

Any comments about what happens when we get a power failure using simple mode
transaction Log?
I had 3 Power failure and there has not been any problems with the data.
The auto recuperation informs that 5343 rows where commited and 0 rolled back.
Can I expect this behaviour in the future? (another power failure).
Note that I have a UPS, but I didn't have time to shutdown properly.
Run DBCC CHECKDB if you haven't already.
You should configure your UPS to shutdown the server automatically after N
minutes of power failure.
David Portas
SQL Server MVP
|||If you have hardware write cache, you need to make sure it is properly backed up, and follows a
certain set of rules. If it does, the database should not go corrupt because of a power failure. If
you don't have hardware write cache, then you probably don't have battery backup and you can see a
torn page. See http://www.microsoft.com/technet/pro...lIObasics.mspx for
full information.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"juan carlos via droptable.com" <forum@.droptable.com> wrote in message
news:51122050ED1E0@.droptable.com...
> Any comments about what happens when we get a power failure using simple mode
> transaction Log?
> I had 3 Power failure and there has not been any problems with the data.
> The auto recuperation informs that 5343 rows where commited and 0 rolled back.
>
> Can I expect this behaviour in the future? (another power failure).
> Note that I have a UPS, but I didn't have time to shutdown properly.

Power failure using simple mode transaction Log

Any comments about what happens when we get a power failure using simple mod
e
transaction Log?
I had 3 Power failure and there has not been any problems with the data.
The auto recuperation informs that 5343 rows where commited and 0 rolled bac
k.
Can I expect this behaviour in the future? (another power failure).
Note that I have a UPS, but I didn't have time to shutdown properly.Run DBCC CHECKDB if you haven't already.
You should configure your UPS to shutdown the server automatically after N
minutes of power failure.
David Portas
SQL Server MVP
--|||If you have hardware write cache, you need to make sure it is properly backe
d up, and follows a
certain set of rules. If it does, the database should not go corrupt because
of a power failure. If
you don't have hardware write cache, then you probably don't have battery ba
ckup and you can see a
torn page. See http://www.microsoft.com/technet/pr...>
Obasics.mspx for
full information.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"juan carlos via droptable.com" <forum@.droptable.com> wrote in message
news:51122050ED1E0@.droptable.com...
> Any comments about what happens when we get a power failure using simple m
ode
> transaction Log?
> I had 3 Power failure and there has not been any problems with the data.
> The auto recuperation informs that 5343 rows where commited and 0 rolled b
ack.
>
> Can I expect this behaviour in the future? (another power failure).
> Note that I have a UPS, but I didn't have time to shutdown properly.

Power failure using simple mode transaction Log

Any comments about what happens when we get a power failure using simple mode
transaction Log?
I had 3 Power failure and there has not been any problems with the data.
The auto recuperation informs that 5343 rows where commited and 0 rolled back.
Can I expect this behaviour in the future? (another power failure).
Note that I have a UPS, but I didn't have time to shutdown properly.Run DBCC CHECKDB if you haven't already.
You should configure your UPS to shutdown the server automatically after N
minutes of power failure.
--
David Portas
SQL Server MVP
--|||If you have hardware write cache, you need to make sure it is properly backed up, and follows a
certain set of rules. If it does, the database should not go corrupt because of a power failure. If
you don't have hardware write cache, then you probably don't have battery backup and you can see a
torn page. See http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlIObasics.mspx for
full information.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"juan carlos via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:51122050ED1E0@.SQLMonster.com...
> Any comments about what happens when we get a power failure using simple mode
> transaction Log?
> I had 3 Power failure and there has not been any problems with the data.
> The auto recuperation informs that 5343 rows where commited and 0 rolled back.
>
> Can I expect this behaviour in the future? (another power failure).
> Note that I have a UPS, but I didn't have time to shutdown properly.sql

Potential issues with backing up to a network share

Hi
What potential issues can you think of or have run into when making
transaction log backups into a single file on a network share. The
MSSQLSERVER service is running under a domain user account, which has
apropriate permissions on the shared folder. The backup is made from a
database in an MS SQL Server 2000 SP3 on an MS Windows Server 2003 SP1 and
the file is stored on an MS Windows 2000 Server SP4.
--
Many thanks,
OskarIt's slow. If you have a busy OLTP and a large tran file, you can get
memory pressure during the backup. That being said we do it on many of our
servers.
"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:ED49A03D-1FBC-42D2-84FA-C7987C0DF005@.microsoft.com...
> Hi
> What potential issues can you think of or have run into when making
> transaction log backups into a single file on a network share. The
> MSSQLSERVER service is running under a domain user account, which has
> apropriate permissions on the shared folder. The backup is made from a
> database in an MS SQL Server 2000 SP3 on an MS Windows Server 2003 SP1 and
> the file is stored on an MS Windows 2000 Server SP4.
> --
> Many thanks,
> Oskar
>

Wednesday, March 21, 2012

POSTING AGAIN Transaction Replication - Identity column

Hi,
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
Can you check and make sure the subscribing table is empty?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
Hi,
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
|||Vyas,
Subscribing table has data because i have manually copied the data through
stored procedure from Publising database.
Thanks,
Vijay
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> Can you check and make sure the subscribing table is empty?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I am using transaction replication and the identity column is not
included
> for replication.
> After creating the snapshot, i manually copying the data through stored
> procedure from publishing database to subscription database. Then,if we
run
> the distribution agent,i am getting the following error. what will be the
> process involved in applying the initial snapshot since i have already
> copied the data. Will SQL server do bcp again? How can i avoid it?
>
> Error Message: The process could not bulk copy into table '"hsassbtr"'.
> Error Details:
> Numeric value out of range
> (Source: INFOSYS6 (ODBC); Error number: 22003)
> ----
--
> --
> Numeric value out of range
> (Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
> ----
--
> --
> Unexpected EOF encountered in BCP data-file
> (Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
> ----
--
> --
> Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
> key in object 'hsassbtr'.
> (Source: INFOSYS6 (Data source); Error number: 2627)
> ----
--
> --
> Aritcle is added as follows:
> --added all the columns
> exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = NULL,
> @.operation = N'add',
> @.force_invalidate_snapshot = 1
> --dropped identity('DEX_ROW_ID') columns
> exec sp_articlecolumn @.publication =
> 'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = N'DEX_ROW_ID',
> @.operation = N'drop',
> @.force_invalidate_snapshot = 1
>
> I have created the subscription as follows:
> exec sp_addpullsubscription
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.independent_agent = N'true',
> @.subscription_type = N'anonymous',
> @.description = N'InfoSys POC Setup Table Publication',
> @.update_mode = N'read only',
> @.immediate_sync = 1
> exec sp_addpullsubscription_agent
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.distributor = @.distributor,
> @.subscriber_security_mode = @.security_mode,
> @.distributor_security_mode = @.security_mode,
> @.frequency_type = 8, --Weekly
> @.frequency_interval = 1, --Sunday
> @.frequency_recurrence_factor = 1, --Every Week
> @.frequency_subday = 1, --Once a Day
> @.active_start_time_of_day = 220000, --10 PM
> @.enabled_for_syncmgr = N'false',
> @.use_ftp = N'false',
> @.publication_type = 0,
> @.offloadagent = N'false'
> Any help?
>
> Thanks,
> Vijay
>
>
|||Why did you copy data manually, when you are configuring replication with
automatic sync?
You should either subscrine with nosync option or delete the data from
subscriber before the snapshot is applied (if the snapshot is not configure
to truncate/delete table).
If there are any special requirements for this subscriber, pelase post the
complete info, and someone will be able to assist.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:uHJ%23ZgSkFHA.708@.TK2MSFTNGP09.phx.gbl...
> Vyas,
> Subscribing table has data because i have manually copied the data through
> stored procedure from Publising database.
> Thanks,
> Vijay
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> included
> run
> --
> --
> --
> --
> 'InfoSys_Point_of_Care_Master_Tables',
>

POSTED AGAIN- DISTRIBUTED TRANSACTION

Hi,
I have two sql servers with SQL2000 service pack 3 which are linked by the
"Link Server". When i use the "begin tran" (distributed transaction) in
stored procedure, i am getting the following error.
"Server: Msg 8525, Level 16, State 1, Line 1
Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. "
The following article talks about this problem.
http://support.microsoft.com/?kbid=834849
But, both servers are SQL 2000 in my case. Any help?
Thanks,
VijayVijay,
Try rerun the same Instcat.sql described in the kb again on each node. This
will ensure that they have the correct catalog sprocs.
-oj
"Vijay" <vijay@.infosysusa.com> wrote in message
news:%23yRbv$LBFHA.1200@.tk2msftngp13.phx.gbl...
> Hi,
>
> I have two sql servers with SQL2000 service pack 3 which are linked by the
> "Link Server". When i use the "begin tran" (distributed transaction) in
> stored procedure, i am getting the following error.
>
> "Server: Msg 8525, Level 16, State 1, Line 1
> Distributed transaction completed. Either enlist this session in a new
> transaction or the NULL transaction. "
>
> The following article talks about this problem.
> http://support.microsoft.com/?kbid=834849
> But, both servers are SQL 2000 in my case. Any help?
>
> Thanks,
> Vijay
>
>|||I don't think so. It is working for other distributed queries. Any other
solutions please?
Thanks,
Vijay
"oj" <nospam_ojngo@.home.com> wrote in message
news:%23bSADGMBFHA.1076@.TK2MSFTNGP10.phx.gbl...
> Vijay,
> Try rerun the same Instcat.sql described in the kb again on each node.
This
> will ensure that they have the correct catalog sprocs.
> --
> -oj
>
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:%23yRbv$LBFHA.1200@.tk2msftngp13.phx.gbl...
the
>|||Vijay,
What do you mean "It is working for other distributed queries". If you only
encounter the error on enlisting a distributed transaction, I suggest you
take a look at your linkedserver logins. Also, check to make sure DTC
services are using proper accounts. If they're started under LocalSystem, it
will not have access to network resources. If you are going to make any
changes to your DTC services, you will have to restart SQL server for it to
takes effect.
-oj
"Vijay" <vijay@.infosysusa.com> wrote in message
news:eKKqhVMBFHA.1992@.TK2MSFTNGP10.phx.gbl...
>I don't think so. It is working for other distributed queries. Any other
> solutions please?
> Thanks,
> Vijay
> "oj" <nospam_ojngo@.home.com> wrote in message
> news:%23bSADGMBFHA.1076@.TK2MSFTNGP10.phx.gbl...
> This
> the
>

Friday, March 9, 2012

Possible to locate active trans. log on different computer?

It does not appear possible to locate the active transaction log on a
computer other than the one on which the DB exists. Am I correct? Is there
no way to isolate the log from the box on which the data exists?
Thanks,
Randy NeallThere's an undocumented trace flag that allows you to do this. I don't
remember it off the top of my head, but I don't recommend it unless you're
in a well configured SAN environment. Even then it's not always the best
idea...
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> It does not appear possible to locate the active transaction log on a
> computer other than the one on which the DB exists. Am I correct? Is there
> no way to isolate the log from the box on which the data exists?
> Thanks,
> Randy Neall
>|||That's not possible and you don't want to do that, even if
you could.
Linchi
>--Original Message--
>It does not appear possible to locate the active
transaction log on a
>computer other than the one on which the DB exists. Am I
correct? Is there
>no way to isolate the log from the box on which the data
exists?
>Thanks,
>Randy Neall
>
>.
>|||Thanks, Brian for pointing this out! I totally forgot
about this trace flag. The trace flag is 1807, and KB
article is
http://support.microsoft.com/default.aspx?scid=304261
Linchi
>--Original Message--
>There's an undocumented trace flag that allows you to do
this. I don't
>remember it off the top of my head, but I don't recommend
it unless you're
>in a well configured SAN environment. Even then it's not
always the best
>idea...
>
>--
>Brian Moran
>Principal Mentor
>Solid Quality Learning
>SQL Server MVP
>http://www.solidqualitylearning.com
>
>"Randolph Neall" <randolphneall@.veracitycomputing.com>
wrote in message
>news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
>> It does not appear possible to locate the active
transaction log on a
>> computer other than the one on which the DB exists. Am
I correct? Is there
>> no way to isolate the log from the box on which the
data exists?
>> Thanks,
>> Randy Neall
>>
>
>.
>|||Hi Brian,
Why isn't this a good idea? The idea I had was to get the log and backups on
a completely separate box for added redundancy, saving us even if the DB box
were somehow destroyed, stolen, or if more than one drive within the DB box
failed. But you suggest, and Linchi confirms, this is a bad idea. Why?
Randy
"Brian Moran" <brian@.solidqualitylearning.com> wrote in message
news:OqOsUyZnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> There's an undocumented trace flag that allows you to do this. I don't
> remember it off the top of my head, but I don't recommend it unless you're
> in a well configured SAN environment. Even then it's not always the best
> idea...
>
> --
> Brian Moran
> Principal Mentor
> Solid Quality Learning
> SQL Server MVP
> http://www.solidqualitylearning.com
>
> "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
> news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > It does not appear possible to locate the active transaction log on a
> > computer other than the one on which the DB exists. Am I correct? Is
there
> > no way to isolate the log from the box on which the data exists?
> >
> > Thanks,
> > Randy Neall
> >
> >
>|||SQL Server log files are absolutely critical for database integrity.
Physical writes to log files must be guaranteed or committed data can be
lost and/or physical database corruption result. Standard network i/o
does not guarantee these writes and the loss of a single packet can be
disastrous. You'll need to be prepared to restore from backup in the
event of a simple network outage.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
news:uatwTCcnDHA.3304@.tk2msftngp13.phx.gbl...
> Hi Brian,
> Why isn't this a good idea? The idea I had was to get the log and
backups on
> a completely separate box for added redundancy, saving us even if the
DB box
> were somehow destroyed, stolen, or if more than one drive within the
DB box
> failed. But you suggest, and Linchi confirms, this is a bad idea. Why?
> Randy
> "Brian Moran" <brian@.solidqualitylearning.com> wrote in message
> news:OqOsUyZnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> > There's an undocumented trace flag that allows you to do this. I
don't
> > remember it off the top of my head, but I don't recommend it unless
you're
> > in a well configured SAN environment. Even then it's not always the
best
> > idea...
> >
> >
> >
> > --
> >
> > Brian Moran
> > Principal Mentor
> > Solid Quality Learning
> > SQL Server MVP
> > http://www.solidqualitylearning.com
> >
> >
> > "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in
message
> > news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > It does not appear possible to locate the active transaction log
on a
> > > computer other than the one on which the DB exists. Am I correct?
Is
> there
> > > no way to isolate the log from the box on which the data exists?
> > >
> > > Thanks,
> > > Randy Neall
> > >
> > >
> >
> >
>|||Thanks. Yes you've helped a lot. I hadn't thought of the risks of network
failure.
Randy
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:u1Ki88cnDHA.708@.TK2MSFTNGP10.phx.gbl...
> SQL Server log files are absolutely critical for database integrity.
> Physical writes to log files must be guaranteed or committed data can be
> lost and/or physical database corruption result. Standard network i/o
> does not guarantee these writes and the loss of a single packet can be
> disastrous. You'll need to be prepared to restore from backup in the
> event of a simple network outage.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> --
> SQL FAQ links (courtesy Neil Pike):
> http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
> http://www.sqlserverfaq.com
> http://www.mssqlserver.com/faq
> --
> "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
> news:uatwTCcnDHA.3304@.tk2msftngp13.phx.gbl...
> > Hi Brian,
> >
> > Why isn't this a good idea? The idea I had was to get the log and
> backups on
> > a completely separate box for added redundancy, saving us even if the
> DB box
> > were somehow destroyed, stolen, or if more than one drive within the
> DB box
> > failed. But you suggest, and Linchi confirms, this is a bad idea. Why?
> >
> > Randy
> >
> > "Brian Moran" <brian@.solidqualitylearning.com> wrote in message
> > news:OqOsUyZnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> > > There's an undocumented trace flag that allows you to do this. I
> don't
> > > remember it off the top of my head, but I don't recommend it unless
> you're
> > > in a well configured SAN environment. Even then it's not always the
> best
> > > idea...
> > >
> > >
> > >
> > > --
> > >
> > > Brian Moran
> > > Principal Mentor
> > > Solid Quality Learning
> > > SQL Server MVP
> > > http://www.solidqualitylearning.com
> > >
> > >
> > > "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in
> message
> > > news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > It does not appear possible to locate the active transaction log
> on a
> > > > computer other than the one on which the DB exists. Am I correct?
> Is
> > there
> > > > no way to isolate the log from the box on which the data exists?
> > > >
> > > > Thanks,
> > > > Randy Neall
> > > >
> > > >
> > >
> > >
> >
> >
>|||> Why isn't this a good idea?
Did you read the KB article? As I remember, it is pretty clear on the subject.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
news:uatwTCcnDHA.3304@.tk2msftngp13.phx.gbl...
> Hi Brian,
> Why isn't this a good idea? The idea I had was to get the log and backups on
> a completely separate box for added redundancy, saving us even if the DB box
> were somehow destroyed, stolen, or if more than one drive within the DB box
> failed. But you suggest, and Linchi confirms, this is a bad idea. Why?
> Randy
> "Brian Moran" <brian@.solidqualitylearning.com> wrote in message
> news:OqOsUyZnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> > There's an undocumented trace flag that allows you to do this. I don't
> > remember it off the top of my head, but I don't recommend it unless you're
> > in a well configured SAN environment. Even then it's not always the best
> > idea...
> >
> >
> >
> > --
> >
> > Brian Moran
> > Principal Mentor
> > Solid Quality Learning
> > SQL Server MVP
> > http://www.solidqualitylearning.com
> >
> >
> > "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
> > news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > It does not appear possible to locate the active transaction log on a
> > > computer other than the one on which the DB exists. Am I correct? Is
> there
> > > no way to isolate the log from the box on which the data exists?
> > >
> > > Thanks,
> > > Randy Neall
> > >
> > >
> >
> >
>|||I just did. You're right. It's clear. Thanks
Randy
"Tibor Karaszi" <tibor.please_reply_to_public_forum.karaszi@.cornerstone.se>
wrote in message news:ODUsa4enDHA.3304@.tk2msftngp13.phx.gbl...
> > Why isn't this a good idea?
> Did you read the KB article? As I remember, it is pretty clear on the
subject.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in message
> news:uatwTCcnDHA.3304@.tk2msftngp13.phx.gbl...
> > Hi Brian,
> >
> > Why isn't this a good idea? The idea I had was to get the log and
backups on
> > a completely separate box for added redundancy, saving us even if the DB
box
> > were somehow destroyed, stolen, or if more than one drive within the DB
box
> > failed. But you suggest, and Linchi confirms, this is a bad idea. Why?
> >
> > Randy
> >
> > "Brian Moran" <brian@.solidqualitylearning.com> wrote in message
> > news:OqOsUyZnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> > > There's an undocumented trace flag that allows you to do this. I don't
> > > remember it off the top of my head, but I don't recommend it unless
you're
> > > in a well configured SAN environment. Even then it's not always the
best
> > > idea...
> > >
> > >
> > >
> > > --
> > >
> > > Brian Moran
> > > Principal Mentor
> > > Solid Quality Learning
> > > SQL Server MVP
> > > http://www.solidqualitylearning.com
> > >
> > >
> > > "Randolph Neall" <randolphneall@.veracitycomputing.com> wrote in
message
> > > news:epOxPqZnDHA.2404@.TK2MSFTNGP12.phx.gbl...
> > > > It does not appear possible to locate the active transaction log on
a
> > > > computer other than the one on which the DB exists. Am I correct? Is
> > there
> > > > no way to isolate the log from the box on which the data exists?
> > > >
> > > > Thanks,
> > > > Randy Neall
> > > >
> > > >
> > >
> > >
> >
> >
>

possible to get real time transaction log replication?

hi,
i know there are a variety of 3rd party products that can accomplish this
but am curious if anyone knows of a way to accomplish this using sql? thanks.
You can tweak transactional replication to get minimum latency (very
roughly, a few secs), use log shipping (min 1 min) use distributed
transactions (immediate), or have a look at database mirroring (<1 second
ASAIK) in SQL 2005.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Under load you will be looking at 20s to 1 minute minimum for transactional.
With no load you can be looking at 2-4 secs.
Log shipping latency is greater than 1 min. typically pushing 2, but a more
practical limit is 5 minutes.
Database mirroring which ships in SQL 2005 has two modes high performance
(asynchronous) and high availability (synchronous). In high availability
mode logged operations are written on both sides (split write) which means
increased latency. A transaction is written to the source, and then written
to the destination, and then the app gets the commit. Latency can be
considerably increased depending on your throughput and other factors.
In high performance if your source goes down you can lose transactions.
Performance is better, latency can be larges, but the transactional latency
of transactions hitting your database is less.
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
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:O3dmxeVYFHA.3040@.TK2MSFTNGP14.phx.gbl...
> You can tweak transactional replication to get minimum latency (very
> roughly, a few secs), use log shipping (min 1 min) use distributed
> transactions (immediate), or have a look at database mirroring (<1 second
> ASAIK) in SQL 2005.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||thanks for the info. im looking for some sort of a synchronous solution but
im rather new to this. operating in an OLTP environment so have very little
maneuvering room in regard to latency.
what sort of 'real-world' bandwidth / latency do i need to make DTC work?
|||Can't answer this one, but using immediate updating will increase the time
required to commit a transaction on the subscriber. I have seen transactions
take from 43 to 140 ms when using immediate updating.
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
"mb" <mb@.discussions.microsoft.com> wrote in message
news:693B008E-8BE2-4D2C-BC61-737CE180ED88@.microsoft.com...
> thanks for the info. im looking for some sort of a synchronous solution
but
> im rather new to this. operating in an OLTP environment so have very
little
> maneuvering room in regard to latency.
> what sort of 'real-world' bandwidth / latency do i need to make DTC work?