Linqpad running custom code before each query - linqpad

I almost ran a query i did not want to against a production db today.
As such i would like to check before all my queries that this.Connection.DataSource is not my production database... and if it is then show a messagebox warning me.
Is this possible?

Check out the latest beta. You can now flag connections as 'Production' and you'll see an orange warning banner in the editor margin whenever you use that connection:

Related

ADF Azure data Factory debug not running saved changes

Anyone see this behavior? For example here is my code in an activity....#{concat(
substring(activity('GetMaxDate').output.firstRow.MAX_DATE,0,4)
This IS saved. Multiple times. But when I run in debug this is what is run...
#{concat(\n substring(activity('GetMaxDate').output.firstRow.MAX_DATE,1,4)\n ,'
It's running the prior version (0,4) instead of the new version (1,4). I first noticed this because I changed the name of the activity and debug still ran the old name. This seems like new problem I've not had before. If I publish and run it as trigger it picks up the change. It's just debug that's not picking it up. This seems an inexcusable bug. This is 101 functionality folks.
Any suggestions? Should this be logged with Microsoft as bug?
Additinal option to Gary's comment:
C) Rename your pipeline, save, run debug. Rename back after.
This worked for me.
Seen this cache behavior in the past. Preview query shows cached data from source table even though the source table data was completely changed.
Deleting the pipeline,dataset.. and creating new pipeline solved the issue for me.
Seems this happenens when the debug is being used too many times. Recommend to log this behavior as a bug.

Error disabling scheduled query: Error updating disabled property. Please try again later

When I try to disable a scheduled query in BigQuery web interface, I get this error:
Error updating disabled property. Please try again later.
I think that previously I made this kind of updates without problems... The "solution" I found is to remove the scheduled query, but in fact, I don't want to lose the query. Is this a new bug of this functionality or am I missing something?

SSDT Schema Compare keeps finding differences for users?

The title says it all but for further details. When i use the schema compare tool in VS2015 for my SSDT Project and my database on a server. The compare results always come back with the Users as being different. I check the differences it speaks about but there is not a single difference between the environments.
I even went as far as updating my project from the compare results to try and correct these "differences". I then ran another compare and the same users came back with differences again... WHAT! haha.
Anyone have a clue what would cause this sync issue or am i doing something wrong? The users were added manually to the database on the server rather then thru SSDT deployment so maybe that is a reason?
EDIT:
Please hit the arrow on the left of the user differences found. You will see a properties folder and the missing login which is the real difference. If you go Schema Compare Options -> Object Types (tab) -> Non-Application-scoped -> Logins to add Login object type to your comparison then your issue will be resolved.
Logins objects
Although I consider this a bit of a workaround (I haven't found a real solution to get rid of the Users from the comparison even when they're indentical), it's the best I've found. Simply exclude Users from the comparison.
You can access this menu by clicking the gear icon on the Schema compare window and expanding the Application-scoped object and unchecking Users (or indeed anything you else you want to exclude).
When I drill into the schema compare under Change > User > Properties > Spanner icon, I can see this difference:
Source (SQL Azure) Target (Project)
============= ===================
UserType=2 UserType=0
What does this mean? I googled to no avail.
Updating doesn't fix it. Deleting the user script from the project and Updating doesn't either.
I can't find UserType in the source code so this must be generated internally by the compare.
In Visual Studio 2017 at least (and it looks like option is in 2015 as well), try going to Schema Compare options and under the "General" tab, untick the option "Ignore login SIDs".
I had this same problem with a user (where there wasn't a login defined for the user), and unticking this option resolved the problem for me. I still picked up actual correct user changes, but for existing users that are unchanged, the comparison no longer shows a bogus item.

How do you bulk update issues in YouTrack?

In Youtrack I would like to move all open issues from one sprint into a new sprint.
Can I bulk update issues using the command dialog? Or do I have to click on all the issues individually to update their sprint values?
Using Alex's answer I was able to move multiple issues from one sprint to another. Adding step by step incase it helps anyone else.
Filter all the open, in progress, blocked and submitted issues with the following command: Sprint: {oldSprint} State: Submitted State: Open State: {In Progress} State: Blocked
On the issue list select all the issues - thanks Alex
Click the command dialog button in the header, and select open command dialog.
In the command dialog type Sprint Unscheduled Sprint newSprint**. This'll first unassign the issue from the old sprint then assign it to the new sprint.
** Important note: On newer YouTrack versions, the command is Sprints, the full command would be Sprints Unscheduled Sprints newSprint.
On issue list, you can select multiple issues issues and apply a command to all of them.
You can also do this from an agile board, by selecting multiple issues and pressing ctrl+alt+J to get a command window to act on all of them at once. Then fill in your command, such as the one given in #Paul. B's answer to do what you wish with them!

Pentaho report contents not getting displayed in Pentaho user console? Why ? please answer

I'm facing an error with a .prpt file.
While running the prpt in report designer it just works fine .
But when the same prpt ran in PUC (user console), the report contents are not displayed.
It is a simple report containing total 8 columns with only text and number fields in the detail section and only labels (formulated also) in headers.
Please help with your valuable tips
Check the server logs - there'll be an exception. I've seen this before - frequently it is due to layout issues, not sure why but for some reason in some cases the server bombs, yet the client does manage to render it. Double check the obvious like overlapping elements etc.
Also check the version of your PRD client, and the exact version of the reporting libraries on the server, they MUST match.
I've seen this happen when you have a prpt file that was created in an older (or newer) version of PRD than the server. You'll get javascript errors and onscreen you'll just see a blank page/tab. Make sure your version of PRD matches the server version.