1

NOTE: I've had to replace two "@" signs in a row with the string "at_at_" in order to even post this question!

Has anyone noticed that certain character combinations break the web site?

Using Chrome Version 31.0.1650.57 m.

For this question: SQL Server, how to execute a job against all databases on server?

I tried to post this as an answer:


Create a SQL Agent Job with a Job Step of type "Powershell" on the SQL Server instance where your databases reside.

# Define the query to be run against each database
$Query = "SELECT @@SERVERNAME"

# Access SQL Server information by using a drive and file system analogy
Set-Location SQLSERVER:\SQL\localhost\DEFAULT\Databases

# Get the list of databases
$DBList = Get-ChildItem

# Iterate through the list, execute your query
ForEach ( $DB in $DBList) {
    Invoke-Sqlcmd -query $Query -database $DB.Name -ServerInstance 'MyServer' -ErrorAction Stop
}

Schedule it like any other job.


When I tried to save it, I got a red "An error occurred submitting the edit." message.

I played around with it, eventually figured out that the string "@@SERVERNAME" was causing it to error (I replaced that string with a more generic one, and was able to post my answer).

Can anyone recreate?

| | | | | |
  • Can you tell us the exact text of the error message? This is much more useful than the color. – Aaron Bertrand Nov 21 '13 at 21:22
  • Added error message text to question. – peterk411 Nov 21 '13 at 21:43
  • 1
    Are you attempting to post from somewhere that could be using a filtering software like WebSense? This sounds like those kinds of shenanigans. – Tim Stone Nov 21 '13 at 21:46
  • Tim, that is an excellent point. I'm posting from the company network, and I have no doubt there is something like that in place here. I will try this again in eight hours from my home network, and report back here. – peterk411 Nov 21 '13 at 21:50
  • 4
    This question appears to be off-topic because the cause has been determined to be unrelated to the Stack Exchange network platform. – Jon Seigel Nov 25 '13 at 18:17
2

No. I just edited your answer and added @@SERVERNAME. Worked fine. Also in inline code: @@SERVERNAME and code blocks:

SELECT @@SERVERNAME;

Try it after disabling all browser add-ons/extensions/plug-ins.

| | | | | |
  • Test case: edit this question to have problem string in the text and/or title. I disabled all extensions, restarted Chrome, tried to commit edit, same error. Disabled all plug-ins, restarted Chrome, tried to commit edit, same error. Emptied cache and deleted cookies, restarted Chrome, tried to commit edit, same error. – peterk411 Nov 21 '13 at 21:41
  • We can't reproduce. We'll escalate to the core team on meta for further checking on this. – jcolebrand Nov 21 '13 at 21:44
2

I believe Tim Stone correctly identified the probable cause in a comment: network filtering software. I was encountering this error on my company's network, and I am certain it is using network filtering software. I used the same laptop that was encountering the error message from my employer's company network, and accessed the site from a home network, and now there is no problem committing changes with @@SERVERNAME in the text, title, or edit comment.

It looks like overzealous protection against SQL injection attacks by network filtering software is the culprit.

This does not appear to be a StackExchange bug, or if it is, it's hard to see how the StackExchange team could do much about it. Although if they could, that would be awesome.

| | | | | |
  • The only fix we could possibly do would be something like base64 encoding the text of the post prior to submitting it, then decoding on our end - but that's not very likely to happen. Just tossing it out as a tool you could conceivably use if you've got middleware or something hanging off the network that the IDS won't let you use properly (been in your situation before, irritating!) – Tim Post Nov 22 '13 at 13:39

Not the answer you're looking for? Browse other questions tagged .