SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


OpenRowSet works locally but not over networked drives


OpenRowSet works locally but not over networked drives

Author
Message
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10008 Visits: 5314
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
sqldriver
sqldriver
SSC Eights!
SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)

Group: General Forum Members
Points: 962 Visits: 2517
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.
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10008 Visits: 5314
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
sqldriver
sqldriver
SSC Eights!
SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)

Group: General Forum Members
Points: 962 Visits: 2517
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
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10008 Visits: 5314
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
sqldriver
sqldriver
SSC Eights!
SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)

Group: General Forum Members
Points: 962 Visits: 2517
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.
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10008 Visits: 5314
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
sqldriver
sqldriver
SSC Eights!
SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)SSC Eights! (962 reputation)

Group: General Forum Members
Points: 962 Visits: 2517
Wacky stuff indeed! Trying to read it out loud kind of makes me feel like handling venomous snakes.
Attachments
output.txt (65 views, 7.00 KB)
mister.magoo
mister.magoo
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4090 Visits: 7865
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...?Hehe

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

MM


select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);




  • 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

  • Elliott Whitlow
    Elliott Whitlow
    SSChampion
    SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

    Group: General Forum Members
    Points: 10008 Visits: 5314
    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
    Go


    Permissions

    You can't post new topics.
    You can't post topic replies.
    You can't post new polls.
    You can't post replies to polls.
    You can't edit your own topics.
    You can't delete your own topics.
    You can't edit other topics.
    You can't delete other topics.
    You can't edit your own posts.
    You can't edit other posts.
    You can't delete your own posts.
    You can't delete other posts.
    You can't post events.
    You can't edit your own events.
    You can't edit other events.
    You can't delete your own events.
    You can't delete other events.
    You can't send private messages.
    You can't send emails.
    You can read topics.
    You can't vote in polls.
    You can't upload attachments.
    You can download attachments.
    You can't post HTML code.
    You can't edit HTML code.
    You can't post IFCode.
    You can't post JavaScript.
    You can post emoticons.
    You can't post or upload images.

    Select a forum

































































































































































    SQLServerCentral


    Search