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 ««123»»

OpenRowSet works locally but not over networked drives Expand / Collapse
Author
Message
Posted Wednesday, July 10, 2013 12:18 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 1:02 PM
Points: 6,032, Visits: 5,284
erikd (7/10/2013)
Elliott Whitlow (7/10/2013)
erikd (7/10/2013)
I checked that, actually. Not only can I use xp_cmdshell to DIR the path, but I can insert the results into a table. Weird, huh?

You might have hit on something there.. I had a similar problem and the issue was the file was being written with permissions that wouldn't allow SQL to access it. So now I guess you need to see what permissions the actual file has..

CEWII


All users and groups, including Everyone, has all permissions allowed on the file, except Special Permissions. The only group that has Read and Read/Execute only are local users, which the clients\SQLService domain account isn't.

So, do I need to give "Special Permissions"? These permissions don't seem special, but what do I know?
I don't really consider those special myself.. Are there other files there that CAN be read by SQL? I'm trying to get a view on what SQL actually needs. Also are there any DENY permissions set?

CEWII
Post #1472291
Posted Wednesday, July 10, 2013 12:35 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:04 AM
Points: 488, Visits: 1,993
Elliott Whitlow (7/10/2013)
erikd (7/10/2013)
Elliott Whitlow (7/10/2013)
erikd (7/10/2013)
I checked that, actually. Not only can I use xp_cmdshell to DIR the path, but I can insert the results into a table. Weird, huh?

You might have hit on something there.. I had a similar problem and the issue was the file was being written with permissions that wouldn't allow SQL to access it. So now I guess you need to see what permissions the actual file has..

CEWII


All users and groups, including Everyone, has all permissions allowed on the file, except Special Permissions. The only group that has Read and Read/Execute only are local users, which the clients\SQLService domain account isn't.

So, do I need to give "Special Permissions"? These permissions don't seem special, but what do I know?
I don't really consider those special myself.. Are there other files there that CAN be read by SQL? I'm trying to get a view on what SQL actually needs. Also are there any DENY permissions set?

CEWII


I haven't been able to either create in, or create and copy to the folder, a file that can be read.

When the same files are copied to a local drive, they're read fine. This goes for other file types as well, not just xlsx. Also .xls, .txt, and .csv. I know that doesn't make a ton of difference.



Post #1472298
Posted Wednesday, July 10, 2013 1:01 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 1:02 PM
Points: 6,032, Visits: 5,284
erikd (7/10/2013)
Elliott Whitlow (7/10/2013)
I don't really consider those special myself.. Are there other files there that CAN be read by SQL? I'm trying to get a view on what SQL actually needs. Also are there any DENY permissions set?

CEWII


I haven't been able to either create in, or create and copy to the folder, a file that can be read.

When the same files are copied to a local drive, they're read fine. This goes for other file types as well, not just xlsx. Also .xls, .txt, and .csv. I know that doesn't make a ton of difference.
I'm wondering if the SQL user should be given explicit permissions to this directory. When you copy the files the permissions of the directory usually flow into it. But when you move a file on the same drive the permissions it had come with it. I'm wondering if that might be in play.. But it really feels like we are at the root of the problem, permissions on the file and/or directory. Which would probably NOT be in place on a local drive given the permissions you say this user has locally.

CEWII
Post #1472302
Posted Wednesday, July 10, 2013 1:10 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:04 AM
Points: 488, Visits: 1,993
I've given the clients\SQLService user explicit rights to the folder. from Full Control on down. Nothing is denied. I immediately ran the query, and got the same error as my original post. Let me know if there's something additional I should do (reboot, wait for replication of some sort, etc.).

Thanks
Post #1472310
Posted Wednesday, July 10, 2013 1:21 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 1:02 PM
Points: 6,032, Visits: 5,284
erikd (7/10/2013)
I've given the clients\SQLService user explicit rights to the folder. from Full Control on down. Nothing is denied. I immediately ran the query, and got the same error as my original post. Let me know if there's something additional I should do (reboot, wait for replication of some sort, etc.).

Thanks
Did you apply the change to existing files? I'm guessing that might be it..

CEWII
Post #1472319
Posted Wednesday, July 10, 2013 1:25 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:04 AM
Points: 488, Visits: 1,993
Elliott Whitlow (7/10/2013)
erikd (7/10/2013)
I've given the clients\SQLService user explicit rights to the folder. from Full Control on down. Nothing is denied. I immediately ran the query, and got the same error as my original post. Let me know if there's something additional I should do (reboot, wait for replication of some sort, etc.).

Thanks
Did you apply the change to existing files? I'm guessing that might be it..

CEWII


Yes, sorry, I applied it to the file itself. Same error. I even went a little crazy and gave the clients\SQLService account full control of every drive and directory on down to the file.
Post #1472321
Posted Wednesday, July 10, 2013 1:40 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Thursday, October 9, 2014 1:02 PM
Points: 6,032, Visits: 5,284
erikd (7/10/2013)
Elliott Whitlow (7/10/2013)
erikd (7/10/2013)
I've given the clients\SQLService user explicit rights to the folder. from Full Control on down. Nothing is denied. I immediately ran the query, and got the same error as my original post. Let me know if there's something additional I should do (reboot, wait for replication of some sort, etc.).

Thanks
Did you apply the change to existing files? I'm guessing that might be it..

CEWII


Yes, sorry, I applied it to the file itself. Same error. I even went a little crazy and gave the clients\SQLService account full control of every drive and directory on down to the file.
Grrrrrr... Ok, what if you do a:
EXEC master.dbo.xp_cmdshell 'TYPE \\server\share\filename.ext '

what is the output? IF it reads it you should get some goofy stuff..

CEWII
Post #1472328
Posted Wednesday, July 10, 2013 1:46 PM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:04 AM
Points: 488, Visits: 1,993
Wacky stuff indeed! Trying to read it out loud kind of makes me feel like handling venomous snakes.


  Post Attachments 
output.txt (7 views, 7.42 KB)
Post #1472332
Posted Wednesday, July 10, 2013 1:57 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 12:13 PM
Points: 1,805, Visits: 5,868
Do you have any mapped drives on the sql server under that domain account?

If so, can you copy the file to one of those and see if you can read it using ORS from there - just wondering is the UNC path is the problem...?

EDIT: for clarity, I mean a network storage location mapped to a drive letter on the sql server...


MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1472337
    Posted Wednesday, July 10, 2013 2:12 PM


    SSCertifiable

    SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

    Group: General Forum Members
    Last Login: Thursday, October 9, 2014 1:02 PM
    Points: 6,032, Visits: 5,284
    I looked at the output and immediately latched onto the first 2 characters, PK, are you sure this is an XLS file and not a ZIP file maybe containing an XLS file? I might be reading too much into it..

    I took an xls file and zipped it and the first few characters were: PK♥♦¶, that looks pretty similar to your output..

    CEWII
    Post #1472345
    « Prev Topic | Next Topic »

    Add to briefcase ««123»»

    Permissions Expand / Collapse