Change Database Query Timeout

database
studio

#1

Hello,

I have a query that I’m trying to execute. it takes about a minute to complete on average.

So when I attempt to use the Execute Query Command, it errors after 30 seconds.

.Net SqlClient Data Provider : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I read here that you can add an extra argument to the connection string, however - that did not seem to work.

My connection string currently looks like:

"Data Source=PRD-SQLBI-01\SQL2016DWH;Initial Catalog=OUTBOUNDprd_RPA;Integrated Security=True;Connect Timeout=90000"

Unsure what else I can do?


Command Timeout in Execute Query/Non Query activity
#2

What solved the issue for me, when getting timeouts on the execution of the Query for the MySQL Connection, was increasing the default command timeout, by adding the following argument to the connection string:

;default command timeout=300


#3

No good.

Main has thrown an exception
Message: Keyword not supported: 'default command timeout'.
Source: Connect
Exception Type: ArgumentException

#4

Has anyone else any solutions, I really need to get this working.


#5

Bumping


#6

Bumping


#7

Try this way

https://discourse-cdn-sjc1.com/business5/uploads/uipath/original/2X/8/8e1bfe6cba1dc97197479ba9f1c22c2961a9d71b.xaml


#8

Hey vvaidya,

I wasn’t able to open your XAML.

Exception has been thrown by the target of an invocation.

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Cannot place windows in MDI since no MDI host (TabbedMdiHost, StandardMdiHost, etc.) was located as the direct child of the DockSite’s Workspace.
at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#58i(DockingWindow #sb, DockHost #d6i, DockingWindowState #Zb, Nullable1 #Fwf) at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.#V8i(DockingWindow #sb, IDockTarget #F8i, Nullable1 #Zb, Nullable1 #Fwf, Int32 #G8i, Boolean #66i) at ActiproSoftware.Windows.Controls.Docking.Logic.LayoutChangeProcessor.Open(DockingWindow #sb) at ActiproSoftware.Windows.Controls.Docking.DockingWindow.Open() at UiPath.Workflow.DockSiteViewModelBehavior.OpenDockingWindow(DockingWindow dockingWindow) at UiPath.Workflow.DockSiteViewModelBehavior.OnDockSiteWindowRegistered(Object sender, DockingWindowEventArgs e) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Delegate.DynamicInvokeImpl(Object[] args) at System.Windows.RoutedEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at ActiproSoftware.Windows.Controls.Docking.DockSite.RaiseWindowRegisteredEvent(DockingWindow window) at ActiproSoftware.Windows.Controls.Docking.DockSite.EnsureDockingWindowRegistered(DockingWindow window, Boolean wasContainerForItem) at ActiproSoftware.Windows.Controls.Docking.DockingWindow.set_DockSite(DockSite value) at ActiproSoftware.Windows.Controls.Docking.DockSite.AddContainers(IList1 containers, IList items, Int32 index, DockingWindowItemKind kind)
at ActiproSoftware.Windows.Controls.Docking.DockSite.OnDocumentItemsSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at Caliburn.Micro.BindableCollection1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection1.InsertItem(Int32 index, T item) at Caliburn.Micro.BindableCollection1.InsertItemBase(Int32 index, T item)
at Caliburn.Micro.BindableCollection1.<>c__DisplayClass8_0.<InsertItem>b__0() at Caliburn.Micro.XamlPlatformProvider.OnUIThread(Action action) at Caliburn.Micro.BindableCollection1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at UiPath.Workflow.ViewModels.MainViewModel.AddDocument(IScreen document)
at UiPath.Workflow.ViewModels.MainViewModel.OpenWorkflowInProject(String workflowPath, Boolean recovered)


#9

Did you modify anything or running as is? There is nothing fancy in my sample, not sure why it isn’t working. Version is 2016.2


#10

Running as is.

Version: 2017.1.6302

I attempted to open it on my local machine and a work VM.

They both have the community edition installed currently


#11

How would you get your code to work @vvaidya if you needed to write the sql results to a data table? I tried inserting an Execute Query activity in various spots into your code where it allows you to save the results into a data table but was not having success. I was successfully able to insert my query into your code and display the results in the write line but my sql query pulls a lot of columns with a lot of rows (hence why it is timing out. It takes about 90 seconds to execute).


#12

This works, but seems to be only returning the first cell of every row.