.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

File Permissions for Private Key/Certificate Exported from SQL 2008

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :Sql Server

As part of our new key management system for SQL server, we are backing up the Private Key and Certificate file to a UNC file path that has very restricted access to only Key and Certificate custodians.  When we execute the backup script, it works and puts the Certificate and Key files to the UNC path, but the files do not inherit NTFS permissions from the target path and our Key and Certificate Custodians do not have access to these files.  Is there a way to "force" these files to inherit permissions from their target folder structure?

Here is the SQL script used to generate our key pair:


  TO FILE = '\\UNCCertificatePath\CertificateFile.cert’

View Complete Post

More Related Resource Links

SQL Server 2008 file permissions


We're converting from SQL Server 2000 to 2008. We've set up a new DB server (Windows 2003 Server), we've installed SQL Server 2008. We've installed a few databases. Things seemed to be going well. Then...

I'm trying to move over a database from the old server to the new. I've tried detach/copy/attach and backup/copy/restore. I'm putting the file in the default database location (D:\MSSQL\Data or D:\MSSQL\Backup). But then I find that SQL Server can no longer access that location! I get a message that says:

"Cannot access the specified path or file on the server. Verify that you have the necessary security priveleges and that the path or file exists".

This as soon as I click on Add on the Specify Backup dialog or on the Attach database dialog.

I've tried: logging in with SQL Server authent. and Windows authent.; checking and changing permission on the folder and file; basically everything I can think of.




Access Control: Understanding Windows File And Registry Permissions


Understanding the ACLs that govern permissions and rights before an operation is allowed to proceed is critical to enhancing security.

John R. Michener

MSDN Magazine November 2008

FLV file in Visual Web Developer Express 2008


I'm trying to embed a flv in my web page and I don't have a clue how to do it.

I downloded and installed ASPNetFlashVideo and the tools do not appear in my toolbox.

So if anyone has a work around it would be greatly appreciated.

Certificate API question - Private Key.

I am trying to follow http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2.aspx but I am finding that the Private Key property of the certificate is always null. I created the certificate with makecert -pe -n "CN=BuySeasonsThirdParty" -r -b 08/26/2010 -e 08/26/2011 -sky exchange Amazon.cer. Then installing it on the local user store using: X509Store store = new X509Store(storeName, StoreLocation.CurrentUser); and using the same API to get the certificate from the store. The certificate that I retrieve from the store is non-null it is just the PrivateKey is null. So I can encrypt using something like: ((RSACryptoServiceProvider)cert.PublicKey.Key).Encrypt(Encoding.Unicode.GetBytes(text), true)   But since the Private Key property is NULL I cannot decrypt. Any ideas? Kevin

SQL Agent - service account permissions - SQL Server 2008

Hi @ all   I installed two SQL Server 2008 on Server 2008 R2 Std (principal and mirror) and an AD Server 2008, with sperate service accounts, connect as SA, localy all works fine. I created some agent tasks (PowerShell, T-SQL), but I get some Error massages in the history, that service account of SQL Agent didn't have the permission to query a remote machine(access denied for wmi (HRESULT: 0x80070005 (E_ACCESSDENIED)) and linked database(SQLSTATE 42000 Error(7314)). The simple query with SA permissions on the remote machine works and the powershell scripts with the local domain user works too. But not with the SQL Agent. WHY?? Where ist the different between the user account permisions and service account permissions? Which settings are needed? Example: get-wmiobject -class win32_service -computername 192.168.xxx.xxx| where {$_.name -like '*SQL*'} Powershell Console: works                                     SQL Agent Job: access denied I tried some solutions with user rights, group policies and security permissions but nothing works. like: Configuration -Service Accounts, SQL Server or SQL Server Agent service account http://support.microsoft.com/kb/283811/en-us http://msdn2.microsoft.com/

WPF Desktop App - Write file permissions

I have been working on a WPF desktop app for a while now, and I am struggling to deploy it.  The problem seems to be that the app does not have permissions to save the file I am creating.  Although I should say the code works fine running locally through Visual Studio. I am OneClick deploying the app, and just want to give it full access although just knowing how to give it write permission is all I need.  The app is only to be used by a few members of staff on our intranet, so trust is not really an issue here. If anyone can point me in the direction of a quick solution that would be great, and you'll save me alot of time trying to figure out all the documentation which I am failing to work out what to do with so far. Additional info: I am deploying over a web address, which I think means Internet Zone. Thanks John

File not found error when trying to open site permissions on a blog site

We have created a simple team site and a block subsite.  When trying to edit the site permissions we see the following error.  Any ideas? When opening a blog site and clicking Site Actions - site permissions we received a new page with the following error: Error File Not Found Troubleshoot issue with Microsoft Sharepoint Foundation Correlation ID: 51b54786-f344-4474-b88e-3080c363693 Date and Time: 3/24/2010 3:03:38 PM

LDF File Disaster in SQL Server 2008

I am working on a startup company and the "dba" recently quit...come to find out he let the LDF file grow to 105GB - which effectively shut down the server due to lack of disk space.  I need to serious help as this database is also supporting our replication system and thus I cannot do anything drastic like detaching, deleting the LDF file and reattaching. I tried the shrink file option but the LDF file did not shrink at all.  I set the recovery model to simple, then tried shrinking and that did nothing.  This is a SQL Server 2008 machine - can somebody please help? Also, given that I am mainly a developer, is there some EASY reference on how to setup log file backups so this does not happen in the future?  Do I just perform a full backup every 30 minutes over-writing the previous backup, differentials, what? Thanks!

Restoring 2008 Database with Filestream - Process cannot access file error

I'm trying to restore a copy of a database that has a filestream and am getting the error below. I've tried with move option to specify a new path and left it with default path, neither worked. Did a trace with procmon, didn't see anything. FileStream1 is a new folder that the restore process creates. I've deleted the folder, tried it with a new name, re-took the backup from the source machine, restarted SQL, rebooted the machine, drive permissions are open. I've run out of ideas on how to debug further. Looking up the error online wasn't much help either. Msg 3634, Level 16, State 1, Line 1 The operating system returned the error '32(The process cannot access the file because it is being used by another process.)' while attempting 'OpenFile' on 'X:\Data\FileStream1\4ecb2e48-0eee-4c99-a3f0-f1e6c7f00b24\f2efe374-9481-4c1b-a7f2-dcdcee350807\0000001b-0000aaa6-00f6'. Msg 3013, Level 16, State 1, Line 1 RESTORE DATABASE is terminating abnormally. ' SQL Server 2008 SP 1, MS Server 2008 R2 Server

ssis 2008 Loading MULTIPLE EXCEL file

HI it is possible for me to load multiple text file using for each loop,but if i try the same process for EXCEL file then my excel source throws an error. Also when i created my variable in value  i have given the path of my excel file ,still it didnt help me..because the moment i map the variable with the connection string of source excel connnection(property->expression->connection string) it start giving error if you could help me or provide some reference it will be of great help http://bi-polar23.blogspot.com/2007/08/loading-multiple-excel-files-with-ssis.html i tried this link but got stuck with it on step 12 and 14 (below  is my connection string) and variable is @Filename which i have created Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\mushtaq.sheikh\Desktop\ForEach\New Microsoft Excel Worksheet1.xlsx;Extended Properties="Excel 12.0;HDR=YES"; The moment i try to edit my connection string by comparing connection string provided in link it gives error(an OLEBD error has occured with error code 0x80040E73) on excel source Thanks in advance

Changing File Permissions of Disconnected MDF/LDF Files

I am a university professor and have over a hundred student project databases using the developer edition of SQL 2005 and 2008 on a portable hard drive.  All are disconnected from any server.  I need to move these to a new hard drive but no file system tool I can find will let me copy the .mdf or .ldf files.  Each of these files has a single user with permissions and the user is a long alpha/numeric string that seems to have been generated by SQL.  I can copy these files if I select each file individually and give full control permissions to my current login.  On some files I need to first take ownership.  I just don't want to have to go in and do this manually for 200+ files scattered all over the drive. I really need some sort of batch approach (including something that can be launched from within VB which I can use to navigate my drive's folder structure looking for .mdf/.ldf files) to let me change the permissions on these files.  As I said, I have a LOT of them and they are scattered around a deep folder structure organized by semester, course, project team, and sometimes project version.  Further, the files accompany other files such as VB projects, report projects, SSIS projects, etc.  I have access to Windows Vista and Windows 7 for doing this.

How do you freeze the tablix header row in an Excel export file in SSRS 2008?

So this is totally killing me. I've found out how to make a tablix header row repeat on each page of a PDF export file in SSRS 2008 (which I won't even get started on because all I can say is that 2005 is way better), but I cannot figure out how to make a simple header row of a tablix freeze in an Excel export file.  The tablix is right at the top of the body and spans the entire width of the design area.  How in the world do you get it to freeze in the Excel export file?

Restoring a BAK file via SQL Server Express 2008

How can I restore a BAK file that I received from a vendor.  They were unable to find a database schema for us so they just sent us a BAK file.  I'm using SQL Server Express 2008

Error when modifying permissions on Itemadded for a file upload

All, I have registered an eventhandler for a document library. On ItemAdded, I want to modify the permissions of the item such that only the uploader(creator) should have access to the file he is uploading. When I upload a file and fill in the required metadata and click on Save, I get the error"The file SubmissionForReview_Draft/Untitled.htm has been modified by SHAREPOINT\system " . But, I did verify the event fired and all appropriate permissions are set. The only explanation for this could be, the file gets uploaded, the event fired and the properties of the file has changed and then the form to add additional metadata has poped up. On clicking on save, SharePoint determines that the file for which the metadata has to be added has changed internally and throws error, which may be as expected. Question: Is there a way around this issue, maybe to suppress check on file changed ?   Thanks mano Mano Mangaldas | Blog : http://howtosharepoint.blogspot.com 

Modify File Permissions

SQL Server 2005/2008 Ent. When trying to move the database files from one drive to another I get a permission denied error. The process is: ALTER DATABASE db_name SET OFFLINE WITH ROLLBACK AFTER 30 SECONDS (this works) Move files to new drive (this works) ALTER DATABASE db_name MODIFY  FILE ( NAME= logical_name, FILENAME = 'new_path\filename') (This doesn't work*) ALTER DATABASE db_name SET ONLINE (this works) * This exact method is part of an internal application. When the applicaiton is run as a user ('admin') that has: sysadmin role it works as expected. When run as a user ('restricted') that has just: db_creator (instance wide) db_owner (just the one database) db_diskadmin (instance wide) it fails with a user doesn't have alter permissions for the databse ... I have tried:  all of the steps manually as the 'restriced' user to make sure it isn't something wrong with our app. all of the setps manually as the 'admin' user setting the database owner to another acount and explicitly given all permissions to the 'restricted' account From what I have read the databse owner (dbo) user should be able to do any ALTER statement to the databse. And it is able to take the database offline but it can't change the file paths. Is there no other way to do this without giving sysadmin to the application service account?

Need to find File Share Excel Rendering time--SSRS 2008

we are using SSRS 2008 file share subscription to generate EXCEL reports,Requirement here is need to find the file rendering/completion time in order to send the excel file as attachement using xp_senddbmail. Your help is highly appreciated-- Sathish

tempdb not pointing to the correct .mdf file in SQL 2008

We had to restore our master.mdf file. Now when I right click on the properties of the tempdb it shows the path to the tempdb as pointing to the master.mdf file with a logical name of master. I have tried runnng the alter database command and it completes fine. The new tempdb.mdf file is created in the new location but when I go back in to look at the properties in SQL manager it stilll shows as pointing to the master.mdf file. How can I change? Any help would be greatly appreciated.   Steve
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend