473,722 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Long query rollback - can I rename the table?

I have a long query which I have set off and would like to stop, and
rename one of the tables used.

My query is due to my lack of understanding of the underlying
structure of MSSQL-Server...

So say and update updates TABLE_A and I stop it, whilst this
transaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLD
and rename a different table to become TABLE_A. I am assuming that
the rollback actions will use the object reference of TABLE_A_OLD and
continue to rollback the effects on the correct table and not corrupt
'new' TABLE_A... or will it not allow me to rename TABLE_A until the
rollback is complete?

Thanks for any help!

Steve

Mar 8 '07 #1
1 5747
So say and update updates TABLE_A and I stop it, whilst this
transaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLD
and rename a different table to become TABLE_A. I am assuming that
the rollback actions will use the object reference of TABLE_A_OLD and
continue to rollback the effects on the correct table and not corrupt
'new' TABLE_A... or will it not allow me to rename TABLE_A until the
rollback is complete?
I would expect that the rename will be blocked until the rollback completes.
The rename requires a schema modification lock, which is incompatible with
the locks held on TABLE_A by the open transaction.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"cheesey_toasti e" <bl************ @yahoo.co.ukwro te in message
news:11******** **************@ h3g2000cwc.goog legroups.com...
>I have a long query which I have set off and would like to stop, and
rename one of the tables used.

My query is due to my lack of understanding of the underlying
structure of MSSQL-Server...

So say and update updates TABLE_A and I stop it, whilst this
transaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLD
and rename a different table to become TABLE_A. I am assuming that
the rollback actions will use the object reference of TABLE_A_OLD and
continue to rollback the effects on the correct table and not corrupt
'new' TABLE_A... or will it not allow me to rename TABLE_A until the
rollback is complete?

Thanks for any help!

Steve
Mar 8 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
11704
by: Tuhin Kumar | last post by:
Hi, Is It possible to disable rollback in Oracle 9i. I am running it in a loop deleting 2000 records at a time. The maximum performance I am able to get is 3 lakhs records in 20 minutes. I am looking forward to 1 million in 10 minutes, but it seem because of rollback been enabled I am unable to do so. Is there any other way also to improve the deletion rate. Thanks, Tuhin
0
4610
by: Rick Razzano | last post by:
I am seeing some strange behavior in sql server. Running a procedure with a table variable, selecting from the table, and exiting the loop will cause a rollback statement to be issued (which you can see in profiler). However, using a temp table does not show the same behavior. The object that sql server is issuing the ROLLBACK against is something called "TVQuery". Has anyone else encountered this? It trips some alarms that I have on...
8
89312
by: Lauren Quantrell | last post by:
In VBA, I constructed the following to update all records in tblmyTable with each records in tblmyTableTEMP having the same UniqueID: UPDATE tblMyTable RIGHT JOIN tblMyTableTEMP ON tblMyTable.UniqueID = tblMyTableTEMP.UniqueID SET tblMyTable.myField = tblMyTableTEMP.myField, tblMyTable.myField2 = tblMyTableTEMP.myField2,
2
7458
by: Robin Tucker | last post by:
I have a query batch "update" script that upgrades my users database from, say version 0 to version 1, or from version 1 to version 2. I would like to know how I can wrap the entire script in a transaction, so that either the whole thing succeeds or none of it does. For example: BEGIN TRANSACTION ..... ..... Alter some tables
3
1827
by: Adam | last post by:
Hello, I have a 2 column file that looks like this: VALUE1 | VALUE2 12 | 7 10 | 7 9 | 8 10 | 8 11 | 8 6 | 9 8 | 9
1
10518
by: Michel Rousseau | last post by:
I have created a table through a query. How can I create a new query which will create the exact same table but rename some of the field names? Thanks. Michel Rousseau *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
9
2467
by: Frawls | last post by:
Hi I Am am having problems with a stored Procedure that i wrote. Basically whats happening is that the Stored procedure Runs fine when i EXECUTE it in SQL Query analyzer. But when i debug through the application in Visual Studio .NET 2003 the application an exception when it executes the query.
16
3507
by: ARC | last post by:
Hello all, So I'm knee deep in this import utility program, and am coming up with all sorts of "gotcha's!". 1st off. On a "Find Duplicates Query", does anyone have a good solution for renaming the duplicate records? My thinking was to take the results of the duplicate query, and somehow have it number each line where there is a duplicate (tried a groups query, but "count" won't work), then do an update query to change the duplicate to...
3
2499
by: sparks | last post by:
After changing all the variables in a table from long to double. you get 9.1====becomes==== 9.19999980926514 ok I checked microsoft and they had a workaround. export the values to excel...then import them back into the new table. well I tried that and get the same thing. is there a work around for the work around LOL
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9238
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4502
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.