Scrambled T-SQL in SSMS

So, I have been working on some code all morning, saving as I went, and I left my desk for a lunch break. No transactions were open, I have no encryption ANYWHERE in the domain, noone used my PC and when I get back I have this: alt text

Similar effect on all tabs.

I have closed and opened tabs and they stay the same. I have copied text out of the editor into Notepad and it pastes in plain text. Pasting this back in though, and it goes all scrambled again.

Does anyone have any ideas what has happened to me and how I can get out of this situation please?

more ▼

asked Sep 15, 2010 at 05:29 AM in Default

avatar image

Fatherjack ♦♦
43.8k 79 99 118

installed any SQL 3rd party tools?

Sep 15, 2010 at 05:47 AM Cyborg

yes. RedGate SQL Toolbelt

Sep 15, 2010 at 05:52 AM Fatherjack ♦♦

@Fatherjack Well, at least you know that 6(/(&7 means select, that is for sure :)

Sep 15, 2010 at 07:44 AM Oleg

@Fatherjack Seriously, I just ran some tests and it appears that the problem is that every character in your scripts got shifted to the left by 61 (decimal), so letter s (ascii 115) became 6 (ascii 54) , letter e (ascii 101) became ( (ascii 40) etc. That info could be useful to RedGate.

Sep 15, 2010 at 07:48 AM Oleg

@Fatherjack So for now if you need to salvage everything that you have, all you need to do is copy the text from each window into varchar(max) variable and add 61 to each letter's code. At least this way you will have all your queries quickly restored while the problem is being sorted out.

Sep 15, 2010 at 07:51 AM Oleg
show all comments (comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Have you verified the collation? In SQL Server 2008 you can specify a default collation for each new database you create.

more ▼

answered Sep 21, 2010 at 02:24 PM

avatar image


heh, no its not collation. This happen in the SSMS editor window while I was at lunch. The screen shot there is actually TSQL that has for some reason and by some process been mangled by the editor. It hasnt happened since so is, at this point in time, wholly unexplained. A reboot fixed it.

Sep 22, 2010 at 01:31 AM Fatherjack ♦♦

@Fatherjack - I didn't realise you worked for the armed forces!! I saw that advert on the telly where the 'tech' fixed the computer by turning it off and back on again. I cringed and went a bit wrinkly...

Sep 22, 2010 at 01:39 AM Matt Whitfield ♦♦

@Matt - not seen that advert, sounds classy though.

Sep 22, 2010 at 01:41 AM Fatherjack ♦♦
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Sep 15, 2010 at 05:29 AM

Seen: 1804 times

Last Updated: Sep 15, 2010 at 05:29 AM

Copyright 2017 Redgate Software. Privacy Policy