Tuesday, March 27, 2012
Do I need to use "dbcc shrinkfile" command to shrink the transaction log?
Q1. my database use "simple" recovery mode now. but i found that
the transaction log is still growth ... about 50Mb per day (database
size is about 1GB)... i found some forum said "if choose simple
recovery mode, no need to shrink the database" <- is it right?
Q2. If i create the maintenance plan, should i choose "reorganize data
and index pages", "update statistics used by query optimizer" and
"remove unused space from database files" (my database is "simple"
recovery mode) ?
Q3. or i just use schedule job to run a "dbcc shrinkfile" command and
backup the tran log to keep the size of tran log (my database is
"simple" recovery mode) ?
Q4 is "dbcc INDEXFRAG" commnad useful to keep the size of transaction
log (use the command with "dbcc shrinkfile" and backup tran log) '
any risk using "dbcc indexfrag?
Need your help ! thx a lot!
Kennethsee inline
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"chunman" <chunman@.iloveilove.com> wrote in message
news:3990957.0401280216.1035f23@.posting.google.com...
> HI,
> Q1. my database use "simple" recovery mode now. but i found that
> the transaction log is still growth ... about 50Mb per day (database
> size is about 1GB)... i found some forum said "if choose simple
> recovery mode, no need to shrink the database" <- is it right?
If your database was at some point in full recovery mode, and you have
switched to simple, you should probably use shrinkfile to reduce the size of
the log. Even if the db has ALWAYS been in simple recovery mode, all
transactions are logged, then the log is automatically truncated during
checkpoints. However the log must STILL grow to be large enought to handle
the largest single transaction you ever do ( plus everything else that
occurs during the largest transaction.). That might explain the size of your
log...
> Q2. If i create the maintenance plan, should i choose "reorganize data
> and index pages", "update statistics used by query optimizer" and
> "remove unused space from database files" (my database is "simple"
> recovery mode) ?
It is a normal index maintenance item to work on indexes... The reorg data
and index pages uses dbcc dbreindex ( which essentially drops and re-creates
all of the indexes.) the tables will be un-available during this time. A
less instrusive way to do index maintenance is to create a job that does
DBCC indexdefrag.. Indexdefrag attempts to do (essentially) the same thing
as dbreindex, but does not hold locks as much, so the tables will be more
available.
Index stats are automatically re-done when indexes are dropped/recreated.
However if you do index maintenance rarely, you may wish to update
statistics in-between index maintenance schedule times. Some people do this,
others do not, and reasonable people differ in their opinions. I try to do
index statistics with 100 sample as often as possible when the database
tables are being changed frequently.
The remove space is only necessary if you have deleted lots of records... I
choose NOT to have that in the plan, but to monitor that separately and make
my own decision (instead of automating this one).
> Q3. or i just use schedule job to run a "dbcc shrinkfile" command and
> backup the tran log to keep the size of tran log (my database is
> "simple" recovery mode) ?
If your database has always been in simple recovery mode, and you use
shrinkfile, it will probably re-grow to that same size as before whenever
the biggest transaction runs...
> Q4 is "dbcc INDEXFRAG" commnad useful to keep the size of transaction
> log (use the command with "dbcc shrinkfile" and backup tran log) '
> any risk using "dbcc indexfrag?
>
No, it is OK to use indexdefrag instead of dbreindex ( Many people do.)
> Need your help ! thx a lot!
> Kennethsql
Do I need to use "dbcc shrinkfile" command to shrink the transaction log?
Q1. my database use "simple" recovery mode now. but i found that
the transaction log is still growth ... about 50Mb per day (database
size is about 1GB)... i found some forum said "if choose simple
recovery mode, no need to shrink the database" <- is it right?
Q2. If i create the maintenance plan, should i choose "reorganize data
and index pages", "update statistics used by query optimizer" and
"remove unused space from database files" (my database is "simple"
recovery mode) ?
Q3. or i just use schedule job to run a "dbcc shrinkfile" command and
backup the tran log to keep the size of tran log (my database is
"simple" recovery mode) ?
Q4 is "dbcc INDEXFRAG" commnad useful to keep the size of transaction
log (use the command with "dbcc shrinkfile" and backup tran log) '
any risk using "dbcc indexfrag?
Need your help ! thx a lot!
Kennethsee inline
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"chunman" <chunman@.iloveilove.com> wrote in message
news:3990957.0401280216.1035f23@.posting.google.com...
quote:
> HI,
> Q1. my database use "simple" recovery mode now. but i found that
> the transaction log is still growth ... about 50Mb per day (database
> size is about 1GB)... i found some forum said "if choose simple
> recovery mode, no need to shrink the database" <- is it right?
If your database was at some point in full recovery mode, and you have
switched to simple, you should probably use shrinkfile to reduce the size of
the log. Even if the db has ALWAYS been in simple recovery mode, all
transactions are logged, then the log is automatically truncated during
checkpoints. However the log must STILL grow to be large enought to handle
the largest single transaction you ever do ( plus everything else that
occurs during the largest transaction.). That might explain the size of your
log...
quote:
> Q2. If i create the maintenance plan, should i choose "reorganize data
> and index pages", "update statistics used by query optimizer" and
> "remove unused space from database files" (my database is "simple"
> recovery mode) ?
It is a normal index maintenance item to work on indexes... The reorg data
and index pages uses dbcc dbreindex ( which essentially drops and re-creates
all of the indexes.) the tables will be un-available during this time. A
less instrusive way to do index maintenance is to create a job that does
DBCC indexdefrag.. Indexdefrag attempts to do (essentially) the same thing
as dbreindex, but does not hold locks as much, so the tables will be more
available.
Index stats are automatically re-done when indexes are dropped/recreated.
However if you do index maintenance rarely, you may wish to update
statistics in-between index maintenance schedule times. Some people do this,
others do not, and reasonable people differ in their opinions. I try to do
index statistics with 100 sample as often as possible when the database
tables are being changed frequently.
The remove space is only necessary if you have deleted lots of records... I
choose NOT to have that in the plan, but to monitor that separately and make
my own decision (instead of automating this one).
quote:
> Q3. or i just use schedule job to run a "dbcc shrinkfile" command and
> backup the tran log to keep the size of tran log (my database is
> "simple" recovery mode) ?
If your database has always been in simple recovery mode, and you use
shrinkfile, it will probably re-grow to that same size as before whenever
the biggest transaction runs...
quote:
> Q4 is "dbcc INDEXFRAG" commnad useful to keep the size of transaction
> log (use the command with "dbcc shrinkfile" and backup tran log) '
> any risk using "dbcc indexfrag?
>
No, it is OK to use indexdefrag instead of dbreindex ( Many people do.)
quote:
> Need your help ! thx a lot!
> Kenneth
Wednesday, March 7, 2012
Distrubuted Transactions with AS400
I have created stored procs that update SQL and AS400 (Linked server)
tables. I want to wrap both updates in a transaction, however when I do, I
get the error
"The operation could not be performed because OLE DB provider "MSDASQL" for
linked server "LinkedServerName" was unable to begin a distributed
transaction".
We are using Client Access ODBC driver (V5R2, SI06631).
All of the documents that I have read talk about MTS and MS DTC.
MS DTC is running on the SQL Server.
Is there any way of using Distributed Transaction processing without
requiring MTS ?
Thanks in advance.not enough info on the error.
here:
http://support.microsoft.com/kb/306212
you may want to look at the full error when you talk to DB2. like so
DBCC TRACEON (3604, 7300)
then run your sp and seewhat it does.
did you try just issue
BEGIN DISTRIBUTED TRAN
and see if the 2 data sources you are working with can be accessed?
and you the same authentication your application is going to call your sp
with.
Thanks, Liliya
"Jane" wrote:
> Hi All
> I have created stored procs that update SQL and AS400 (Linked server)
> tables. I want to wrap both updates in a transaction, however when I do, I
> get the error
> "The operation could not be performed because OLE DB provider "MSDASQL" for
> linked server "LinkedServerName" was unable to begin a distributed
> transaction".
> We are using Client Access ODBC driver (V5R2, SI06631).
> All of the documents that I have read talk about MTS and MS DTC.
> MS DTC is running on the SQL Server.
> Is there any way of using Distributed Transaction processing without
> requiring MTS ?
> Thanks in advance.|||Thanks for the response.
Yes - used the same auth as the app will use (windows auth)
Yes - just used BEGIN DISTRIBUTED TRAN
Used DBCC TRACEON (3604, 7300) & SET XACT_ABORT ON as per the link in a
Query Window then ran the updates again.
Ran DBCC TRACESTATUS (3604,7300) to check that the flags for the session
were set.
Still failing & still no extra error information.
Under "Configuration Issues" the link states ;
"Start the Distributed Transaction Coordinator (DTC or MSDTC) on all servers
that are involved in the distributed transaction".
I am not sure what needs to running on the AS400 for this to work.
"l" wrote:
> not enough info on the error.
> here:
> http://support.microsoft.com/kb/306212
> you may want to look at the full error when you talk to DB2. like so
> DBCC TRACEON (3604, 7300)
> then run your sp and seewhat it does.
> did you try just issue
> BEGIN DISTRIBUTED TRAN
> and see if the 2 data sources you are working with can be accessed?
> and you the same authentication your application is going to call your sp
> with.
> Thanks, Liliya
>
> "Jane" wrote:
> > Hi All
> >
> > I have created stored procs that update SQL and AS400 (Linked server)
> > tables. I want to wrap both updates in a transaction, however when I do, I
> > get the error
> > "The operation could not be performed because OLE DB provider "MSDASQL" for
> > linked server "LinkedServerName" was unable to begin a distributed
> > transaction".
> > We are using Client Access ODBC driver (V5R2, SI06631).
> > All of the documents that I have read talk about MTS and MS DTC.
> > MS DTC is running on the SQL Server.
> >
> > Is there any way of using Distributed Transaction processing without
> > requiring MTS ?
> >
> > Thanks in advance.|||OLEDB Errors in SQL Profiler shows ;
<hresult>-2147168246</hresult>
<inputs>
<punkTransactionCoord>0x624A0060</punkTransactionCoord>
<isoLevel>4096</isoLevel>
<isoFlags>0</isoFlags>
<pOtherOptions>0x00000000</pOtherOptions>
</inputs>|||> I am not sure what needs to running on the AS400 for this to work.
depend on what are you running on AS400. DB2 version. Here. how to set up
mts (0you have mentioned this one earlier in this thread)
http://www-03.ibm.com/servers/enable/site/db2/mts/mts.pdf
as about ms sql server side, it does not hurt to test if your sql side is
ok. Easy enough as long as you have couple ms sql's on the same domain etc.
if not, can install one on your ws, configure it and see if you can issue
distributed transactions. After all, it will give you a 'lab rat' s well to
experiment if you in need of one.
Thanks, Liliya
Saturday, February 25, 2012
Distribution Job Step Retries all in one connection and/or transaction?
When a distribution job step "Retry Attempts" is > 0 and the step has certain problems, the step is "retried" after "Retry Interval".
But I am uncertain as to the details. Are the retries within one database transaction? Does each "try" get its own transaction? And what about connection? Is the "retry" done with the same connection? I know this may sound funny but I would like to know exactly what is going on here.
Thanks,
I am pretty sure that each retry spawns its own transaction - any failed attempt will rollback the current transaction. And the retry is done in the same connection unless it's a retry due to a connection issue. I can try to clarify later.Distribution db doesn't show up after enabling transactional repl
publication wizard..' to create my transaction replication (I took the
default settings), it finished successfully. When I check the database
listing in EM, the 'distribution' database doesn't show up in the list but
the physical .mdf and .ldf files do exist. I thought this is strange, I
went ahead to disable the publication and thought I could start over again
but it gave me an error message " Eror 945: Database 'distribution' cannot be
opened dur to inaccessible files or insufficient memory or disk space'. We
are out out of space or memory. I stop by restart SQL service but it didn't
help. Can anyone help?
Wingman
Do you have the show system databases enabled? This could account for the
invisibility of it. I would clear up space on your machine and then try to
disable publishing.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"Wingman" <Wingman@.discussions.microsoft.com> wrote in message
news:8A3D4193-03DC-4D43-A3D5-A7FE0D2E97CB@.microsoft.com...
> We are using SQL 2k with SP4. After I used the 'Create and Manage
> publication wizard..' to create my transaction replication (I took the
> default settings), it finished successfully. When I check the database
> listing in EM, the 'distribution' database doesn't show up in the list but
> the physical .mdf and .ldf files do exist. I thought this is strange, I
> went ahead to disable the publication and thought I could start over again
> but it gave me an error message " Eror 945: Database 'distribution' cannot
> be
> opened dur to inaccessible files or insufficient memory or disk space'.
> We
> are out out of space or memory. I stop by restart SQL service but it
> didn't
> help. Can anyone help?
> Wingman
Distribution database of Transaction Replication publication being marked SUSPECT by recov
I have a Publication created for Transactional Replication. All the
while working fine.
Now it failed and I am not able to access to the database at all. It
shows the following error message:
Error 926: Database 'distribution' cannot be opened. It has been
marked SUSPECT by recovery. See the SQLServer error log for more
information.
Tried to detach the database but getting the following error: -
"The database cannot be detached while it is being replicated"
Tried running DBCC CheckDB but cannot run with database still in
suspect mode
Basically I cannot perform backup on it, cannot detach it, cannot even
drop the publication.
Tried also the following method:
1) sp_resetstatus DISTRIBUTION
Prior to updating sysdatabases entry for database 'DISTRIBUTION', mode
= 0 and status = 24 (status suspect_bit = 0).
No row in sysdatabases was updated because mode and status are already
correctly reset. No error and no changes made.
2) DBCC CHECKDB ('DISTRIBUTION', REPAIR_REBUILD) WITH ALL_ERRORMSGS
Server: Msg 926, Level 10, State 1, Line 1
Database 'distribution' cannot be opened. It has been marked SUSPECT
by recovery. See the SQL Server errorlog for more information.
Anybody know what cause all this and how to resolve it? Please
help!!!!!
I need to make the Replication running back soonest possible.
Thanks/TewI have seen this behavior once before. The only way we could get it out of
suspect mode was to directly update the sysdatabases table and set the
status to 32768 (emergency bypass). After recycling SQL Server we were then
able to run Checkdb. You might find corruption in the database. If not you
can set the status back to 0 and see if it will recover normally.
Rand
This posting is provided "as is" with no warranties and confers no rights.
Distribution Database Log File Growth
SQL Server 2000 | Transactional Replication
Suspected Problem: Distribution Database Transaction Log Not Checkpointing
I have a distributor with a distribution database that keeps growing and growing (About 40 GB in 7 days). The database is using the SIMPLE recovery model but the log continues to accumulate data. I have spent time looking at articles such as: "Factors that keep log records alive" (http://msdn2.microsoft.com/en-us/library/ms345414.aspx) and the one thing that stands out is the Checkpoint. I noticed that I can run a manual checkpoint and clear the log. If the log records were still active, the checkpoint would not allow the log to be truncated. This leads me to believe that the server is not properly initiating checkpoints in the Distribution database even though Recovery Model = SIMPLE and the server Recovery Interval = 0.
I found this: "FIX: Automatic checkpoints on some SQL Server 2000 databases do not run as expected" (http://support.microsoft.com/kb/909369/en-us) but I suspect this is a followup to a problem that may have been introduced with SP4 (since SP4 is a requirement for the hotfix). I am running SP3a (Microsoft SQL Server 2000 - 8.00.850) so I don't think that is the issue. I have several other nearly identical servers with the same version and configuration that have properly maintained log files.
SP4 is not a good option for me at this point - the next upgrade will be to SQL 2K5.
Any thoughts?
Jeff
I solved my own problem. The log file growth had nothing to do with it being the Distribution database. I stumbled upon a trace flag entry in the SQL Startup Parameters "-T3608" which is required to move certain system databases like Model (See article: http://support.microsoft.com/kb/224071/). The flag has been there for several months and was probably added the last time the server was rebuilt or storage was added. I removed the trace flag and checkpoints started occuring normally.
Distribution Database Log File Growth
SQL Server 2000 | Transactional Replication
Suspected Problem: Distribution Database Transaction Log Not Checkpointing
I have a distributor with a distribution database that keeps growing and growing (About 40 GB in 7 days). The database is using the SIMPLE recovery model but the log continues to accumulate data. I have spent time looking at articles such as: "Factors that keep log records alive" (http://msdn2.microsoft.com/en-us/library/ms345414.aspx) and the one thing that stands out is the Checkpoint. I noticed that I can run a manual checkpoint and clear the log. If the log records were still active, the checkpoint would not allow the log to be truncated. This leads me to believe that the server is not properly initiating checkpoints in the Distribution database even though Recovery Model = SIMPLE and the server Recovery Interval = 0.
I found this: "FIX: Automatic checkpoints on some SQL Server 2000 databases do not run as expected" (http://support.microsoft.com/kb/909369/en-us) but I suspect this is a followup to a problem that may have been introduced with SP4 (since SP4 is a requirement for the hotfix). I am running SP3a (Microsoft SQL Server 2000 - 8.00.850) so I don't think that is the issue. I have several other nearly identical servers with the same version and configuration that have properly maintained log files.
SP4 is not a good option for me at this point - the next upgrade will be to SQL 2K5.
Any thoughts?
Jeff
I solved my own problem. The log file growth had nothing to do with it being the Distribution database. I stumbled upon a trace flag entry in the SQL Startup Parameters "-T3608" which is required to move certain system databases like Model (See article: http://support.microsoft.com/kb/224071/). The flag has been there for several months and was probably added the last time the server was rebuilt or storage was added. I removed the trace flag and checkpoints started occuring normally.
Distribution database became large
I have noticed that distribution database which is used for transactional
replicatiton became large. Can I shrink the database? Transaction log is the
same size as the data file. I run dbcc loginfo(distribution), status field
shows that there are a lot of unused parts. Can I shrink transaction log at
least?
I would make sure the distribution database is in Full recovery model and
dump it frequently.
It is wise to try to size the transaction logs to prevent frequent
autogrows, and it is also wise to try to keep them as small as possible. You
will have to experiment to find the ideal size. 10% of the size of the data
files is frequently as good guess for smaller databases.
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
"Elena" <Elena@.discussions.microsoft.com> wrote in message
news:ADDC4A92-A5A4-4EE5-877A-754D307AC251@.microsoft.com...
> Hi,
> I have noticed that distribution database which is used for transactional
> replicatiton became large. Can I shrink the database? Transaction log is
> the
> same size as the data file. I run dbcc loginfo(distribution), status field
> shows that there are a lot of unused parts. Can I shrink transaction log
> at
> least?
>
|||Hi, Hilary,
1. Why do you suggest having distribution database in Full recovery model?
2. Is it worth to shrink transaction log of the distribution database? I
guess it has grown up in special case when there was very large transaction
to be delivered.
"Hilary Cotter" wrote:
> I would make sure the distribution database is in Full recovery model and
> dump it frequently.
> It is wise to try to size the transaction logs to prevent frequent
> autogrows, and it is also wise to try to keep them as small as possible. You
> will have to experiment to find the ideal size. 10% of the size of the data
> files is frequently as good guess for smaller databases.
> --
> 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
> "Elena" <Elena@.discussions.microsoft.com> wrote in message
> news:ADDC4A92-A5A4-4EE5-877A-754D307AC251@.microsoft.com...
>
>
|||1. because I like to maintain the size of my tlogs as much as possible. Full
does this. You can use bulk which offers best performance (except for
deletes) but you have no recoverability. Likewise you can use simple with no
recoverability but the transaction log can grow and as the log grows you get
performance degradation. With Full Recovery model you can set the size to
something and get recoverability and minimize auto grow.
2) Once it is sized adequately you should not have to shrink it. Right now I
think its a must to conserve space and to get a very slight performance
improvement.
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
"Elena" <Elena@.discussions.microsoft.com> wrote in message
news:CBCAAB13-58C6-407A-A338-040B37BA5961@.microsoft.com...[vbcol=seagreen]
> Hi, Hilary,
> 1. Why do you suggest having distribution database in Full recovery model?
> 2. Is it worth to shrink transaction log of the distribution database? I
> guess it has grown up in special case when there was very large
> transaction
> to be delivered.
> "Hilary Cotter" wrote:
|||Thanks, Hilary,
Your answers were very helpful.
Elena
"Hilary Cotter" wrote:
> 1. because I like to maintain the size of my tlogs as much as possible. Full
> does this. You can use bulk which offers best performance (except for
> deletes) but you have no recoverability. Likewise you can use simple with no
> recoverability but the transaction log can grow and as the log grows you get
> performance degradation. With Full Recovery model you can set the size to
> something and get recoverability and minimize auto grow.
> 2) Once it is sized adequately you should not have to shrink it. Right now I
> think its a must to conserve space and to get a very slight performance
> improvement.
> --
> 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
> "Elena" <Elena@.discussions.microsoft.com> wrote in message
> news:CBCAAB13-58C6-407A-A338-040B37BA5961@.microsoft.com...
>
>
Sunday, February 19, 2012
Distributed transactions: ITransactionJoin error on two 2003 Servers
transaction across a linked server. Both servers are Windows 2003 (pre
SP1) servers, and both are running SQL Server 2000 SP3a. I am getting
the following error message:
Server: Msg 7391, Level 16, State 1, Line 4
The operation could not be performed because the OLE DB provider
'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the
specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
I have checked loads of KB articles, and other newsgroup answers and
have come up with the following ideas, all of which I've done on both
machines:
1. Enabled network DTC access on both machines
2. Ensured network and XA transactions are checked in security
configuration
3. Ensured DTC is running on both machines
4. Set the port ranges to 5000-5020 in COM Internet Services Properites
(although firewall is off)
5. Ensured both machines can ping each other by Netbios names
6. Turned off RPC Security on both machines (setting in registry)
7. Set on RPC and RPC Out in Linked server settings
8. Rebooted (many times) both machines
If anyone has any other ideas I can try (apart from changing the code,
as we have to do things this way, it's not all our code) then let me
know as I am pretty much stuck.
Thanks for your help!
Aron Cox,
Hampshire, UKI am working in the same problem. See KB839279. If you change
Transaction Manager Communication to "No Authentication Required" it
works but your not authenticating. I also read somewhere that changing
the account from Network Service to Local System, it may work.
*** Sent via Developersdex http://www.developersdex.com ***
Distributed transactions with multiple instances of Microsoft SQL Server
I'm having a problem running a distributed transaction between two
linked servers that both have multiple instances of SQL Server
installed on them. This is the error message that I receive:
"The operation could not be performed because the OLE DB provider
'SQLOLEDB' was unable to begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in the
specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a]."
The query follows the format:
"BEGIN DISTRIBUTED TRAN
UPDATE [LINKEDSERVER1\INSTANCE_NAME].DB.OWNER.TABLENAME
SET fieldname = alias2.fieldname
FROM tablename alias2
JOIN [LINKEDSERVER1\INSTANCE_NAME].DB.OWNER.TABLENAME alias1
on alias2.urn=alias1,urn"
>From what I can gather from various sources the SQL Server must be
named the same as the computer which it is installed on. However, if I
have two instances of SQL Server, they cannot both be named the same as
the computer. Does anyone know of a way around this or whether I'm
barking up the wrong tree completely?
Many thanks.Assuming that you can query the linked server successfully (ie run a
SELECT query), then the issue may be DTC rather than the instance names
- there are a number of possible reasons for the error:
http://support.microsoft.com/kb/306212
http://support.microsoft.com/kb/816701
http://support.microsoft.com/kb/839279
Simon|||Thanks! This one fixed it: http://support.microsoft.com/kb/816701. I
was using Windows 2003 server which has DTC access disabled by default.
Distributed transactions bet linked servers
I checked the DTC on both ends to be on but I am still getting this message
when running an insert
New transaction cannot enlist in the specified transaction coordinator.
Thanks,
--
bicDid you enable Network DTC Access? I did it under 2003 Server but had to do
it again after installing SP1.
http://support.microsoft.com/default.aspx?scid=kb;en-us;329332
"bic" wrote:
> hi anyone,
> I checked the DTC on both ends to be on but I am still getting this message
> when running an insert
> New transaction cannot enlist in the specified transaction coordinator.
> Thanks,
> --
> bic
Distributed transactions bet linked servers
I checked the DTC on both ends to be on but I am still getting this message
when running an insert
New transaction cannot enlist in the specified transaction coordinator.
Thanks,
bic
Did you enable Network DTC Access? I did it under 2003 Server but had to do
it again after installing SP1.
http://support.microsoft.com/default...b;en-us;329332
"bic" wrote:
> hi anyone,
> I checked the DTC on both ends to be on but I am still getting this message
> when running an insert
> New transaction cannot enlist in the specified transaction coordinator.
> Thanks,
> --
> bic
Distributed transactions bet linked servers
I checked the DTC on both ends to be on but I am still getting this message
when running an insert
New transaction cannot enlist in the specified transaction coordinator.
Thanks,
bicDid you enable Network DTC Access? I did it under 2003 Server but had to do
it again after installing SP1.
http://support.microsoft.com/defaul...kb;en-us;329332
"bic" wrote:
> hi anyone,
> I checked the DTC on both ends to be on but I am still getting this messag
e
> when running an insert
> New transaction cannot enlist in the specified transaction coordinator.
> Thanks,
> --
> bic
Distributed Transactions
OPENDATASOURCE, but can I
1. run transaction on set of operations made on fifferent databases
running on the same sql server
2. run transaction on set of operations made on different databases
running on different sql server
M.Hi
Have you looked at using linked servers and the documentation on "BEGIN
DISTRIBUTED TRANSACTION" in Books online?
John
"MerlinXP" <MerlinXP_NOSPAM@.NOSPAM_poczta.onet.pl> wrote in message
news:u7pV4sHBGHA.3064@.TK2MSFTNGP10.phx.gbl...
>J can touch data from different database and different serwer using
>OPENDATASOURCE, but can I
> 1. run transaction on set of operations made on fifferent databases
> running on the same sql server
> 2. run transaction on set of operations made on different databases
> running on different sql server
> M.
Distributed Transactions
OPENDATASOURCE, but can I
1. run transaction on set of operations made on fifferent databases
running on the same sql server
2. run transaction on set of operations made on different databases
running on different sql server
M.
Hi
Have you looked at using linked servers and the documentation on "BEGIN
DISTRIBUTED TRANSACTION" in Books online?
John
"MerlinXP" <MerlinXP_NOSPAM@.NOSPAM_poczta.onet.pl> wrote in message
news:u7pV4sHBGHA.3064@.TK2MSFTNGP10.phx.gbl...
>J can touch data from different database and different serwer using
>OPENDATASOURCE, but can I
> 1. run transaction on set of operations made on fifferent databases
> running on the same sql server
> 2. run transaction on set of operations made on different databases
> running on different sql server
> M.
Distributed Transactions
OPENDATASOURCE, but can I
1. run transaction on set of operations made on fifferent databases
running on the same sql server
2. run transaction on set of operations made on different databases
running on different sql server
M.Hi
Have you looked at using linked servers and the documentation on "BEGIN
DISTRIBUTED TRANSACTION" in Books online?
John
"MerlinXP" <MerlinXP_NOSPAM@.NOSPAM_poczta.onet.pl> wrote in message
news:u7pV4sHBGHA.3064@.TK2MSFTNGP10.phx.gbl...
>J can touch data from different database and different serwer using
>OPENDATASOURCE, but can I
> 1. run transaction on set of operations made on fifferent databases
> running on the same sql server
> 2. run transaction on set of operations made on different databases
> running on different sql server
> M.
Friday, February 17, 2012
DISTRIBUTED TRANSACTION with OLE DB Jet
I set up an Access 2003 MDB file as a linked Server on SQL Server 2000.
I like to use it to sync entries between SQL Server and the MDB Database.
For this purpose I like to use a DISTRIBUTED TRANSACTION.
But this is the result I get when I use COMMIT TRANSACTION at the end.
<eb1>The current transaction could not be exported to the remote provider.
It has been rolled back.
State: 42000, Native: 8524, Source: Microsoft OLE DB Provider for SQL
Server</eb1>
Thanks for any help
Regards
Patrick
Please reply to group, rather than mail ad patrickwolf - netJET does not support distributed transactions, therefore this will always
fail.
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2005 All rights reserved.
"Patrick Wolf" <pwolf@.SeeSig.Invalid> wrote in message
news:OIgjIYOZFHA.3852@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I set up an Access 2003 MDB file as a linked Server on SQL Server 2000.
> I like to use it to sync entries between SQL Server and the MDB Database.
> For this purpose I like to use a DISTRIBUTED TRANSACTION.
> But this is the result I get when I use COMMIT TRANSACTION at the end.
> <eb1>The current transaction could not be exported to the remote provider.
> It has been rolled back.
> State: 42000, Native: 8524, Source: Microsoft OLE DB Provider for SQL
> Server</eb1>
> Thanks for any help
> Regards
> Patrick
> --
> Please reply to group, rather than mail ad patrickwolf - net
>|||> JET does not support distributed transactions, therefore this will always
> fail.
Thank you Gert. Its a pity but its good to know :)
distributed transaction with loopback linked server
I am wondering if there is workaround for distributed transaction query in
loopback linked server.
ThanksNo, they are just not supported.
"JohnC" <JohnC@.discussions.microsoft.com> wrote in message
news:E68993B5-D1EA-4AA6-B6DF-BDCA4B3ADE9A@.microsoft.com...
> Folks,
> I am wondering if there is workaround for distributed transaction query in
> loopback linked server.
> Thanks
>
Distributed transaction with clustering server
My alternative option is to remove a pair of
"begin/commit tran" statements.
I tried without "begin/commit trans" to fail joined-tables
update from two linked servers, and it can prevent
asynchronized transaction on that table update, and thus
preserve transactional consistency. Maybe
that "begin/commit tran" has been implicitly enclosed!
Does anyone know why?
Regards,
Alfred XYZ
>--Original Message--
>I can't perform a distributed transaction between a
remote
>server to the central server.
>I have 3 sql server 2000 enterprise edition. 2 of them
are
>installed on win2K server (LOCAL1, LOCAL2) and the other
>(CENTRAL_SQL) is installed on clustering win2K server.
>None of them is in domain.
>Linked servers are defined well between them and I can
>perform select statement from any server to any other
>server.
>I can also perform a distributed transaction between the
>remote servers, from LOCAL1 to LOCAL2 and contrarily:
>set xact_abort on
>begin distributed tran
>select count(*) from
>LOCAL1.tempdb.INFORMATION_SCHEMA.TABLES
>commit
>set xact_abort off
>MSDTC service starts up with local system account or
other
>administrators belonging account.
>I can also ping the local servers from the central and
>even manage them using the Active Directory.
>When I perform a distributed transaction between a remote
>server (LOCAL1 or LOCAL2) and the central server I get an
>error:
>Server: Msg 7391, Level 16, State 1, Line 5
>The operation could not be performed because the OLE DB
>provider 'SQLOLEDB' was unable to begin a distributed
>transaction.
>[OLE/DB provider returned message: New transaction cannot
>enlist in the specified transaction coordinator. ]
>OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
>ITransactionJoin::JoinTransaction returned 0x8004d00a].
>What am I doing wrong?
>Thanks,
>Yuval Peleg
>DBA, Nice Systems
>.
>
We solved the problem by organizing the DNS addresses at all servers:
The clustering server is our Domain Controller, so it has to contain the
addresses of all participant servers: itself physical nodes, its virtual
address and the remote SQL server addresses.
At the local servers we signed, in TCP/IP properties, the first node of the
clustering server as the "preferred DNS server" and the second node the
"alternate DNS server".
"Alfred XYZ" <alfredxyz@.hotmail.com> wrote in message
news:0ee901c4d5f6$fc1fa560$a501280a@.phx.gbl...[vbcol=seagreen]
>I also got the same issue in my company's system.
> My alternative option is to remove a pair of
> "begin/commit tran" statements.
> I tried without "begin/commit trans" to fail joined-tables
> update from two linked servers, and it can prevent
> asynchronized transaction on that table update, and thus
> preserve transactional consistency. Maybe
> that "begin/commit tran" has been implicitly enclosed!
> Does anyone know why?
> Regards,
> Alfred XYZ
> remote
> are
> other