Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to use UNC name (remote computer) in the @outputfile parameter of sp_makewebtask ?

How to use UNC name (remote computer) in the @outputfile parameter of sp_makewebtask ?

Scheduled Pinned Locked Moved Database
databasehelpquestioncsharpswift
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jmavn
    wrote on last edited by
    #1

    Hi friends, In my application (developed in asp.net 1.1), I am going to implement the Cache dependency mechanism. I want to automatically invalidate the Cache object, once any manipulations done on a particular table in SQL Server. My application and DB is running in different system. I found in one of the site, to create a trigger on the table which in tern calls the sp_makewebtask System stored procedure and write output of the query into a file. EXEC sp_makewebtask @outputfile = 'c:\testcache.txt' @query = 'select top 1 Problem_Category_Code from SMD_Problem_Category' But the 'C:\testcache.txt' is pointing the local system in which SQL is running. I want to write a file which is available in remote system. I shared a folder from the system and made a mapped drive in the SQL system. (as z:\ drive) I used the statements as : @outputfile = 'Z:\testcache.txt' also as @outputfile = '\\10.160.1.4\wc\testcache.txt' But in both the cases I got the error as: Msg 16821, Level 11, State 1, Procedure sp_makewebtask, Line 131 SQL Web Assistant: Could not open the output file. But in one site it is mentioned that, we can use the UNC name if we want to write file in remote system. How can I run the SP? Can anyone please help me to solve this problem? I need some swift reply on this issue, as it is very urgent for me.

    Thankfully, jm

    S 1 Reply Last reply
    0
    • J jmavn

      Hi friends, In my application (developed in asp.net 1.1), I am going to implement the Cache dependency mechanism. I want to automatically invalidate the Cache object, once any manipulations done on a particular table in SQL Server. My application and DB is running in different system. I found in one of the site, to create a trigger on the table which in tern calls the sp_makewebtask System stored procedure and write output of the query into a file. EXEC sp_makewebtask @outputfile = 'c:\testcache.txt' @query = 'select top 1 Problem_Category_Code from SMD_Problem_Category' But the 'C:\testcache.txt' is pointing the local system in which SQL is running. I want to write a file which is available in remote system. I shared a folder from the system and made a mapped drive in the SQL system. (as z:\ drive) I used the statements as : @outputfile = 'Z:\testcache.txt' also as @outputfile = '\\10.160.1.4\wc\testcache.txt' But in both the cases I got the error as: Msg 16821, Level 11, State 1, Procedure sp_makewebtask, Line 131 SQL Web Assistant: Could not open the output file. But in one site it is mentioned that, we can use the UNC name if we want to write file in remote system. How can I run the SP? Can anyone please help me to solve this problem? I need some swift reply on this issue, as it is very urgent for me.

      Thankfully, jm

      S Offline
      S Offline
      SimulationofSai
      wrote on last edited by
      #2

      This means that SQL Server does not have the required permission to write into the shared folder. You ought to give write permission to the account under which SQL Server is running to the shared folder. Make sure you give permission under the "Sharing" tab and "Security" tab.

      SG Cause is effect concealed. Effect is cause revealed.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups