sql-server


Problems in Executing the SP which has while(true) loop in SQL SERVER


I know it is not good way and may have many issues. But can anyone tell what are the problems in executing the SP which has while loop.
CREATE PROC udpParseData
BEGIN
WHILE(true)
BEGIN
--logic goes here
END
END
EXEC udpParseData
I want to run it like a service. Instead of running a service which check the DB continuously using SQL Dependancy. Any problem with this and also i have a main concern that how to stop the running SP udpParseData. One more option i have is run the same SP in Scheduler JOB. I wanted to know the restrictions and disadvantages of using this.
You don't want to do this - even a Windows service doesn't work like that. A Windows service would leverage a Timer that wakes up on an interval and starts the message pump.
Write the work you want to execute in a stored procedure and then create a Job on the SQL Server that executes that stored procedure, and setup the times you want it to run. The Job takes the place of the Timer in the Windows service.

Related Links

Tool/script to clone SQL Server database with reduced rights (without backup functionality)?
SQL Server function with parameters
Bulk Load Data Conversion Error - Can't Find Answer
when i exec select on linux with odbc, hang on '__select_nocancel'
The system cannot find the file specified on Production server
An Error when trying to connect to SQL Server
Informatica powercenter
Temporary table not created from dynamic query execution
How to process the data in the table, which is frequently inserted
Combine two columns and input the result in a different columns using SQL server
SQL Query to accept time difference
How to change my T-SQL query to overwrite a csv file rather than append data to it?
How to join multiple columns with only one foreign key using linq
Deleting millions on records while using log shipping - SQL Server
Restricting decimal places [duplicate]
Powershell T-SQL Update Statement Error in Function

Categories

HOME
paypal
cakephp-3.x
ibm-watson-cognitive
angular-cli
scipy
google-contacts
hana
csvhelper
apache2
vlc
filter
dataframe
user
websphere-liberty
pygame
currency
oclint
gwtp
sign
scala-native
cross-platform
ada
tree-traversal
movies
android-fragmentactivity
jconsole
marathon
google-ima
tarantool
iup
go-cd
restfb
auditing
python-textprocessing
continuous-deployment
owl-api
vcard
svnkit
strophe
picturebox
receipt
ios-ui-automation
pmwiki
inkscape
alchemy.js
restful-url
nashorn
crop
startapp
aqgridview
w3-total-cache
drawingarea
seamless-immutable
multi-agent
tofixed
cdk
infinite-scroll
festival
laravel-query-builder
gradle-script-kotlin
cfeclipse
windows-azure-pack
vst
django-filer
multifile-uploader
project-online
twgl.js
android-recyclerview
test-class
data-import
windows-vista
mirrorlink
zuora
selendroid
manjaro
findcontrol
criteria-api
word-2013
pl-i
belongs-to
genetic-programming
spdy
mfmailcomposeviewcontroll
wss
factors
baucis
facebook-sdk-3.1
driver-signing
ng-hide
sttwitter
justgage
shortcuts
resgen
wpdb
applicationcontext
concurrent-programming
viewdidload
emacs23
wchar
datamember
serp
collect
audiostreamer
hibernate3-maven-plugin
external-assemblies
trampolines
visual-c++-2008-express
nt4
associativity

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App