We're encountering a strange issue with SQL Server 2014, whereby agent jobs that utilize datetime parameters are having their values altered every time someone clicks 'Ok' on the job step configuration.
The month and day are being swapped around with datetime parameters being passed in the following format "dd/MM/yyyy hh:mm:ss" . This alteration happens every single time the configure job step box is confirmed out of - regardless if the value of the parameter has been changed by the user or not.
Initially because we're based in the UK - I thought that this might just be a display formatting issue - however upon confirming both my regional settings and that of the server, that does not appear to be the case.
Additionally these phantom alterations are actually taking affect within the job step command line, as verified by checking:
select command from [msdb].[dbo].[sysjobsteps]
This seemed like a potential bug - brought on by our latest round of patching, but after rolling back those patches - we still have the same issue.
I couldn't find any mention of such a bug anywhere by searching, so perhaps I'm missing something obvious.
Does anyone have any ideas?
Related
I am trouble shooting an error in a package.
Update MYTABLE for MYCOLUMN (REF to task name):Error: Executing the query "..." failed with the following error: "Invalid column name 'MYCOLUMN'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
I have verified the table and column exists, the length of the field is way excessive than what it needs that is 14 where it is declared as varchar(250).
I have verified the script works on the server in SSMS outside of the context of the package.
I have verified the connection and database in the package is as I expect.
Is there away to verify on the server. I did try to look at the Connection Managers tab on the package configuration itself i.e. in the Integration Services Catalogs->SSISDB->solutionfolder->..->package.dtsx->Configure context menu but it is empty.
Any ideas on how to troubleshoot?
Just to add more context the package contains 27 other tasks, 9 tasks in a row linked to this task but all set to on completion, all seem to be doing stuff independent of the other. 1 task is a loop doing stuff and the rest are single independent tasks. So I don't know at this stage if it is a cascading connection issue perhaps however; I am just reading what the log says.
I kicked off the package at 9:54am, the timestamp on the error log says 11:45am so nearly 2 hours into running is this log reported.
I would suggest the below things to troubleshoot the issue.
I would suggest you to just have this task and disable all other
tasks to troubleshoot the issue. So that you can focus on this issue
specifically. That will tell you whether connection is working fine
without issues.
I would suggest you to edit the task and see whether parameters are
set properly. Different providers have different way of setting
parameters. Again check whether parameters are proper. Execute SQL
Task
one more thing, may be you are pointing the package to different
connection than the one you used for SSMS. So, it is working in SSMS
and in the connection being used in the package is not having schema
changes yet done.
I finally figure it out before I read the previous offered suggestion so will give some credit if I can! FYI: We have a lot of dev servers. I clicked on the overview hyperlink in the All Execution logs and it said another server. Also I found the connection on the job calling the package not the package itself so I have learnt something today. Anyhow the job said one server but the overview said another so I again I was back to square one scratching my head.
Then I decided to open the connection manager on the job and select the field and make no change rather then cancelling I clicked ok not thinking about it and noticed the field changed to bold face. So I am assuming if you make a manual change on the server in SSMS to anything it shows up in bold which is kind of useful. So I can only assume this is a MS SSMS or SSIS or VS deployment bug. That it does not overwrite, the previous connection although the SSMS interface says otherwise. Perhaps somebody can share some light. Having not checked the server before I made a change and deployed it I have no idea if the previous settings were changed manually by someone or the connection in the package was changed and deployed. Anyhow checking the job history shows it had been failing for awhile so it wasn't me so whoever and whenever a change was done by a previous developer didn't figure it our either or didn't bother or did not know how, or didn't observe it. Anyhow it is pointing to the correct server now!!!
I am using SQL Server Reporting Services 2012 and received this error without any known cause: The report execution eqaiekfzmk2snc55y0zrow55 has expired or cannot be found. (rsExecutionNotFound).
While I have found other posts describing problem through Google searches, the resolutions did not help me:
Restarting SQL Server, SQL Server Agent, and SQL Server Reporting services
Increasing the Execution Timeout through SQL Server Management Studio when connected to the Reporting server
Adding rs:ClearSession to the URL querystring (and trying IE, Chrome, and Firefox)
Redeploying after each troubleshooting step and retesting
I looked in the Reporting Services log file folder C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\LogFiles but I see the datestamp is over two months old and I could see nothing related to the symptom.
I looked looked in ExecutionLog3 and did not see anything related to the symptom. use ReportServer; select * from ExecutionLog3;
To find out what did work, I verified that:
The query and results are sound, as seen in Management Studio
I can preview the report in Data Tools on the server
I can view the report when remoting into the server
I only see the error when viewing the page from outside the server. This is a relatively lightweight query and result set, so I cannot believe that this problem has anything to do with execution timeouts.
I changed the name of the file and redeployed. I am able to see that report now, but this isn't a true resolution because I still don't know what is truly causing the problem and how to fix it. If the symptom appears again, I can't keep changing the filename and redeploy.
Is there a way to get a better idea of what is happening? A specific log file or a property I need to change?
Update:
I thought I had this problem worked out, but apparently not. I found nothing useful in the error logs: only a restatement of the same error message visible in the browser. When I redeploy (using SQL Server Data Tools), the error goes away... for a few hours or until the next day, when I need to redeploy to make the error go away.
I know this is an old question but I had this problem recently and it turned out to be a bad session cookie. The cookies session-id matched the guid in the error message and once I deleted the cookie all worked fine after that. The report at one point had been configured to cache a temporary copy
but that had since been turned off (however, the problem existed before that had been turned off so it may not be relevant).
Hopefully this answer will help someone else save the hour I spent figuring it out in my environment :)
This might help someone.
In my case, The report url had trailing spaces (a silly mistake) which caused this.
I've added &rs:Command=ClearSession to the end of my url and works fine with me.
As stated in a different answer you can clear the session which usually resolves this issue.
If you have a question mark in your URL already then add the following to the end.
&rs:Command=ClearSession
If you do not have one then you need to add the following to the end.
?rs:Command=ClearSession
I just had this problem, it was for an existing report that had been working correctly. However, the Report Builder had been open for some time in another window while I was working on something else, and I hadn't saved my work (I was applying a filter, and didn't want to save my changes with my test filter). It occurred to me that since the report HAD been working, but it had been sitting idle, it might have gone stale. I opened the Dataset Properties, clicked Query Designer, then "Run Query". The Query Designer then got a fresh request from the data source. I closed the Dataset Properties window and clicked "Run", and my report was again displayed.
For me, I had no trailing space.
Some people had luck with clearing Session.Keys of "Microsoft.Reporting.WebForms.ReportHierarchy"
I solved it by Session.Clear in the global.asax
For us, the error appeared trying to run a report on an SSRS 2016 server using Internet Explorer 11. The user had created a bookmark that linked directly to the report. What may have happened: IE preserves cookies and temporary internet files for favorites to "help them load faster". The user may have initially ran the report, then created the bookmark to the report which contained session information.
To fix: Delete the bookmark, then cleared browser history in IE (CTL+SHIFT+DEL) being sure to uncheck "Preserve Favorites website data".
Amazon recently announced support for time zone change in Oracle RDS.
Since this is still not supported for Microsoft SQL Server 2012, are there any workarounds, to obtain functionality similar to changing the whole database time zone?
Since you're asking for workarounds...
We basically totally disregard server time/database time zone and work entirely off of UTC. GetUtcDate() for instance for all 'DateCreated' columns. Since we've committed to that approach we just don't bump up against any issues.
If you need to store the time zone alongside your date data, you can use DateTimeOffset.
The one caveat is that maintenance plans will be run on server time. This has not been an issue because we normalize everything to local time (which is not UTC and not server time) in any of our calendaring programs.
I did this with MySQL on RDS by changing my instance DB Parameter Group to a custom one that I can edit the parameters for.
I then created the following procedure:
DELIMITER |
CREATE PROCEDURE mysql.init_connect_procedure ()
IF NOT(POSITION(‘rdsadmin#’ IN user()) = 1)
THEN SET SESSION time_zone = 'America/New_York';
END IF |
DELIMITER ;
Note: every other instruction on the internet uses the function current_user() instead of user() which did not work for me!
The catch to this configuration is that then you have to give privileges to all your database users to be able to execute this function, or they won't even be able to connect to the database, so for every user and every future user you have to run this command. (and no there is no wildcard access to procedures)
GRANT EXECUTE ON PROCEDURE mysql.init_connect_procedure TO 'user'#'%' ;
I edited the parameter init_connect for to be set as CALL mysql.init_connect_procedure . I am sure SQL SERVER has an equivalent parameter if not the same.
Restart the server and you should be good!
Warning: The user rdsadmin is the root user that only Amazon has the password to and uses to maintain and backup the database. You don't want to change the timezone for this user or you might damage your entire database. Hence the code to make sure it is not this user. I really recommend making sure the user is the same for SQL SERVER, this solution is only for MySQL and is a terrible solution, unfortunatly I had no other choice. If you can avoid doing this handle the timezone on your application end.
I've installed a SQL Reporting server (2008 R2), with some reports. But I've some performances issues.
The first call of the day to the server(going on the report interface by example), is VERY slow(something like 30-45seconds at best).
The report generation is then "fast"(1-2 seconds).
The next calls to the server are always fasts until the next day. I've the impression that it loads a lot of thing in the memory. But what can takes 30-45 seconds to be loaded in memory??? And how to load it only once?
The server is good enough(quad core, 8GB of ram, never near its capacity for now).
What is the problem? How can I resolve this ?
Thoses reports will be launched only 4-5 times in a week, so they will always be slow if I can't change this. And since it's available for customer, I just can't make them understand this(and the report is called through a website, so I risk to have timeout).
Thank you very much
It seems to be an SSRS issue. There is nothing wrong with your report.
It's "normal" that SSRS takes more time to load the first time you access it after a long time of inactivity. The issue is caused by the way how SSRS works and SSRS regularly restarts application domain after a specific time period. After the application domain is restarted, then upon first request to the SSRS it needs to load all the settings and it takes quite a long time.
This blog show's a workaround for the situation
Here is the powershell script that I wrote to fix the problem. It is setup as a task to run every 1:00am:
Stop-Service "SQL Server Reporting Services (MSSQLSERVER)"
Start-Service "SQL Server Reporting Services (MSSQLSERVER)"
$wc = New-Object system.net.webClient
$cred = [System.Net.CredentialCache]::DefaultNetworkCredentials
$wc.Credentials = $cred
$src = $wc.DownloadString("http://localhost/Reports/Pages/Report.aspx?ItemPath=***NAME OF HOME PAGE***")
The best solution I could come up with was to issue a 'curl' command to the http page of the report using via windows batch command in a windows service. This ran up the page(s) every morning before the users came in.
Don't have access to the code anymore (job was a while ago) but this question shows how to use curl:
http://blogs.plexibus.com/2009/01/15/rest-esting-with-curl/
As Diego said, SSRS has some issues. The first call it is slow, regarding your server configuration. I recommend you the following config to add in rsreportserver.config (located if you don't know in C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\ )
If you want to increase the max memory used by SSRS: (which means 7 GB)
<WorkingSetMaximum>7000000</WorkingSetMaximum>
If you want to improve the first call, you can set (in minutes)
<RecycleTime>4320</RecycleTime>
Actually SSRS has a reset (recycle) time in which cleans its buffer. By default its setted at 720 min (12h) so thats why if you open a report every morning it actually load very slow.
As you need you can set the recycle time higher (2-3 days). I don't recommend a higher time because the buffer will fill up and you will get only blank pages, so you will have to manually restart Reporting Services.
It may be completely unrelated to SQL Server. Try to see if is not the code sign revocation list check issue, see Fix slow application startup due to code sign validation
I converted the main query and the dropdown controls on the page to load from stored procedures, it made a difference of say 5 sec in the loading process.Avoid using any inline queries.
Just recently started having issues with an SQL Server Agent Job that contains an SSIS package to extract production data and summarize it into a separate reporting database.
I think that some of the Alerts/Notifications settings I tried playing with caused the problem as the job had been running to completion unattended for the previous two weeks.
So... Where's a good place to start reading up on SQL Agent Alerts and Notifications? I want to enable some sort of alert/notification so that I'm always informed:
That the job completes successfully (as a check to ensure that it's always executed), or
That the job ran into some sort of error, which should include enough info (such as error number) that I can diagnose the cause of the error
As always, any help will be greatly appreciated!
Books Online is probably a good place to start (or at least I like it and generally find it useful).
SQLMenace and bofe made some good points. Here's my additional two cents:
I'd recommend configuring Database Mail rather than SQL Mail (i.e. SMTP vs. MAPI, which I think is deprecated anyway). Once you get the mail profile configured, you'll have to also configure the SQL agent to use that mail profile (which is just a page of settings for the agent properties), or else your SSIS job notifications won't actually get sent, even though you can successfully send a test email from Management Studio.
I don't use alerts as often as job notifications, so the only tricky thing I can recall about them is that if you're raising an error and you want the alert to email you when that happens, you have to make sure that the raised error gets written to the log. I think that just boils down to "RAISERROR ... WITH LOG"; here's the BOL link for the syntax details.
In each step of the job click on advanced then from there you can log to a file or to a table, this will have all errorcodes and other things why the job failed
You should be able to see this also from the job history.
Right click on the job-->view history, click on the + sign to expand, the click on each step and it will be in the lower panel
To set up notifications you need to set up an operator and the in the job on the notification tab you pick it from the email dropdown
You'll want to have "When the job completes" marked in your notifications page on the job's properties.
Just go to that dropdown and switch it to job completion instead of failure (which is on the screenshot).
You'll also want to make sure that your server has e-mail configured. I think it's under SQL Surface Area Configuration for Features.