Duplicate step entries in SSMS Job History Log File Viewer - sql-server

I'm seeing duplicate entries by Step ID in the SSMS Job History Log File Viewer. This is only happening in one of my jobs. In the duplicates, one is marked as complete, and the other as still running.
The duplicate running step has a message with a bunch of version trademark information, nothing helpful.
Any ideas on why I'm getting the duplicated steps in this job, and how to get rid of them?

Check if "Include step output in history" is checked.
Goto your job -> properties -> steps (select one) -> edit -> advanced -> uncheck "include step output in history" if it's there.

Apparently this is a behavior of SSMS version 18. They switched the icon from a ribbon to a green "play" icon whenever you check the "Include step output in history" checkbox. That was very confusing to me too! And in my case, the job step with the extra green play icon has nothing useful in the history details either. It simply has the usual header info and then "Message" with nothing after that (in my case it's a step that runs some Powershell code to update AD). It would be nice to have something after message, pertaining to the job step that ran! But there is nothing useful to me. Be well, Raphael.

Related

Salesforce Debug Levels - Need to edit or delete existing level

Can we manage Debug levels in Salesforce?
Delete or Edit or at least Rename existing debug level?
I have created a new debug level but missed something and now would like to either change levels to what I need, delete it and create a new one, or rename it to JUNK_whatever and create a new one.
Neither of these options seems to be available. Maybe I simply didn't find it?
P.S. I don't currently have any user trace flags or debug logs.
Thank you!
Yes, you can edit and delete DebugLevels.
From UI perhaps easiest is to use the Developer Console (upper right corner, gear/cog icon). Debug -> Change Log Levels -> Add/Change. Highlight (click) the row you want and remove. It's bit finnicky but it works.
.
You can do it from setup too but I think it shows up only in Classic interface. Switch and type "debug levels" or try https://{my domain here}.my.salesforce.com/7dl
Last but not least you could fire a Tooling API query on the table and then it's a HTTP DELETE request sent to v55.0/tooling/composite/sobjects?ids=recordId. You may need Postman, SoapUI or Workbench for that.

Copy/Paste, Delete option not working in SQL Management Studio

I was trying to copy and paste some queries and noticed that the paste option is not working. After that I realized that my copy, paste, delete and next line option is not working at all. What will be the reason for this issue.
When you press the Ctrl key, the text editor is looking for a mouse click to "Go to Definition".
Tools>Options>Text Editor>General> Uncheck "Enable mouse click to perform Go To Definition"
(or you can change the modifier key to something you use less often if you want to continue using this feature)
What, exactly, are you trying to copy, and from where? For instance, if you're attempting to copy and paste tables, views or stored procedures (etc) in the Object Explorer, you'll have no luck.
For most of these items, you should be able to right-click, select "Script [Table | View | Stored Procedure ] As > CREATE TO > New Query Editor Window", then run the script.
Unfortunately(?), SSMS isn't as easy going as Microsoft Access, there's definitely a little work involved.
just experienced the same situation in SSMS v18.5!
Also wasn't able to paste/copy code in the Query's Window.
After playing around and restarting the App it wouldn't work.
I did not have issues copying/pasting in all other applications.
Then I found a solution myself by simply thinking about how to "re-init" the engine of Copy/Paste in SSMS:
Go to: Tools | Options | General | Check "Apply Cut or Copy to blank lines when there is no selection".
After applying the "fix" you should be able to copy/paste again! You may reset the checkmark later.
Hope you other guys have the same luck!
Edit: A few hours later the Copy/Paste again was not working and the fix did not work. I found out that a separate instance of Visual Studio had the same copy/paste problem. So it may be either a Windows 10 or .NET problem.
A reboot helped me in that case.
I encountered this problem too, and got a message saying my pc was out of memory. This could be caused by too many apps being open or too many background processes running.
Simply restarting the pc resolved the problem.

How can I keep SSMS Find and replace in files "Look In" from changing

In SSMS when I do a
Find and Replace in Files
(default keystroke CTRL+SHIFT+H)
Edit > Find and Replace > Replace in Files
If I set the "Look In" to "Current Document" then do a change and select the Replace All button, the Look In dropdown changes to select
All Open Documents
How can I keep Look In set to whatever I previously have selected? I want to KEEP it set to Current Document
Frankly this behavior is super annoying.
This appears to be an unresolved bug.
https://connect.microsoft.com/SQLServer/feedback/details/2593572/ssms-2016-rc2-find-and-replace-window-reverts-to-all-open-documents-are-replacing-all-within-the-current-document
Attempted to submit feedback on that issue on that site but frankly the site UI and attempts to use it were horrid and would not even allow me to submit feedback or comments. Thanks Microsoft for that mess.
Found 2593572 but in
Microsoft SQL Server Management Studio 13.0.16106.4
this still exists. This site UI is pretty horrid BTW with "Please Wait...." all over then, after logging in would not even allow comments etc.
So simply closing this question per that; I might consider other tools besides SSMS as a "workaround".
EDIT: As icing on the cake attempted to submit a comment to the posted site admin email at the bottom of the pages:
Message not delivered Your message couldn't be delivered to
datpconn#microsoft.com because the remote server is misconfigured. See
technical details below for more information.
A workaround for this that works for me; open another query window and leave it blank. When you do a replace it defaults to "All Open Documents" instead of "Entire Solution".

Log to text file - items in Progress Tab of SSIS Package

In SSIS, i need to write into a log, whatever items get displayed on the Progress tab. Is there an inbuilt feature to do this? i tried the logging option but it logs too many details and the log is pretty huge for a single package run.
i need only whatever gets logged on the Progress tab to be logged on to a text file when the package undergoes a scheduled run through Sql server agent
Here is a possible solution.
You have an option at DTEXEC at the command-line. There is a switch called /Reporting or /Rep for short.
I found it here
This link says the same.
This is your question in MSDN. Its pretty useless since they suggest you turn on logging, which you've already done. I thought I should add it anyways for completeness.

How to solve TFS error TF246021 and SQL Server error 500200 while checking in?

I'm trying to check in a file, and one file (one and only one file) has a problem while being checked in. This file has been deleted many times and undeleted (due to a conflict in architecture and design) and now TFS throws this error:
TF246021: An error occurred while processing your request. Technical
information (for administrator): SQL Server Error: 500200
As we saw the log file of the Event Viewer, the problem is:
Violation of PRIMARY KEY constraint 'PK_tbl_PendingDelta'. Cannot
insert duplicate key in object 'dbo.tbl_PendingDelta'.
However, there is no pending changes in dbo.tbl_PendingDelta. In fact, this table is completely empty. What's wrong here? How can I solve this problem?
This seems to be related to the workspace. I had this problem on one workspace but was able to perform the source control operation that triggered the error (rollback a previous rollback) in a different workspace without any problems.
Recreating your workspace might be a solution.
1.From the File menu, click Source Control, and then click Workspaces.
2.In Manage Workspaces dialog box, under the Name column, highlight the workspace that you want to remove, and then click Remove.
3.In the Confirmation dialog box, click OK.
your work is done.
And map your solution again then you can work properly.
My solution was to exclude the culprit and check in the rest.
I then checked in the culprit.
( If you have a gated checkin you might have to turn that off first. )
I suspect that somehow the items in the change set use the same ID twice, so the first INSERT is fine but the second will cause the violation. However, since they're in the same transaction, the first INSERT is rolled back and you don't see anything in tbl_PendingDelta afterwards.
See http://connect.microsoft.com/VisualStudio/feedback/details/693450/tfs-2010-violation-of-primary-key-constraint-pk-tbl-pendingdelta for another example of this issue.
I think you should take this up with Microsoft Product Support Services.
I had something similar happen. Previously I had rolled back some changes and was reintroducing those changes in the solution and project files again with the same name. The problem that I found was a sql script rename was not in the Sql.proj file and I needed to add it and then close the solution to accept the changes to the proj file. Once I corrected the rename, made sure that it was in the project file, then I could check it in.
I renamed my workspace folder (the top level containing $tf) then did a get latest on the branch I wanted, then the unshelve worked.
In my case, a file that I had deleted was causing the problem. On Go Online file selection dialog, I unchecked the culprit file and the project was successfully made online.
Update
Just noticed the error code is slightly different in op's question. Mine was showing an error code as SQL Server Error: 18054.

Resources