I am receiving a SQL time out when trying to use the Clear-TcmPublicationTarget
command in Powershell.
Has anybody seen this before and knows how to fix it?
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI am receiving a SQL time out when trying to use the Clear-TcmPublicationTarget
command in Powershell.
Has anybody seen this before and knows how to fix it?
Sounds a lot like database maintenance is lacking, for MS SQL Server you can use the following command:
exec sp_updatestats;
This updates the statistics of the databaase which usually solves performance problems (like timeouts on queries). Now for SQL Server updating the statistics can be configured to be run automatically, but that doesn't always run at the time it needs to. A proper DBA will manually schedule database maintenance at fixed time ensuring it always runs. SOmething Oracle DBAs have to do anyways.
If the update stats did not solve your probblem, and we are talking about MS SQL Server, the next step is to look at your DB configuration. SQL Server is notorious for becoming slow if the transaction log is turned on and not regularly trunkated (after it was backed up ;o). On developer machine I often turn off the transaction log feature, since I don't have the knowledge how to restore it anyways, so it is just slowing my server down. A traansaction log size of larger than 1GB usually means your DB will be too slow for decent queries, so you need to fix that.
We also had the same above issue for one of our customer environment today, We did watch the timeout value by mobile stopwatch, and noticed it was getting timing out by 55 seconds.
We also tried the sp_updatestats not helped. then we increased the timeout settings value in SDL Console for " seconds before a timeout error is generated when executing a query" from 50 to 180 and restarted the following services then timeout issue gone for us and Clear-TcmPublicationTarget cmdlet command was got success.