Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Non-printable characters in SQL Scripts out...
Non-printable characters in SQL Scripts out of SSMS?
Rate Topic
Display Mode
Topic Options
Author
Message
rschaeferhig
rschaeferhig
Posted Friday, September 04, 2009 7:30 AM
SSChasing Mays
Group: General Forum Members
Last Login: Wednesday, December 14, 2011 12:03 PM
Points: 613,
Visits: 119
We're seeing wierd things in SSMS using the "Script as Create" function. For example using this capability on a Stored Procedure resulted in:
-- Calculate net revenue
ACK SET @NetResult=@FiscalYear-@PriorFiscalYear
Where "ACK" is actually the ASCII x06 character.
Any idea where these are coming from?
I reject your reality and substitute one of my own. - Adam Savage-Mythbuster
Post #782888
Elliott Whitlow
Elliott Whitlow
Posted Friday, September 04, 2009 7:42 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 12:02 PM
Points: 5,854,
Visits: 4,873
I would guess they were in the original script that created it. You could interogate syscomments and see if it is in the system table (ok view) and I suspect it is. If it is then I would wager heavily on it being in the original script.
CEWII
Post #782900
Grant Fritchey
Grant Fritchey
Posted Friday, September 04, 2009 9:05 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 8:46 AM
Points: 13,371,
Visits: 25,147
Hmmm... No. I haven't seen that one. Is it possible that there's a difference in the server or database collation? That might lead to something like this.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #782999
rschaeferhig
rschaeferhig
Posted Friday, September 04, 2009 9:29 AM
SSChasing Mays
Group: General Forum Members
Last Login: Wednesday, December 14, 2011 12:03 PM
Points: 613,
Visits: 119
The procedure was originally developed by hand in SSMS (New Stored Procedure). I don't think the developer typed in a hex 06 while he was typing the code...
The developer "corrected" the function so now the character is not there. We're going to restore the db and look at information_schema.routines to see if it shows up in the text. That will tell us whether its in the actual definition of the procedure or if its an artifact of the scripting process...
More to follow.
I reject your reality and substitute one of my own. - Adam Savage-Mythbuster
Post #783012
Grant Fritchey
Grant Fritchey
Posted Friday, September 04, 2009 9:36 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 8:46 AM
Points: 13,371,
Visits: 25,147
Ah, you know what it might be? One guy in my office (and he's the only one for some reason), has a lot problems with files getting saved with the wrong encoding. Happens to him all the time (again, he's the only one), but when he saves a file with some messed up code page and then runs it against the server, we get odd, really odd, characters in the code running on the machine. Usually it results in compile time errors when he tries to run the code, but ocassionally stuff slips through.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #783022
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.