Error Occurs while starting a Vb.net windows service from SQL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shravy
    New Member
    • Aug 2012
    • 1

    Error Occurs while starting a Vb.net windows service from SQL

    Hi,

    I have a vb.net windows service to rename a file placed in some folder of a windows server 2008.

    I want this service to rename the file as different a user as it does not allow for the nomal user. Since the windows service runs in different context as local user which allows to rename the file, i am starting the service from a stored procedure using Net Start along with parameters.
    When i execute the stored procedure, the following error occurs:
    The service is starting.
    The service could not be started.
    The service did not report an error.
    More help is available by typing NET HELPMSG 3534.

    When i open the evenlog, the following error is logged:

    "Service cannot be started. System.IO.IOExc eption: The process cannot access the file because it is being used by another process."

    I am using windows server 2008 and SQL server 2008

    Please help me in this
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Make sure the file isn't locked/open by another process before you run yours.

    Comment

    Working...