Click here to monitor SSC
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
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 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
SSChampion
SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)SSChampion (11K reputation)

Group: General Forum Members
Points: 11906 Visits: 16848
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-Forever
SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)

Group: Administrators
Points: 42200 Visits: 18876
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
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 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-Forever
SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)

Group: Administrators
Points: 42200 Visits: 18876
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
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 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
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 116
bravo ! I got the right egg to make the omlett ! MMC !!!
kevin_nikolai
kevin_nikolai
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 Visits: 511
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