Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

START own Service from SQL Expand / Collapse
Author
Message
Posted Friday, October 10, 2008 5:39 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 2, 2012 5:56 PM
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.
Post #583883
Posted Saturday, October 11, 2008 3:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:32 AM
Points: 6,196, Visits: 13,354
think about it and this is painfully obvious ;)

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

"Ya can't make an omelette without breaking just a few eggs"
Post #584458
Posted Saturday, October 11, 2008 3:24 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:35 AM
Points: 33,102, Visits: 15,213
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
Post #584462
Posted Sunday, October 12, 2008 3:36 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 2, 2012 5:56 PM
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.
Post #584527
Posted Sunday, October 12, 2008 9:03 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Today @ 11:35 AM
Points: 33,102, Visits: 15,213
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
Post #584561
Posted Monday, October 13, 2008 12:49 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 2, 2012 5:56 PM
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.
Post #585067
Posted Wednesday, October 15, 2008 3:04 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, April 2, 2012 5:56 PM
Points: 13, Visits: 116
bravo ! I got the right egg to make the omlett ! MMC !!!
Post #586037
Posted Thursday, October 16, 2008 3:26 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 4:40 PM
Points: 159, Visits: 454
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)
Post #587340
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse