This morning I needed to update some bad address's in our production DB. I ran this query in ISQLW:
UPDATE mytable SET city = 'blah' WHERE city <> 'blah'
GO
it should have been:
UPDATE mytable SET city = 'blah' WHERE city <> 'blah' AND name = 'blah'
GO
So I basically started updating my entire DB rather than just a handful of records. The query seemed to be running too long (30seconds) then I noticed and clicked the Cancel button. Does this transaction get rolled back when you click cancel? Im not sure where to look to see if the rollback occurred.?
I do have a way to re-update all the address's and a backup but Ive never restored and Im not sure I even need to. I could also run a query to group all the address's but it will be very difficult to tell what got updated. Where talking about 500k records.
HelloI have a SQL 2000 server, the server setting is default language :French and all Collation names in FrenchIf i launch the 'Query Analyzer' from the SQL Entreprise Manager on mydatabase, and run a T-SQL my dates are in English.If i do a : DBCC USEROPTIONS, my results arelanguageus_englishdateformatmdyNow if i launch 'Query Analyzer' from the startup menu, my date formatis ok in French, if i do DBCC USEROPTIONS, results are:languageFrançaisdateformatdmyIn the Query Analyzer i checked the option in Tools>Options>Connections(Use regional settings is unchecked) and they are the same in both case.How can i resolve my problem ?Thanks
Every time i run this I get a window listing all of the switches for isql and the -Q is not listed. Can someone please send me some insight on this. Jim
Hello,I notice that the name of the Query Analyzer program (formerlyknown as ISQL/W) is still isqlw.exe in SQL Server 2000. I amcurious as to where the name ISQL/W came from.Feedback welcome,Best Regards,Neil
HiI'm expecting the answer no here but its worth asking.If I wanted to test an arbitary program could I somehowsay in query analyser, start a global transaction on thisdatabase, run my tests, then at the end roll it back from withquery analyser?I know I can use backup and restore but this would beeasier, still, again, I don't think you can do this.TaF
hey. I have a formview - inertitemtemplate. In here I have a button with CommandName="Insert". In code behind under FormView1.ItemInserting I want to be able to abort the inserting in some cases. Is this possible?
I have taken over a very bad SQL Server database design and the database has been in operation for almost 3 years with any service packs, therefore last night I installed SQL Server pack 2 and this morning I got the following error messages: (isqlw.exe - Entry Point Not Found The procedure entry points? Stroage Type@CDataCtlStroage @@UAEJX2 could not belocated in the Dynamic Link Library SQLGUI.dll) This errors comes any time I connect to the Query Analyzer this is very urgent can anyone help me out please, I shall remain.
Hi there,I tried to install MS SQL Server 2000 on my desktop computer afteruninstalling a version 7 instance. Everything worked fine. UsingEnterprise Manager I can manage databases and the database enginge itself.My problem is now, that ISQLW.exe, i.e Query Analayzer won't start. Thetaskmanager shows a process isqlw.exe but nothing happens. MSSQL Logfiles give no hints, neither does the Windows 2000 event log.I assume a problem with the previously installed MSSQL7 version, butwalked through the registry as well.Are there any hints why isqlw doesn't want to speak to me?Thanks,Andre
On several occasions I have experienced crashes while running an SSIS package in debug mode. It happens when I start process on Control Flow table and click on Data Flow tab to monitor progress. I have forwarded the error reports and have searched the boards for similar references. Is this problem going to be fixed?
SSIS Data Sources
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Standard Edition on Windows NT 5.0 (Build 2195: Service Pack 4) ----------------------
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86)
Mar 23 2007 16:28:52
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Visiual Studio 2005 Professional SP1 SP.050727-7600 .NET Framework 2.0.50727
Can someone who knows a lot more about this than me please tell why, when the following code executes, I get a pop-up window telling me the usage of isqlw.exe?
I've also tried it with a space in between the - switch and also with quotes around the switch arguments. I've put the entire path in just the StartInfo.FileName instead of switching the working directory as well. I can't for the life of me get it to actually fire off this command for some reason.
p.s. I've also tried using "/"s instead of "-"s as well.
We are using MSDTC to handle our transactions and some clients seem to be getting these errors more and more when we went to framework 2.0. Any ideas what could be causing this?
Before in framework 1.1 we would ask our clients to re-register their computer into the domain and/or rename their computer and this worked but it seems like in framework 2.0 it doesn't do the trick. Also, the wrong dns setup causes this too but after trying to fix both things it still doesn't work. I believe this error means either the server has finished the transaction and can't find the client to return the result or the active directory account/computer account is corrupted. Any ideas?
The transaction has already been implicitly or explicitly committed or aborted.
Type: TransactionException StackTrace: Server stack trace: at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException) at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts) at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx) at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx) at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction) at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open()
I have a long query which I have set off and would like to stop, andrename one of the tables used.My query is due to my lack of understanding of the underlyingstructure of MSSQL-Server...So say and update updates TABLE_A and I stop it, whilst thistransaction is rolling back I attempt to rename TABLE_A to TABLE_A_OLDand rename a different table to become TABLE_A. I am assuming thatthe rollback actions will use the object reference of TABLE_A_OLD andcontinue 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 therollback is complete?Thanks for any help!Steve
In sql ce 2.0 in window ce 2003, I use isqlw20.exe to create database and table. Developed application with eVC++ 4.0
Now I have to use window mobile 5, VS 2005 for native C++ development, sql server mobile edition, but I can't found isqlw for this version of sql. I do not have sql server install in my desktop PC. So how could I create database and table with the pocket pc's database ?
Context: I have a web page that uplaods a file that is then imported to the database via an SSIS package.
Problem: If and when the package encounters an error, I want to surface that error to the user via the web page.
Approach: I derived my own class from the DefaultEvents class and then overrode the OnError event handler to catch any errors raised during package execution. I then pass my class to the package Execute method.
Results: The OnError is triggered, but I don't know how to abort package execution nor how to pass the error context to the user. I tried raising a custom exception in the OnError handler, but it failed to propogate to the calling code (ie the code that executes the package).
Another approach would be to write to a database table and then do a query from my web page after the package is done executing (alternatively, I could generate a log file). Seems like a lot of work though. All I want is to pass the error context back to my calling code so I can tell the user what happened.
I am using the sample SSIS Event Log reports provided by Microsoft: http://www.microsoft.com/downloads/details.aspx?familyid=526e1fce-7ad5-4a54-b62c-13ffcd114a73&displaylang=en
The Event Log Summary report is showing a negative value for #Abort. Why is the aborted count negative?
I'm using isqlw to generate delimited text files from scripts. There are several SET options available so that you can restrict the output to just the data in the script, for example SET NOCOUNT ON.
I can't find a similar SET option to suppress the column headings, although there is a tickbox that allows you to do this in Query Analyzer (Query -> Current Connection Options -> Advanced -> Print Headers)
DTS packages appear to support this, yet I can't find the setting from a dts file.
Hi Guys, I have a SQL block which I want to run based on some values in the DB ----------------- I am implementing the check as follows.. --------------------- PRINT 'Checking the DATABASE name and Schema Version '
SET NOCOUNT ON CREATE TABLE chkversion (table_name VARCHAR(30), id INT, reason varchar(200)) GO
DECLARE @MSG CHAR(1) print @MSG GO
/* Make sure user is running the right script and right db user */
declare @ver varchar(100), @username varchar(100), @cnt int begin select @ver = value from propertytable where id = 33086 select @cnt = count(*) from propertytable where parentid=5001 and propertyid = 726; select @username = db_name(dbid)from master.dbo.sysprocesses where status ='runnable' insert into chkversion (table_name, id, reason) values ('', -1, 'You are logging on Database - ' + @username) insert into error_report (table_name, id, reason) values ('', -1, 'Your agile database version is ' + @ver) if (@ver != '9.0.144'or @cnt !=0) begin insert into chkversion (table_name, id, reason) values ('', -1, 'STOP: Your Schema Version and/or database version are not at original 90SP2. Please abort!') end else insert into chkversion (table_name, id, reason) values ('', -1, 'PROCEED: You can run this script to upgrade your db schema from 9.0.144 to 9.0.178') end GO
DECLARE @MSG CHAR(200) SELECT @MSG = convert(varchar(255), reason) from chkversion where id = -1 print @MSG GO
DECLARE @MSG CHAR(1) print @MSG GO SET NOCOUNT OFF ---------------------------------------------------------- After this, I want user to press 1 to continue or CTRL +C to abort based on the output message from above. How Do I implement this feature? In Oracle, I use... Accept agproceed number prompt 'Enter 1 to continue or CTRL C to abort.';
Hello experts, I made a huge mistake on a production server, ran an update without the WHERE clause. UPDATE myTableSET Field1 = 'SOmetext',Field2 = 'sometext2'Is there a way to rollback? I read something a while ago about transaction logs.SOS!Thanks
HI, Suppose I execute any transaction say inserted some rows. I want to delete my previous transaction using rollback. What is the proper syntax for that. In Query Window: Insert ---------- executed rollback. it was asking for name of the transaction. How to give that. Help me out Thanks Bye
This is my stored procedure. Problem is that a rollback does not happen when there is an error ? How can this be, am starting and ending the transaction?
I have rollback on one of the users. I tried killing her process through Enterprise Manager and Query Analyzer, but I still can see her process on the screen. However, her login is grayed out after I execute the kill query.
I have encountered this problem several times, and the only way I can get clear the rollback is by rebooting the server.
Does anyone have a sugeestion on how to clear the rollback without rebooting.
Hi All A question on DTS ROLLBACK CAPABILITY. Is it possible to setup a DTS pkg to roll back the loaded files if a step fails? If a step fail records inserted by Data Pump to a table should be removed. Is this possible? If so how can we achieve this?
is it possible to roll back a transaction here? i heard that it will be possible only if we wrote the code only in certain block.please tell me the block.
The code inserts into table TABLES. TABLES has a primary key. If the insert statement has no error it should insert 'ROWS INSERTED' to table CONTROL and update table DATETRACKING else insert 'ROWS NOT INSERTED' to table CONTROL and do not update table DATETRACKING. 1- I will like to improve my code if it is possible. 2- Can I use a rollback?
DECLARE @ROWCOUNT INT DECLARE @ERROR INT DECLARE @LASTDT DATETIME
SET @LASTDT =GETDATE() BEGIN TRAN insert tables select 4
SELECT @ROWCOUNT = @@ROWCOUNT, @ERROR = @@ERROR IF (@ERROR <> 0) BEGIN INSERT CONTROL SELECT 'ROWS NOT INSERTED', @ROWCOUNT END ELSE BEGIN INSERT CONTROL SELECT 'ROWS INSERTED', @ROWCOUNT END COMMIT TRAN
IF (@ROWCOUNT > 0) BEGIN UPDATE DATETRACKING SET LASTDATEDL = GETDATE() END