How To Setup The User Access Right To A BackupOperator User In SQL2005.. Thanks
Nov 21, 2007
I would like the Backup SQL user A can backup and restore DATABASE_a, what access right I need to grant to him. Although he can backup the database_a to the c:Program Files.....Database_a.BAK but he cannot restore it with some message said ''not enough security privieges..
Please quote some example right assigment so that I can replicate to our environment
We currently built a new SQL2005 server and have serveral sentitive Payroll database hosted in it. I managed to seperate some roles to various users to prohibit them to direct access the data but can access it via front-end application.
The problem is I setup a backup operator with the following rights
Server Roles -- Public
User Mapping
User Mapped to this login / Database membership for
PayrollDataBase_1 BackupOperatorName
db_backupoperator / db_denydatareader / db_denydatawriter / public
However, I try to login using the 'BackupOperatorName' in my workstation and Backup the PayllrollDataBase_1 to a server shared path says E:SqlDataBacupPayrollDataBase_1.BAK. Afterward, I copy it over the network back to my workstation and RESTORE in back to my local SQL2005 instant using the local SQL2005 SA user. All data CAN BE browse
Anyone please help to post how to restrict the Backup operator can only Backup the database but cannot restore to its local SQL2005 instant
I would like to know if there is a way to find out who changed a users roles/access WITHOUT using the audit function. For example, if a user account was created and given SA access then changed to read only, how can I find out who made that change? I tried searching for an answer, but kept getting no results. I'm thinking this may tie into the sys.sysusers view?
This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database) Help pleaseee
Am using SSMS to add users to a DB and here is an issue I cant conquer.
User id's in this format "Aname" work as designed User Id's in this format "John P User" will not be recognized by ssms as valid windows user names even though "John P User" is Administrator of the local computer or even Domain Administrator. I have tried a script to enter the name and still the multiname format errors out where the normal naming format works every time..
Im new to the forum and very green in this arena, I have scanned 43 pages looking for a similar issue and have found nothing even remotely similar in a post.
I would be thankful for any bones you wise people could throw my way.
This is a really urgent request for some info. I can't seem to find details on this particular problem even though i can find so much general info.
I am installing SQL Server Enterprise Edition. I want to license it with 100 USER CALS. When i get to the 'Choose licensing mode' screen, I have two options:
How would I go about setting up users to access my database through a windows program. Once the program is deployed on the user's desktop, they can not log into the database (via the program) using their credentials, but if the user logs on as the administrator, there is no problem. (Granted, this is in the beta development stage, so there is only one person logging in as the administrator.)
I have my setup strings in my app/config settings file, to use windows authentication, but apparently I don't have someting set up correctly. I added a specific user to my database thru SSMS and gave them the dbo as the default scheme (probably too much?), but they still can't log in.
Is this going to be a Active Directory issue, or a security issue in SQL Server 2005?
I have an application that controls user logins, passwords, etc. at the front end for a SQL database. I am in the stage of migrating to SQL2005 and cannot get the TSQL code to allow a user to change their own password. Here's the background;
The ADMIN of the app is a Sysadmin on the SQL server and can create logins, set roles, etc. Assume the Admin creates a user TOM with a password of xxxx. This works fine using the create login statement from a Connect.Execute statement from my app like so;
When TOM logins into my app, he will have to change his password at some point. The TSQL code I am using (which fails) is executed by TOM who has a connection to the SQL db because he is logged into the app.
"Alter Login TOM With Password = 'xxxx' Old_Password = 'xxxxx', Check_Policy = OFF"
At this point I get an error:
RunTime error -2147217900 (80040e14) ODBC SQL Server Driver][SQL Server] Cannot alter the login 'TOM', becuase it does not exist or you do not have permission.
Obviously it exists since TOM is currently logged into the SQL Server. So if it's permissions related, what permissions does a user need to change his/her password? Or is there another way to do it?
We have a small Ethernet LAN running SBS 2003 R2. I have installed SQL Server 2005 that came with that release on the server. I did not specify a named instance.
1) What is the name of the default instance?
2) When I go to a client computer I cannot see the SQL server instance.
For example on my PC I have VS2005. If I go to Server Explorer, all I see is the local copy of SQL Server 2005 Express I have installed on my PC. I see nothing for the server. Does the server need configuring within SQL Server to allow this. Do I need to change permisions on the folders where the SQL Server 2005 files are stored.
In short, what basic steps do I need to follow to get acces to SQL Server on my server from a client.
3) If I want to create a new named instance, do I have to do Run the whole setup again? There appears to be no managemnt tool for instances of SQL server.
I was trying to install SQL Server 2005 Developer edition on a Windows 2003 Server standard edition .
The error messages I got was
"TITLE: Microsoft SQL Server 2005 Setup ------------------------------
SQL Server Setup was unable add user NT AUTHORITYSYSTEM to local group SQLServer2005MSFTEUser$SANORAYA$MSSQLSERVER.
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=setup.rll&EvtID=29512&EvtType=sqlca%5csqlsecurityca.cpp%40Do_sqlGroupMember%40Do_sqlGroupMember%40x8ac
I run setup under Administrator account, the server is not a DC. Please shed some lite, I spent two days already trying everything in all possible combinations...
Is it possible to create a new user into Windows 2003 users table (not Sql) through a sql 2005 query ?
I ask this because I forgot the admin password of the Windows 2003 server and this is in a remote location, so I though, since I have the admin password of SQL 2005 server, maybe it could help me to log onto Windows 2003 and reset windows admin password.
I'm having trouble running TSQL commands when SQL2005 is in single-user mode.I've restarted SQL with -m, -c, -T3608 set in the startup options.I can get into Config manager OK, but as soon as I try to start a NewQuery it complains that the DB is in single-user mode and there'salready someone connected to the DB.Is there something I need to turn off? If not, how am I supposed torun queries in single-user mode? What I want to do is move the modeland msdb databases but I can't run the commands to do this until I getpast this problem.Thanks for any assistance you can give on this.Mike
Would be interested in any advice or comment on the issue we are experiencing with SQL 2005.
In order to test some DTS package migrations, we simply created a DTS package on SQL 2000 (using Export) to copy all database objects from one database to another.
Then we restored the source database on SQL 2005 server, migrated the DTS package, and tried to execute it.
The package migrated 'fine', ran part way, and then failed. Since then we have been unable to connect to the server (Database Engine, or Integration Services) using Windows Authentication. (Error 18456, Sev 16, State 11).
We can connect to the Database Engine using SQL Authentication (but not to Integration Services which only allows Windows Authentication).
We have been able to replicate this consistently - every annoying time we've tried it!
(Reinstalling SQL Server does 'fix' the issue ... until you try a similar package again).
I have a windows application that connects to a SQLExpress database hosted on a shared server. The client machines will run an interface software and interact with the info within SQL The SQL database isn't huge (50 megs) and all of the info is text. The interface application isn't too complex either, it was designed using VB.net05. I have a few setup questions:
1 - Is it best to use Windows or SQL authentiaction? Currently I am using Windows authentication and I have a user group setup on the DNS that is setup as a user for the SQL database. That has worked so far, but I've only had a few users logged in at one time so far. My plan was to add all DNS accounts that will use the software to the DNS user group, thus giving them access to the SQL database.
2 - I know this gets asked a TON, but I am interested in knowing how many users I should be able to support using the current setup. I have the one user acount setup for the DNS user group. The SQL table is not huge and it is all reading and writing text. The server is running Windows Server 03 and is a couple years old (not sure of exact specs).
Thanks for any help, I am still learning my way around SQL and it's great to have such a vast amount of support for the product.
Hi. Thru a sproc, I drop & re-create some temp tables.When I call that sproc from the client, though, I cannot drop thetables.I need to allow the user, say "Alex", to drop/create tables (actually,that would be DDL). Which role should "Alex" assume ? How do I do that?I run the following sproc named, say, "CREATE_TABLE" (SNIP):__________________________________________________ __________________Set @StrSQL = 'if exists (select * from dbo.sysobjects where id =object_id(N''[dbo].[' + @TableName + ']'') and OBJECTPROPERTY(id,N''IsUserTable'') = 1) drop table [dbo].[' + @TableName + ']'Exec (@StrSQL)Set @StrSQL = 'CREATE TABLE [dbo].[' + @TableName + '] ([GROUP] [varchar] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,...........[Stuff] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL) ON [PRIMARY]'Exec (@StrSQL)Set @StrSQL = 'GRANT SELECT , UPDATE , INSERT , DELETE ON [dbo].['+ @TableName + '] TO [Alex]'Exec (@StrSQL)__________________________________________________ __________________As you can see, it is dynamic, because I need to repeat it for many@TableName values - that means, further more, that I will be executingthis in the context of the current user, Alex, and therefore I have togive Alex rights to both executing the sproc and to the tables referredto by the sproc, as specified by @TableName.I created a _TEST sproc which contains only the following:_______________________________________________CREATE PROCEDURE _TEST ASDROP TABLE [dbo].[SomeTable]RETURN_______________________________________________When I execute it from the client, thru ADODB, on user Alex, I get"User does not have permission to execute this operation on tableSomeTable"The table has been created thru "CREATE_TABLE", abovePlease help, I have to finish this tomorrow, and I'm under tons ofpressure.Thanks a lot,Alex.
I'm working on a project that requires integration of SQL Server Reporting Services with ASP.NET 3.0 Web Applications. I'm working on Visual Studio 2005, with SQL Server 2005 on an XP development workstation. SQL Server, Reporting Services, and IIS are all running on my local machine.
I'm trying to prototype two approaches, one using the Report Viewer control, and the second using the Reporting Services Web Service. I have the two examples setup in projects in Visual Studio. The sample reports and data sources work fine in Visual Studio. I can access the report using the Reporting Services URL like this: http://localhost/Reports/Pages/Report.aspx?ItemPath=%2fBTT_BDS_DEV%2fCustomers; Report works fine.
My problem is, that when I try and access the report using the Report Viewer inside an ASP.NET page or from the Web Serivce hooked up inside an ASP.NET Page I get a security errors. I have chosen Windows Security for the Datasource, and ASP.NET pages. In the case of the Web Service, I'm passing in my local domain user name as the credentials.
I'm prototyping this on my local workstation, but I need to design this to be used on our corporate Intranet using Windows Security.
My questions are:
1. How do I need to setup users on my local development workstation to get this to work. 2. How should I plan for user security for enterprise deployment, i.e. using Reporting Services inside a large ASP.NET Web Application? 3. Can anybody give me some links to some good developer type working examples of doing this. I've looked but have not found the answers to the "how do I setup users" part of the question specifcally related to ASP.NET apps?
Below is the code example of the Web Services example app I'm working with which came out of a book I have on Reporting Services. This example compiles and seems like it would work but doesn't. Also following are a few of the error messages I get when experimenting with the example apps:
Errors:
1. The permissions granted to user 'LocalMachineNameASPNET' are insufficient for performing this operation. (rsAccessDenied)
2. System.Web.Services.Protocols.SoapException was unhandled by user code Message="System.Web.Services.Protocols.SoapException: The permissions granted to user 'LocalMachineName\ASPNET' are insufficient for performing this operation. ---> Microsoft.ReportingServices.Diagnostics.Utilities.AccessDeniedException: The permissions granted to user 'WCRBUSCNC2830B\ASPNET' are insufficient for performing this operation. at Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32& executionOption, String& savedParametersXml, ReportSnapshot& compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime& historyOrSnapshotDate, Byte[]& secDesc) at Microsoft.ReportingServices.Library.GetDataForExecutionAction._GetDataForExecution(CatalogItemContext reportContext, ClientRequest session, String historyID, DataSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& snapshotExecutionDate, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings) at Microsoft.ReportingServices.Library.GetDataForExecutionAction.ExecuteStep(CatalogItemContext reportContext, ClientRequest session, DataSourcePromptCollection& prompts, ExecutionSettingEnum& execSetting, DateTime& executionDateTime, ReportSnapshot& snapshotData, Int32& pageCount, Boolean& hasDocMap, PageSettings& reportPageSettings) at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save() at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo) --- End of inner exception stack trace --- at Microsoft.ReportingServices.WebServer.ReportExecution2005Impl.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo) at Microsoft.ReportingServices.WebServer.ReportExecutionService.LoadReport(String Report, String HistoryID, ExecutionInfo& executionInfo)" Source="System.Web.Services" Actor="http://localhost/ReportServer/ReportExecution2005.asmx" Lang="" Node="http://localhost/ReportServer/ReportExecution2005.asmx" Role="" StackTrace: at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at WebReportTester.localhost.ReportExecutionService.LoadReport(String Report, String HistoryID) in C:Documents and SettingsconbcxMy DocumentsVisual Studio 2005ProjectsBTT_BDS_DEVWebReportTesterWeb ReferenceslocalhostReference.cs:line 242 at WebReportTester._Default.btnExecuteReport_Click(Object sender, EventArgs e) in C:Documents and SettingsconbcxMy DocumentsVisual Studio 2005ProjectsBTT_BDS_DEVWebReportTesterDefault.aspx.cs:line 82 at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
//Create an instance of the Reporting Services Web Reference localhost.ReportExecutionService rsv = new localhost.ReportExecutionService();
//Create the credentials that will be used when accessing Reporting Services //This must be a logon that has rights to the Customers Report rsv.Credentials = System.Net.CredentialCache.DefaultCredentials; rsv.PreAuthenticate = true;
//The Reporting Services virtual path to the report. string reportPath = @"/ReportFolder/Customers";
//The rendering format for the report string reportFormat = "HTML4.0";
//The devInfo string tells the report viewer how to display with the report StringBuilder deviceInfoBuilder = new StringBuilder(); deviceInfoBuilder.Append(@"<DeviceInfo>"); deviceInfoBuilder.Append(@"<Toolbar>"); deviceInfoBuilder.Append(@"False"); deviceInfoBuilder.Append(@"</Toolbar>"); deviceInfoBuilder.Append(@"<Parameters>"); deviceInfoBuilder.Append(@"False"); deviceInfoBuilder.Append(@"</Parameters>"); deviceInfoBuilder.Append(@"<DocMap>"); deviceInfoBuilder.Append(@"True"); deviceInfoBuilder.Append(@"</DocMap>"); deviceInfoBuilder.Append(@"<Zoom>"); deviceInfoBuilder.Append(@"100"); deviceInfoBuilder.Append(@"</Zoom>"); deviceInfoBuilder.Append(@"</DeviceInfo>");
string deviceInfo = deviceInfoBuilder.ToString();
//Create an array of the values for the report parameters localhost.ParameterValue[] parameters = new localhost.ParameterValue[1]; localhost.ParameterValue parameterValue = new localhost.ParameterValue(); parameterValue.Name = "@WTRKCustomerCode"; parameterValue.Value = "B34186"; parameters[0] = parameterValue;
//Create variables for the remainder of the parameters string historyId = string.Empty; string credentials = string.Empty; string showHideToggle = string.Empty; string extension = string.Empty; string mimeType = string.Empty; string encoding = string.Empty; localhost.Warning[] warnings; localhost.ParameterValue[] reportHistoryParameters; string[] streamIds;
localhost.ExecutionInfo execInfo = new WebReportTester.localhost.ExecutionInfo(); localhost.ExecutionHeader execHeader = new WebReportTester.localhost.ExecutionHeader(); rsv.ExecutionHeaderValue = execHeader;
try { //Execute the Report report = rsv.Render(reportFormat, deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIds);
//Flush the pending response Response.Clear();
//Set the HTTP Headers for a PDF response. HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.ContentType = "text/html";
//Filename is the default filename displayed //if the user does a save as. HttpContext.Current.Response.AppendHeader("Content-Disposition", "Customers.htm");
//Send the byte array containing the report as a binary response. HttpContext.Current.Response.BinaryWrite(report); HttpContext.Current.Response.End();
} catch (Exception ex) { if(ex.Message != "Thread was being aborted.") { HttpContext.Current.Response.ClearHeaders(); HttpContext.Current.Response.ClearContent(); HttpContext.Current.Response.ContentType = "text/html";
I am setting up the replication with the scripts which used to setup in MSSQL2005 (non-cluster server). After I run the script and start the snapshot agent, log agent or distributed agent, it prompts,
Unable to start execution of step 2 (reason: Error authenticating proxy abc.comadmin9, system error: Logon failure: unknown user name or bad password.). The step failed.
abc.comadmin9 is the administrator for all cluster, mssql service and I am sure that the username and password is correct.
I've been developing desktop client-server and web apps and have used Access and SQL Server Standard most of the time. I'm looking into using SQL CE, and had a few questions that I can't seem to get a clear picture on:
- The documentation for CE says that it supports 256 simultaneous connections and offers the Isolation levels, Transactions, Locking, etc with a 4GB DB. But most people say that CE is strictly a single-user DB and should not be used as a DB Server. Could CE be extended for use as a multi-user DB Server by creating a custom server such as a .NET Remoting Server hosted through a Windows Service (or any other custom host) on a machine whereby the CE DB would run in-process with this server on the machine which would then be accessed by multiple users from multiple machines?? Clients PCs -> Server PC hosting Remoting Service -> ADO.NET -> SQL CE
- and further more can we use Enterprise Services (Serviced Components) to connect to SQL CE and further extend this model to offer a pure high-quality DB Server? Clients PCs -> Server PC hosting Remoting Service -> Enterprise Services -> ADO.NET -> SQL CE
Seems quite doable to me, but I may be wrong..please let me know either ways
How does one enable sql connections limits for user connections per new and existing databases? how to do it on whole server per database but not set a limit per user.Looks like this must be run on each databases but what if you have 100s of databases:
USE AdventureWorks2012 ; GO EXEC sp_configure 'show advanced options', 1; GO RECONFIGURE ; GO EXEC sp_configure 'user connections', 325 ; GO RECONFIGURE; GO
Is there any way to get more information for when IAuthorizationExtension::CheckAccess fails to grant access to a report item for the current user? Specifically, it would be useful to know:
1. URL of attempted report 2. IP address of user agent 3. Identity of current user 4. Date/Time of the failed attempt
When I am in Visual Studio 2005, and I try to add an SQL database, I get the following error "generating user instances in sql server is disabled. use sp_configure user instances enabled to generate user instances." I am currently using SQL server 2005 Express. What do I need to do, to create an SQL database? Thanks in advance.
i'm using the Enterpirse library logger to write logs into a database. When choosing connection string i choose the database i want in the "connection properties" dialog box and push 'Test connection' button. everything goes well.
then i open the SQL Server Management studio express and connect to the databse to check some things, from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:
"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"
even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore.... it only work when i restart the computer.
Hello All,I tried to set the access permissions for debugging stored procedure by reading the articlehttp://msdn2.microsoft.com/en-us/library/w1bhybwz(VS.80).aspxandhttp://technet.microsoft.com/en-us/library/ms164014.aspxI have tried to add the role to sysaminas follows1)SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_NAME = 'sp_sdidebug'(to find the sp)Error:--The stored procedure not found2)sp_addsrvrolemember 'Developmentswati.jain', 'sysadmin' though this is executed successfuly . Error is still persisting Cannot debug stored procedures because the SQL Server database is not setup correctly or user does not have permission to execute master.sp_sdidebug.
Is it possible to allow only a particular user to e.g. User1 to access the database the user created? Not even the Built-in administrator or the sa can access? I am using Mixed mode authenication..
Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'. I have This Error When i try to log into My online web site, i have no idea how to fix it,one day it was working and the next it wasnt, is there any way to find out what database the default is and if it's either incorrect or not present change the web.config in a way that will make my system work. i have the NT Authority/Network Service in my Server Properties Permissions, its given the type login and is granted Connect SQL by sa i have 3 colder copies of the web site on my server my question is, how would i use of of these to restore the original site configuration is there a way to restore the original configuration to undo whatever it is i've done to break the system ChrisStressed
I have several reports for users to view on our Intranet. After installation of SQL 2005 SP2 patch, I cannot delete user or user's authority from Report in Properties Tab. An error message was shown on the status bar. It indicated that JavaScript Error: 'Return' statement outside of function. Seems something wrong with the 'Delete' funciton in SQL 2005 after update. The other functions worked fine. Could you point me out how to fix it or need to install any updates / hotfix. Thanks a lot!