﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / OS permission override by SQL Server / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 19:37:49 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>I second your thoughts. Correct way is to get permissions and I have already asked for that.[quote][b]MysteryJimbo (10/1/2012)[/b][hr]You could create a SQL Account with sysadmin permissions and use this to do the detach/attach.  It should work if the service account has host admin priviledges but it is a work around to circumvent security.The correct way should be to get the server admin to grant you permissions to the required folders.[/quote]</description><pubDate>Wed, 03 Oct 2012 03:59:57 GMT</pubDate><dc:creator>S_Kumar_S</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>Exactly what I did, but the copy permission was not there :)[quote][b]SpringTownDBA (10/1/2012)[/b][hr]Sql server should have permissions to copy the file, so xp_cmdshell.My approach for moving databases:1. Alter DB set single_user rollback immediate2. Alter db set offline3. xp_cmdshell to copy mdf/ldf to new location, if error, goto 6.4. xp_cmdshell to rename old files from data.mdf to data_old.mdf5. Alter DB to point to files on new drive.6. Alter db set online7. Alter db set multi_user[/quote]</description><pubDate>Wed, 03 Oct 2012 03:59:04 GMT</pubDate><dc:creator>S_Kumar_S</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>Sql server should have permissions to copy the file, so xp_cmdshell.My approach for moving databases:1. Alter DB set single_user rollback immediate2. Alter db set offline3. xp_cmdshell to copy mdf/ldf to new location, if error, goto 6.4. xp_cmdshell to rename old files from data.mdf to data_old.mdf5. Alter DB to point to files on new drive.6. Alter db set online7. Alter db set multi_user</description><pubDate>Mon, 01 Oct 2012 10:03:10 GMT</pubDate><dc:creator>SpringTownDBA</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>You could create a SQL Account with sysadmin permissions and use this to do the detach/attach.  It should work if the service account has host admin priviledges but it is a work around to circumvent security.The correct way should be to get the server admin to grant you permissions to the required folders.</description><pubDate>Mon, 01 Oct 2012 08:18:22 GMT</pubDate><dc:creator>MysteryJimbo</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>Well one reason is tha tI don't want users to enter any data in this database while I am moving it. I know there are other ways to achive it but attach ditch just does all I needned to achive.[quote][b]S_Kumar_S (9/28/2012)[/b][hr]we just want to shift files from one drive to another with larger space. So attach/ detach looks simpler...[quote][b]Jason-299789 (9/28/2012)[/b][hr]I would speak to the network admin about obtaining rights as those folders are locked down for a reason, and either ask someone with the correct privlages to copy them or make a case of having permissions to those folders.Out of curiosity why isnt a backup/restore a valid option?[/quote][/quote]</description><pubDate>Mon, 01 Oct 2012 04:33:31 GMT</pubDate><dc:creator>S_Kumar_S</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>Wouldn't an ALTER DATABASE operation be better for this?   http://msdn.microsoft.com/en-us/library/bb522469.aspxYou would still need access to the drives where the files are located.</description><pubDate>Fri, 28 Sep 2012 12:08:53 GMT</pubDate><dc:creator>dan-572483</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>Fair enough, just curious why the backup wasnt an option, and a detach in this situation is the best way of doing it. I would still find out why access is restricted to those drives/folders, as it sounds more like a security measure than anything else.</description><pubDate>Fri, 28 Sep 2012 07:14:45 GMT</pubDate><dc:creator>Jason-299789</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>we just want to shift files from one drive to another with larger space. So attach/ detach looks simpler...[quote][b]Jason-299789 (9/28/2012)[/b][hr]I would speak to the network admin about obtaining rights as those folders are locked down for a reason, and either ask someone with the correct privlages to copy them or make a case of having permissions to those folders.Out of curiosity why isnt a backup/restore a valid option?[/quote]</description><pubDate>Fri, 28 Sep 2012 07:00:18 GMT</pubDate><dc:creator>S_Kumar_S</dc:creator></item><item><title>RE: OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>I would speak to the network admin about obtaining rights as those folders are locked down for a reason, and either ask someone with the correct privlages to copy them or make a case of having permissions to those folders.Out of curiosity why isnt a backup/restore a valid option?</description><pubDate>Fri, 28 Sep 2012 05:47:33 GMT</pubDate><dc:creator>Jason-299789</dc:creator></item><item><title>OS permission override by SQL Server</title><link>http://www.sqlservercentral.com/Forums/Topic1365801-391-1.aspx</link><description>HiMy windows ID has admin rights on the sql server but I am not the administrator of the server. Now there is database of which I am owner. but the mdf and ldf files of this database are in a directory to which I don't have access, means I can't copy those files if database is detached.is there a way to override OS permission through Sql  server so that I may copy those files?</description><pubDate>Fri, 28 Sep 2012 05:42:31 GMT</pubDate><dc:creator>S_Kumar_S</dc:creator></item></channel></rss>