SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


START own Service from SQL


START own Service from SQL

Author
Message
tnmukherjee
tnmukherjee
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 116
I have my own service name=[SgDataSrvc] available in the same DB Server machine.
I opted both options taking [Log On As]=[Local Service] and [Network Service] also.

Now opening SQL Server2005, applied both ways:
- SQL Server Authentication [sa login]
- Windows Authentication

In the Query tab switched on followings :
{
EXEC sp_configure 'show advanced options', 1
RECONFIGURE
EXEC sp_configure 'xp_cmdshell', 1
RECONFIGURE
EXEC sp_configure 'Ole Automation Procedures',1
RECONFIGURE
}
then executed followings commands :

EXEC master..xp_cmdshell 'whoami' results [nt authorityetwork service]

1.declare @ServiceName sysname
set @ServiceName = 'SgDataSrvc'
EXEC master.dbo.xp_servicecontrol 'START', @ServiceName

2.Exec master.dbo.xp_servicecontrol N'START', N'SgDataSrvc'

3.EXEC master..xp_cmdshell 'sc START SgDataSrvc'--,NO_OUTPUT

In each case it result >> "Access is denied."

I am sure it must be possible to start my own service from
DB Stored Procedure, defintely I will need some right settings.

Plz give me right direction.
Perry Whittle
Perry Whittle
SSC Guru
SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)SSC Guru (90K reputation)

Group: General Forum Members
Points: 90692 Visits: 17960
think about it and this is painfully obvious Wink

-----------------------------------------------------------------------------------------------------------

"Ya can't make an omelette without breaking just a few eggs" ;-)
Steve Jones
Steve Jones
SSC Guru
SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)

Group: Administrators
Points: 221351 Visits: 19617
It's security related. You are not running the command, the SQL Server service is.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
tnmukherjee
tnmukherjee
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 116
It seems 'Local Security Settings' the area to look on, where I have zero idea. Plz put some light on it.
As my requirement is to provide solution in DB server of SQL 2005 Express, so no SQL-agent there, where I intend to get some time consuming job done parallely in the backend, without stopping the frontend execution thread. So I cretaed seperate window service and was trying to START the service from existing backend stored procedure, hence no need of making changes in the front-end application as well.
Steve Jones
Steve Jones
SSC Guru
SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)SSC Guru (221K reputation)

Group: Administrators
Points: 221351 Visits: 19617
The SQL Server security service needs rights to start the service. Or a service. This isn't necessarily granted by default. You'd want to set an account for the SQL service that has rights to start the other service. It's not something that the user is involved in (install time or later).

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
tnmukherjee
tnmukherjee
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 116
Steve, I have no option to reInstall SQL Server into the client sites. Can you give some link over the related topics plz.
tnmukherjee
tnmukherjee
SSC-Enthusiastic
SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)SSC-Enthusiastic (193 reputation)

Group: General Forum Members
Points: 193 Visits: 116
bravo ! I got the right egg to make the omlett ! MMC !!!
kevin_nikolai
kevin_nikolai
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1497 Visits: 523
STEP1.
Create a local account (Local Users and Groups, Users). The right-click account, properties, select Member of tab, click Add, type in Administrators, click OK.

STEP2.
Start, Control Panel, Administrative Tools, Services, right-click the new service, properties, Log on tab, select this account, type in the local account name (created in STEP1)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search