Sql server grants access to specific login to database.

i have created website for intranet and hosted it on server. for that i needed to create login "IIS APPPOOL\hi" in sql server 2008 for my application
to access my "reportdb" database. "IIS APPPOOL\hi" has sysadmin and public server roles in sql server 2008. And i have default login"sa" same
as "IIS APPPOOL\hi". these are working correctly. Now I want these two logins to access"reportdb" for all
operations in database and remaining all logins should be denied to access"reportdb". My Sql Server 2008 is having mixed mode (windows authentication and Sql authentication). plz help me

I think what Tauseef is requesting is to keep access for the 2 sysadmins & deny access to everyone else, correct?
As Uri mentioned, by being part of sysadmin role, “IIS APPPOOL\hi” & “sa” would have access to everything in the server, and nobody else should have access to the DB unless explicitly being granted access.
If you would really deny anyone else access to the database, you can potentially deny connect to public, and only sysadmins (who override permissions) would be able to connect; although I would strongly recommend against such practice.
Something else I would like to recommend against is the usage of sysadmin for what may not be a DBA role (IIS appPool). Following the least-privilege principle, I would recommend having a non-administrator user for applications that has enough capabilities
to perform the tasks needed.
The main risk is that a SQL injection (SQLi) bug in your application would lead to a complete compromise of your SQL server.
If there are app tasks that would require elevated permissions, I would recommend encapsulating the logic in a stored procedure and either use impersonation or digital signatures to accomplish a controlled elevation of privileges instead. If you have any
question on this topic I will be glad to assist.
I hope this information helps,
-Raul Garcia
 SQL Server Security
This posting is provided "AS IS" with no warranties, and confers no rights.

Similar Messages

  • I have problem with login in sql Server give me support .pre login handshake

    I have problem with login in sql Server give me support .pre login handshake

    The following threads are on the same topic:
    http://www.sql-server-performance.com/forum/threads/pre-login-handshake-error-when-connecting-to-db.687/
    http://stackoverflow.com/questions/12308340/sql-server-2000-connection-error-pre-login-handshake
    http://dbaspot.com/sqlserver-server/458011-error-occurred-during-pre-login-handshake-microsoft-sql-server-error-10054-a.html
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to access ,Oracle 7.x,SQL server,MS access data from portal 3.0.7

    hi,
    i am sorry to repost it . but
    we r badly in need of accessing data from Oracle 7.x,SQL Server and access to Portal3.0.7 Applications.
    pl. help us.
    null

    Hi swati,
    1. for this u will also require help of basis team.
    2. these are the steps.
    a) make an entry in DBCON
    b) make connection string
    (on the physical application server,
    so that it can connect to secondary database)
    (this will be done by basis team,
    in which, they will specify the
    IP address of the secondary database server,
    the DATABASE ID, and the port number)
    c) then using open sql / native sql,
    we can use the secondary database connection,
    just like normal.
    d) if we use open sql,
    then there must be Y/Z table on
    sap as well as secondary database,
    and the field names , their type all should be identical.
    regards,
    amit m.

  • Progress Reporter. I can't access,not granted access for direct login

    I am trying to Access to Progress Reporter.
    Web Access is running correctly and I got access with "admin" user. But when I am trying to use the admin user for Progress Reporter I got this message:
    Logon denied for[admin]. You are not granted access for direct login,please contact your administrator. Please choose 'OK' to make corrections or 'Cancel' to exit tha application.
    I don't know how to create user for Progress Report if that is the problem. Please help me......I will appreciate your help a lot.
    Thanks

    I have the same problem (p6v7), but the diference with the case mentioned, I have all checkbox marked correctly and all permision to users.
    When I tried to loggin appear the same error
    Have someone any tip???
    Thanks

  • SQL Server Reporting Services installed on a production database server used to support JD Edwards EnterpriseOne. What performance isses can arise

    SQL Server Reporting Services installed on a production database server used to support JD Edwards EnterpriseOne. What performance isses can arise. Is it recommended. What are the pros and cons

    Hi hazelannc, 
    I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. Thank you for your understanding and support.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • SP1 to R2 Upgrade - The installed Version of SQL Server is not supported for the operational database

    Hello, 
    Am trying to upgrade a SCOM SP1 environment to SCOM R2( 3 MGT servers, 1 GW and 2 Web console boxes )
    The prerequisites are failing and it is stating the following ; 
    Operational Database SQL Version Check - The installed Version of SQL Server is not supported for the operational database
    Data Warehouse  SQL Version Check - The installed Version of SQL Server is not supported for the data warehouse
    The SQL servers are running SQL 2012 SP1 64 Enterprise, which is compatible.
    All other pre-upgrade tasks have been done. 
    Help appreciated! 

    I'm having the exact same issue, I believe. I think that Tubble has problem with SCOM 2012. Not 2007.
    I've checked the compatibility list for both SCOM 2012 SP1 and R2. All newer Windows Server and SQL versions are supported. We're running the SQL 2012 SP1 x64 Standard edition on a Windows Server 2012 Standard.
    I even tried to move the database from SQL 2012 to an older SQL 2008 R2, but that's not supported either. Only upgrading. Not downgrading.
    So, I started checking the opsMgrSetupWizard.log file for clues. And the error message was there as well. But the reason why it says not supported is that it can't get the info about the OS version, so I guess it assumes the OS version is to low. The RPC
    service can not be reached.
    [10:29:11]: Error: :GetRemoteOSVersion(): Threw Exception.Type: System.Runtime.InteropServices.COMException, Exception Error Code: 0x800706BA, Exception.Message: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    [10:29:11]: Error: :StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupValidationHelpers.GetRemoteOSVersion(String remoteComputer)
    [10:29:11]: Debug: :IsSQLOnAValidComputer: remote OS version string was null or empty.
    [10:29:11]: Error: :Error:IsValidSQLVersionCheck: SqlServer OS version is too low.
    [10:29:11]: Debug: :**************************************************
    [10:29:11]: Error: :<![CDATA[CheckPrerequisites: Logic Type:and IsValidOMDBSQLVersionCheck: 2]]>
    [10:29:11]: Error: :
    [10:29:11]: Error: :CheckPrerequisites: OMDBSqlVersionCheckTitle: Failed
    [10:29:11]: Error: :
    [10:29:11]: Debug: :**************************************************
    [10:29:33]: Error: :GetRemoteOSVersion(): Threw Exception.Type: System.Runtime.InteropServices.COMException, Exception Error Code: 0x800706BA, Exception.Message: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
    [10:29:33]: Error: :StackTrace: at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
    at System.Management.ManagementScope.InitializeGuts(Object o)
    at System.Management.ManagementScope.Initialize()
    at System.Management.ManagementObjectSearcher.Initialize()
    at System.Management.ManagementObjectSearcher.Get()
    at Microsoft.EnterpriseManagement.OperationsManager.Setup.Common.SetupValidationHelpers.GetRemoteOSVersion(String remoteComputer)
    [10:29:33]: Debug: :IsSQLOnAValidComputer: remote OS version string was null or empty.
    [10:29:33]: Error: :Error:IsValidSQLVersionCheck: SqlServer OS version is too low.
    [10:29:33]: Debug: :**************************************************
    So, in our case this was just a FW that was blocking some high ports between management server and SQL. I believe TCP port 135 also needs to be open.
    Let's hope this fixes your issue as well, Tubble.
    Have a great day!

  • SQL Server 2012 installation and to default user database files to a particular path

    Hi, I am working on SQL Server 2012 installation on one of our test boxes and I would like to configure the sql server install binaries and all the system databases but for tempdb to be in my C and tempdb on a different drive and once all this is set up,
    whenever a developer creates a new database without specifying the path for the mdf & ldf files. They should be defaulted to a path like "D:/Data file" & "D:/Log file" for instance instead of being created on the C drive.
    Thanks in advance.........
    Ione

    Hi,
    You can of course set default location of database through management Studio please refer below link. Once you change default location even if you do not specify location it would take default one.
    http://sqlandme.com/2013/03/18/sql-server-changing-default-database-location-for-server/
    I would advise you not to keep files on C drive let it be dedicated system drive also its quite possible that SQL server service account would not have privilege on C drive so after you move tempdb SQL server would not come online as tempdb files cannot
    be created . Tempdb is always recreated after SQL Server starts so you just need to change location once using Alter database command
    See example mentioned in below link for how to do that
    http://msdn.microsoft.com/en-us/library/ms345408%28SQL.90%29.aspx
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Event 3351, SQL database login for 'DB_Config' on instance failed. Additional error information from SQL server is mentioned below. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

    category-database
    event id-3351
    source-sharepoint foundation
    SQL database login for 'DB_Config' on instance 'DB\instance' failed. Additional error information from SQL Server is included below:
    Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
    I have been getting this error every hour on only 1 application server of the 2.
    My farm consists of 2 app servers, 2 wfes & 2 sql nodes.
    My public site is working fine. Authentication is NTLM.
    SharePoint VSS Writer is disabled.None of my appPool accounts are running under local system.
    I have read many forums/blogs, but couldnt find a solution for this.
    Any help would be appreciated!

    Hi,
    As I understand, you found event id 3351 in event log. Please collect more information as below:
    Check if the error also occurs on other servers in your farm.
    Check if backup job is scheduled at the time when the event id occurs.
    Please run Config Wizard or psconfig.exe -cmd secureresources on all servers and test the issue again.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Ideas for Sql Server jdbc access from OS/390 mainframe?

    I'm trying to access a SQL Server database from a Java application running on an OS/390 mainframe.
    Any ideas?
    Thanks.

    Use a type 4 driver.
    Shouldn't be a problem.

  • While tring to coonect to SQL server from MS excel getting Login Failed error

    Hi I am trying to connect to SQL Server DB from another server using the MS excel connect to SQL server in other data sources option.
    When I am trying to connect I am getting the following error, "Login Failed For User xxxx\yyyy".
    In the DB server this user is the super user and he is having complete set of permissions, need help on this.
    Thanks,
    Neela Krishna B

    As you are using the SQL Server Authentication to connect the database, please make sure you have already check the option 'SQL Server and windows Authentication mode' in your DB Server, also check if this login account is enabled.
    If you can connect the database with this login account in this server using SSMS,  You can connect the database in Excel too.
    Wind Zhang
    TechNet Community Support

  • Cannot install SQL Server Express - Access is denied messagwe

    When trying to run the downloaded SQL Server Express EXE, I get an error message "Access is denied".  Can anyone advise me how to proceed?

    Are you running from special folder i.e desktop ?
    Can you try to de-compress first then launch setup
    to de-compress express package run from the commandline
    <package.exe> /x:"<decompression path>"
    FAQ
    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    My Blog
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful"
    on posts that help you.
    This can be beneficial to other community members reading the thread.

  • Sql server 2008 access denied

    hello everyone
    I have installed Sql server 2008 then
    when i cretae database getting following error
    Msg 262, Level 14, State 1, Line 1
    CREATE DATABASE permission denied in database 'master'.

    You should be either member of the "sysadmin" or "dbcreator" server role to create databases, check the permissions
    http://technet.microsoft.com/en-us/library/ms178569.aspx
    http://msdn.microsoft.com/en-us/library/ms188659.aspx
    Please click the Mark as answer button and vote as helpful if this reply solves your problem

  • Sql server data access

    CAN i use apex to build application using data os sql server Micrsosoft residing on another server
    Please tell me hos
    Thanks

    Hello Prashant,
    I will suggest the use of [url http://docs.oracle.com/cd/E11882_01/server.112/e25494/ds_concepts002.htm#i1007669]Database Links.
    Refer:
    http://www.dba-oracle.com/t_heterogeneous_database_connections_sql_server.htm
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4406709207206
    This will be a good read too:
    http://jes.blogs.shellprompt.net/2008/04/01/apex-ported-to-mysql-and-sqlserver/
    Forum Thread:
    {thread:id=981539}
    Hope it helps,
    Regards,
    Kiran

  • SQL Server wants to open properties of wrong database and cannot restore logs of different databases at the same time

    We have implemented our own way of logshipping by backing up the transaction logs of all our non-system databases every hour. Then we transfer the backups (before SQL Server 2008 R2 with additional zip and unzip steps) to the second environment where we
    restore them only during the night on databases in standby-state (Like this, our developers can access the databases without disturbing the productive system and we can restore the t-logs during night, so not shutting out the developers during the day).
    Now since we replaced our hardware in the productive environment, we replaced the hardware in the second environment with the servers from previous productive environment. Same SQL Server 2008 R2, same Service Pack (SP2), same installation procedure. But
    since then the SQL Server in the second environment behaves different:
    - When the logs of some database "A" are restored, I cannot access the properties of any database, i.e. database "B", I only get the error message "Cannot show requested dialog. (SqlMgmt) Database 'A' cannot be opened. It is in the
    middle of a restore. (Microsoft SQL Server, Error: 927)"
    - Our logshipping runs multiple instance at the same time, so restoring multiple databases' logs. But since the change, two of the instances fail restoring of datatbases, i.e. "B" and "C" with the error message "Database 'A' cannot
    be opened. It is in the middle of a restore.". The jobs guarantee to restore only logs of the database they need to restore, they have strictly separated sets of target databases and only try to restore the databases of their sets.
    Before the new installations, we did not have these strange behaviours. But as said, it is the same SQL Server version, the same service pack, and we followed the same installation document but maybe with the small changes in settings. The user the jobs
    are running under is a domain admin, the login they use has dbcreator, processadmin, db_owner and db_backupoperator roles. My login on the SQL Server has sysadmin rights and as described similar problems.
    Is this problem known or does somebody have an idea where to go looking for?
    Thanks, Chris

    Hi Christar,
    According to your description, after you configuring Log shipping between two database, you remove the hardware from production environment to dev environment, in this hardware, there are saved the transaction logs of your database.
     When restoring  your database, there will occurs error 927, right?
    SQL Server Log shipping allows you to automatically send transaction log backups from a
    primary database on a primary server instance to one or more
    secondary databases on separate secondary server instances. It consists of three operations:
    1.Back up the transaction log at the primary server instance.
    2.Copy the transaction log file to the secondary server instance.
    3.Restore the log backup on the secondary server instance.
    Since you want to move your hardware avoiding copy job, we need to verify if .mdf and .ldf file are not saved in your hardware, or else,
     if you move your hardware, you could not open your database in your Primary Server. I recommend you can refer to the following steps.
    Full back up your primary database and restore it into the secondary database. It would have been set up as WITH STANDBY ,the databases would read StandBy/ Read Only.
    Perform transaction log backups via a SQL Server Agent job running on the primary server instance, save them in your hardware.
    In night, you move hardware to your dev environment, you can manually restore these transaction log backups or set up a SQL Server Agent job to restoring them from your hardware.
    There is detail about how to configure log shipping in SQL Server 2008R2 step by step, you can review it.
    http://mostafaelmasry.wordpress.com/2013/01/02/log-shipping-in-sql-server-2008r2-step-by-step/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Cannot grant access a user to a database

    Hello...
    I am using SQL Server 2012 Express Management Studio. I have a database with a user which is db_owner of a database.
    I have created another database and I need that user to have full access to it. I have created the user and assigned to the database as a db_owner, but when I connect using that user, I can expand database node, however, I did not see any table.
    As "sa" user, I edit user properties however I cannot add explicit persmissions to the database tables because in protectable elements in user properties does not show any tables.
    Any help will be appreciated,
    thanks
    Jaime
    Powered by C++

    Hi Jaime,
    According to your description, you are unable to see any tables using the login account which has db_owner database role in the database. I agree with Ashwin that your table is created in other database if you indeed create the table. You could verify this
    using the code below to find the database in which your table resides by replacing 'your_table_name' with the table name.
    sp_MSforeachdb 'SELECT "?" AS DB, * FROM [?].sys.tables WHERE name like ''%your_table_name%'''
    In addition, if you create tables using Transact-SQL, please make sure to use the statement “USE { database }“ to change the database context to the specified database.
    Regards,
    Michelle Li

Maybe you are looking for

  • Problem with SLD and Creation of JCo

    Hello everyone! I have a problem with the SLD and the Creation of JCo on the Portal, in trying to create the JCo always tells me that the name used there in the SLD, being that the facility is new. Who performs the installation, set in the SLD the EC

  • Restoring deleted emails from a mailbox database edb file.

    hello all. i have done some reading up on this subject and also covered it off in my MCSA 70-341 training. ( some time ago) i dont deal with the exchange server often and would like to be clear before i delve into the exchange server. a user has lost

  • I need the right download file for CS4 Design standard.

    i can not install cs4 from the cd's i bought a few years ago and i can not find the right download file so i can go use again

  • Receiving procedure for scrap against SC PO

    Hi, SC Po is prepared with BOM as usual with offgauge/scrap qty (-). In my scenario Scrap will be received afterwords and not with the output material. If I receive the material without BOM , and try to receive seperately against same PO , system giv

  • New iTunes 10.5.3 quits unexpectedly.

    Has anyone else had problems with new iTunes U quitting everytime you try to access the featured content from an iPad.  The strnge thing is that it works ok on my iPhone.