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

Connecting to other Server Expand / Collapse
Author
Message
Posted Friday, June 8, 2012 8:03 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 12, 2012 1:59 PM
Points: 7, Visits: 14
Hi,
Not sure if this is correct Forum, if not, tell me where to ask.

Background:
2 Servers
Server 1 is a Production server. used for Web Hosting, and SQL Report Server.
Server 2 is will be used to execute the logParser.exe and read the data files into SQL 2008 R2

Goal: To run a Stored Proc on Server 2 and read the IIS log files found on Server 1 in the IIS Log folders. Read the content, insert into the SQL on Server 2 and then Delete files from Server 1

I am able to do this when the IIS log files are on the same Server.
Issue: I get Denied Access when the LogParser tries to access the file on a the distant Server.

I am testing by Creating a Job and executing the stored Proc and Runs it as "Executed as user: NT AUTHORITY\NETWORK SERVICE" account.

Sample Code that works when running on the same server:

LogParser "SELECT * FROM C:\inetpub\logs\LogFiles\W3SVC1\RMW\ex120601.log TO GlobalIISLog_2"
-i:IISW3C
-o:SQL
-server:Server2.domain.com
-database:IISLog
-createtable:ON
-ignoreIdCols:OFF

Sample Code that is Denied

LogParser "SELECT * FROM \\Server1.internal.domainY.com\G$\data\logs\W3SVC1\ex120603.log TO GlobalIISLog_2"
-i:IISW3C
-o:SQL
-server:Server2.DomanX.com
-database:IISLog
-createtable:ON
-ignoreIdCols:OFF

Question: What privileges should I change on the Source folders so the Account from Server2 can open/read the IIS Log files?

In the debugging, I found had to grant access for the Network Service account to the folders on Server2 . That's how I got my 'local' test to work.

All help is appreciated
Thank,
rwiethorn

rwiethorn At Gmail dot com



Post #1313144
Posted Friday, June 8, 2012 9:09 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:50 PM
Points: 23,045, Visits: 31,570
Duplicate post, please post all responses here.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1313206
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse