Users in SQL databases

I took up programming a couple of months ago (alongside my day job) and am struggling with a couple of basic concepts. Currently, I'm trying to learn how to build a database based PHP login/logout for a web app.
Can anyone help me understand the concept of database users? The way I see it, there is:
a database server (which serves all the databases created, sort of like an "OS serves all the apps installed")
all the databases, with their tables inside
users (? this is where it gets confusing for me - how many and which users do I need?, what are basic good practices?)
users from the table "users", which will get into this table by registering on the website are not the same as users that the app uses to connect to the database? Or are they?
I apologize, I understand that these are basic concepts but I find the available web tutorials lacking in good concept explanations. Everyone seems to want to jump right into the coding part asap whereas I find that programming is more about ideas and concepts
and then about syntax and languages.

A Login  is used to grants the  entry into the SERVER.
A User grants a login entry into a single DATABASE.
One Login can be associated with many users (one per database).
http://www.akadia.com/services/sqlsrv_logins_and_users.html
mark as answer if it is useful

Similar Messages

  • How to create a user in SQL database table for FBA in SharePoint 2013

    Hi,
    I am trying to configure Form Based Authentication on my SharePoint Dev machine. The purpose is to add an external user to a table (using a registration page).The provider used is SQLMembershipProvider.The dev machine is also configured as domain controller
    so all users created locally are AD users.
    Reference articles that i checked are
    Either adding users to the database as a windows user (i.e. under users section in the database). But on my machine, windows user would be same as adding a AD user.
    Or by creating a dedicated IIS site for .Net users (after creating a FBA DB using aspnet_sql tool). Right now i have implemented FBA using this method.
    Is it possible to add user details in a table of choice and then access that user using people picker? (without any third party tools).
    Thanks,
    Thomas

    Hi,
    We can use CreateUserWizard control to achieve it.
    Here is a blog for your reference:
    Adding Users With SharePoint Forms Based Authentication
    http://psterpe.wordpress.com/2009/05/24/adding-users-with-sharepoint-forms-based-authentication/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Changing user permissions SQL Database Server for OBIEE repository

    Hi All
    We have installed OBIEE 11g and are using database SQL Server 2008 R2.
    The users of the repositories are connected to the master database, and our client query if these users can be disconnected from the master database, so that only stay connected to their corresponding repositories.
    Please help with this question.
    Regards
    Pedro

    Hi,
    You can move out of Master database with SQL server. If such a case is being considered then you have to create a database with SQL server then move all the existing OBI repository's and its users to the new Database. Once this change is complete on the Database side on Weblogic Database connect strings needs to be changed.
    Let me know if this helped.
    Regards,
    Jay

  • Contained Database Users are now available in Azure SQL Database Update preview

    Contained Database Users should be of particular help for people migrating to Azure SQL Database. At the moment, this is a preview release but you can start testing. Here is the announcement of the
    preview with links to more information.
    New SQL Database public preview with new Standard-tier performance level
    Previously announced in November 2014 and now available for customers to try, the
    new
    public preview of SQL Database improves the compatibility of SQL Server applications for Azure SQL Database. Details of this preview are available on the
    SQL
    Database documentation webpage, including the following key enhancements: easier management of large databases to support heavier workloads with parallel queries
    and online indexing, support for programmability functions like CLR and XML index to support more robust application design, improved monitoring and troubleshooting with XEvents and 100 new Dynamic Management Views (DMV), and more performance in the Premium
    tier.
    To try this preview, please sign up via the Preview
    features webpage. Only SQL Database servers with a mix of one or more Basic, Standard, or Premium (not Web or Business) databases are compatible and eligible to
    upgrade to the preview. Please note that any move of an existing Basic, Standard, or Premium database into this preview is irreversible; we recommend that you create a database copy or leverage test databases on any server enrolled in this preview.
    A new Standard-tier performance level, S3, is also available in this preview which gives you more pricing flexibility between Standard and Premium. S3 will deliver 100 Database Throughput Units (DTU) and all the features available in the Standard tier. Please
    note that S3 will appear on your bill as a multiple of S2 until further notice.
    For more information, please visit the SQL
    Database webpage and the
    Microsoft
    Azure Blog. For a comprehensive look at pricing, please visit the
    SQL
    Database pricing webpage.
    Rick Byham, Microsoft, SQL Server Books Online, Implies no warranty

    Hello Rick
    That is great, one thing I'd like to ask, does it support SSMS,SSDT?
    No sign of that yet, that I’ve seen.....
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID: S-1-5-17...

    Hi,
    I have a customized SharePoint page that takes user input data, validate some of the data, then writes the data to a SharePoint list. If an exception occurs, it will write the error to the ULS.
    All was working well in the test environments.
    However, recently we noticed that in the QA environment, when it's trying to write to ULS, it causes another issue:
    Insufficient SQL database permissions for user 'Name: NT AUTHORITY\IUSR SID: S-1-5-17 ImpersonationLevel: Impersonation' in database 'SP_F1_Config' on SQL Server instance 'SQL01'. Additional error information from SQL Server is included below. The EXECUTE
    permission was denied on the object 'proc_putObjectTVP', database 'SP_F1_Config', schema 'dbo'.
    I've traced through the code and found that it fails on the line:
        SPDiagnosticsServiceBase.GetLocal<LoggerError>();
    where LoggerError is the logger class inheritng SPDiagnosticsServiceBase
    I have also googled around today, but the most positive solution provided
    on this page was to manually modify SQL object permission, which I believe we should not do, and would not be supported by Microsoft.
    So the questions are:
    Why is AUTHORITY\IUSER used for SPDiagnosticsServiceBase.GetLocal()? Should that account actually be allowed to access SharePoint databases? (This is an intranet environment and using claim based/Windows authentication, no no anonymous access would be allowed
    anyway).
    I've checked the Application Pool account permissions in SQL, comparing the environment that works and the one that doesn't work, and the permissions/roles/schemas look identical on server and database level. Where else can I check?
    On the environment that works, I logged on as SharePoint administrator, created a new SharePoint Visual Web Part solution in Visual Studio, just to test writing to ULS. Then I press F5 in Visual Studio to debug it. It also has the same problem.
    It just seems like somehow the user's identity (or whatever the identity SharePoint required) was not passed to SPDiagnosticsServiceBase.
    Any suggestions, or even better, solutions would be really really much appreciated!

    Hi,
    Thanks for your sharing, it will be userful to the people who stuck with the same issue.
    Best regards
    Patrick Liang
    TechNet Community Support

  • Insuffiecient SQL database Permission for User

    Hi All,
    The following error is coming in the Event Viewer:
    Insufficient SQL database permissions for user 'Name: NNOK\SPPEAPO_SVC001_ES SID: S-1-5-21-2610070952-2089559051-1579118431-1720 ImpersonationLevel: Impersonation' in database 'SharePoint_AdminContent_6fa0b459-ed7c-481f-85c4-b81753e39346' on SQL Server instance
    'NOKWDCFISP'. 
    The EXECUTE permission was denied on the object 'proc_GetTimerRunningJobs', database 'SharePoint_Config', schema 'dbo'.
    Kindly reply if you know the solution for this.
    Thanks in Advance.
    Pravin Dhulap

    Hi Pravin,
    You can grant "WSS_Content_Application_Pools" execute permission to the procedure "proc_GetTimerRunningJobs"
     under SharePoint _Config database, then check results again. 
    Here is another post you can take a look.
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/a0d08e98-1fd6-42cf-b738-6ba3df082210/search-account-got-insufficient-sql-database-permissions-for-user-execute-permission-was-denied?forum=sharepointadmin
    http://sharepointpaul.blogspot.jp/2013/09/resolution-of-sharepoint-event-id-5214.html
    Thanks
    Daniel Yang
    TechNet Community Support

  • Search account got - Insufficient sql database permissions for user. EXECUTE permission was denied on the object proc_Gettimerrunningjobs

    Dear all,
    I am troubleshooting a critical error showed up on Event log.  It said:
    Insufficient sql database permissions for user 'Name:domain\wss_search ....... EXECUTE permission was denied on the object 'proc_GetTimerRunningJobs', database 'SharePoint_Config', schema 'dbo'
    domain\wss_search is the default content access account. According to
    http://technet.microsoft.com/en-us/library/cc678863.aspx I should not grant it the Farm Administrators permission.
    In the Search Center I am able to search out documents as expected so I think the search service is fine.   However I have no clue why this account is trying to access 'proc_GetTimerRunningJobs'.
    Mark

    Hi Mark,
    This issue was caused by the search account’s permission. For resolving your issue, please do as the followings:
    Expand your SharePoint Configuration database 'SharePoint_Config' and navigate to ‘proc_GetTimerRunningJobs’ under Programmability ->Stored Procedures
    Right-click proc_GetTimerRunningJobs and choose Properties
    Click on Permission on the left launch
    Select the Search button and browse for ‘WSS_Content_Application_Pools’
    Provide ‘Execute’ permissions for ‘WSS_Content_Application_Pools’
    Click OK
    Here are some similar posts for you to take a look at:
    http://adammcewen.wordpress.com/2013/03/01/execute-permission-denied-on-sharepoint-config-db/
    http://technet.microsoft.com/en-us/library/ee513067(v=office.14).aspx
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • 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

  • Sync AD user credentials with a SQL database

    Hi folks!
    I need some help to how Sync the user and password from my Active Directory, to a SQL Database.
    Actualy, my enviroment have a database with users and password added, my custom applications uses it like a passport, but now I want to use Active Directory to control these users, but I can't use windows authentication in my old apps. I was reading about
    Forefront Identity Manager to do this, but I need a free solution.
    The Sharepoint database sync user credentials with AD? Any ideas how I can do this?
    Thanks in advance!
    MCTS Exchange 2010. @pedrongjr

    Looks like you need a linked SERVER to AD
    create table #t (email varchar(100),sAMAccountName varchar(100),EmployeeID varchar(100))
    insert into  #t Exec master..spQueryAD 'SELECT EmployeeID, SamAccountName, mail
     FROM ''LDAP://dc=companyname,dc=com'' WHERE objectCategory=''person'' and objectclass=''user''', 0
    USE [master]
    GO
    /****** Object:  StoredProcedure [dbo].[spQueryAD]    Script Date: 17/03/2014 13:56:45 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER procedure [dbo].[spQueryAD] (@LDAP_Query varchar(255)='', @Verbose bit=0)
    as
    --verify proper usage and display help if not used properly
    if @LDAP_Query ='' --argument was not passed
        BEGIN
        Print ''
        Print 'spQueryAD is a stored procedure to query active directory without the default 1000 record LDAP query limit'
        Print ''
        Print 'usage -- Exec spQueryAD ''_LDAP_Query_'', Verbose_Output(0 or 1, optional)'
        Print ''
        Print 'example: Exec spQueryAD ''SELECT EmployeeID, SamAccountName FROM ''''LDAP://dc=domain,dc=com'''' WHERE objectCategory=''''person'''' and objectclass=''''user'''''', 1'
        Print ''
        Print 'spQueryAD returns records corresponding to fields specified in LDAP query.'
        Print 'Use INSERT INTO statement to capture results in temp table.'
        Return --'spQueryAD aborted'
        END
    --declare variables
    DECLARE @ADOconn INT -- ADO Connection object
          , @ADOcomm INT -- ADO Command object
          , @ADOcommprop INT -- ADO Command object properties pointer
          , @ADOcommpropVal INT -- ADO Command object properties value pointer
          , @ADOrs INT -- ADO RecordSet object
          , @OLEreturn INT -- OLE return value
          , @src varchar(255) -- OLE Error Source
          , @desc varchar(255) -- OLE Error Description
          , @PageSize INT -- variable for paging size Setting
          , @StatusStr char(255) -- variable for current status message for verbose output
    SET @PageSize = 1000 -- IF not SET LDAP query will return max of 1000 rows
    --Create the ADO connection object
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Create ADO connection...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OACreate 'ADODB.Connection', @ADOconn OUT
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOconn , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --SET the provider property to ADsDSOObject to point to Active Directory
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Set ADO connection to use Active Directory driver...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OASETProperty @ADOconn , 'Provider', 'ADsDSOObject'
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOconn , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Open the ADO connection
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Open the ADO connection...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OAMethod @ADOconn , 'Open'
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOconn , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Create the ADO command object
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Create ADO command object...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OACreate 'ADODB.Command', @ADOcomm OUT
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOcomm , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --SET the ADO command object to use the connection object created first
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Set ADO command object to use Active Directory connection...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OASETProperty @ADOcomm, 'ActiveConnection', 'Provider=''ADsDSOObject'''
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOcomm , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Get a pointer to the properties SET of the ADO Command Object
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Retrieve ADO command properties...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OAGetProperty @ADOcomm, 'Properties', @ADOcommprop out
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOcomm , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --SET the PageSize property
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Set ''PageSize'' property...'
        Print @StatusStr
        END
    IF (@PageSize IS NOT null) -- If PageSize is SET then SET the value
    BEGIN
        EXEC @OLEreturn = sp_OAMethod @ADOcommprop, 'Item', @ADOcommpropVal out, 'Page Size'
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommprop , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
                  RETURN
            END
        EXEC @OLEreturn = sp_OASETProperty @ADOcommpropVal, 'Value','1000'
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommpropVal , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
                  RETURN
            END
    END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --SET the SearchScope property to ADS_SCOPE_SUBTREE to search the entire subtree 
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Set ''SearchScope'' property...'
        Print @StatusStr
        END
    BEGIN
        EXEC @OLEreturn = sp_OAMethod @ADOcommprop, 'Item', @ADOcommpropVal out, 'SearchScope'
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommprop , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
                  RETURN
            END
        EXEC @OLEreturn = sp_OASETProperty @ADOcommpropVal, 'Value','2' --ADS_SCOPE_SUBTREE
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommpropVal , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --SET the Asynchronous property to True
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Set ''Asynchronous'' property...'
        Print @StatusStr
        END
    BEGIN
        EXEC @OLEreturn = sp_OAMethod @ADOcommprop, 'Item', @ADOcommpropVal out, 'Asynchronous'
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommprop , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
                  RETURN
            END
        EXEC @OLEreturn = sp_OASETProperty @ADOcommpropVal, 'Value',True
        IF @OLEreturn <> 0 
            BEGIN -- Return OLE error
                  EXEC sp_OAGetErrorInfo @ADOcommpropVal , @src OUT, @desc OUT
                  SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
                  RETURN
        END
    END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Create the ADO Recordset to hold the results of the LDAP query
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Create the temporary ADO recordset for query output...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OACreate 'ADODB.RecordSET',@ADOrs out
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOrs , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Pass the LDAP query to the ADO command object
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Input the LDAP query...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OASETProperty @ADOcomm, 'CommandText', @LDAP_Query 
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOcomm , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Run the LDAP query and output the results to the ADO Recordset
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Execute the LDAP query...'
        Print @StatusStr
        END
    Exec @OLEreturn = sp_OAMethod @ADOcomm, 'Execute' ,@ADOrs OUT
    IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOcomm , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    --Return the rows found
    IF @Verbose=1
        BEGIN
        Set @StatusStr = 'Retrieve the LDAP query results...'
        Print @StatusStr
        END
    EXEC @OLEreturn = sp_OAgetproperty @ADOrs, 'getrows'
        IF @OLEreturn <> 0 
        BEGIN -- Return OLE error
              EXEC sp_OAGetErrorInfo @ADOrs , @src OUT, @desc OUT
              SELECT Error=CONVERT(varbinary(4),@OLEreturn), Source=@src, Description=@desc
              RETURN
        END
    IF @Verbose=1 Print Space(len(@StatusStr)) + 'done.'
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • How to find SQL database configured users without studio management .

    Hello Guys,
    Please how do I find the configured users on my sql database without using SQL studio management. Is there a way to find figured users through registry? 
    Regards, MassonTech

    Hello,
    No, you can't get it from registry.
    You must be connected to the SQL Server/database to query this information from the database; you can't get it from anywhere else.
    If you don't have SSMS installed on the machine, then you could use the lightweight tool "SqlCmd.exe", there is a separate installer for it available.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to find the number of users  connected to database from OS level(Linux)

    Hi All,
    Could anyone know , how to find the number of users connected to database without connecting with sql*plus
    is there any command to find it?
    example we have 10 databases in one server, how to find the number of users connected to particular database without connecting to database(v$session)?
    oracle version:- 10g,11g
    Operating System:- OEL4/OEL5/AIX/Solaris
    any help will be appreciated.
    Thanks in advance.
    Thank you.
    Regards,
    Rajesh.

    Excellent.
    Tested, works as long as you set the ORACLE_SID first ( to change databases )
    ps -ef | grep $ORACLE_SID | grep "LOCAL=NO" | awk '{print $2}' | wc -l
    Thanks!
    select OSUSER
        from V$SESSION
    where AUDSID = SYS_CONTEXT('userenv','sessionid')
        and rownum=1;Best Regards
    mseberg

  • Intermittant (not constant) SQL database ShareWebDb login failed events 3760 and 2424

    My Sharepoint 3.0 services that were bundled with SBS 2008 appear to be working fine. Companyweb, etc, all work w/o issue, so I don't want to take violent action, but these errors seem to be accellerating so I would love to know if there is a known
    solution.
    I typically receive the following (these are in reverse time order, latest at the top, just as they appear in the event log):
    Error Event ID: 3760 SQL Database 'ShareWebDb' on SQL Server instance 'np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query' not found. Additional error information from SQL Server is included below. Cannot open database "ShareWebDb" requested
    by the login. The login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
    one second earlier:Error Event ID: 2424 The update cannot be started because the content sources cannot be accessed. Fix the errors and try the update again. Context: Application 'Search', Catalog 'index file
    on the search server Search'
    Information Event ID: 18456 No description, here is the Details:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider
    Name="MSSQL$MICROSOFT##SSEE" />
    <EventID Qualifiers="49152">18456</EventID>
    <Level>0</Level>
    <Task>4</Task>
    <Keywords>0x90000000000000</Keywords>
    <TimeCreated
    SystemTime="2010-11-12T18:35:06.000Z" />
    <EventRecordID>491461</EventRecordID>
    <Channel>Application</Channel>
    <Computer>myserver.mydomain.local</Computer>
    <Security
    UserID="S-1-5-20" />
    </System>
    <EventData>
    <Data>NT AUTHORITY\NETWORK SERVICE</Data>
    <Data>[CLIENT: <named pipe>]</Data>
    <Binary>184800000E000000170000005000450054003300310030005C004D004900430052004F0053004F00460054002300230053005300450045000000070000006D00610073007400650072000000</Binary>
    </EventData>
    </Event>
    Two seconds earlier
    Information Event ID 17137 No description, here is the Details:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <System>
    <Provider
    Name="MSSQL$MICROSOFT##SSEE" />
    <EventID Qualifiers="16384">17137</EventID>
    <Level>4</Level>
    <Task>2</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated
    SystemTime="2010-11-12T18:35:04.000Z" />
    <EventRecordID>491460</EventRecordID>
    <Channel>Application</Channel>
    <Computer>mysever.mydomain.local</Computer>
    <Security
    UserID="S-1-5-20" />
    </System>
    <EventData>
    <Data>ShareWebDb</Data>
    <Binary>F14200000A000000170000005000450054003300310030005C004D004900430052004F0053004F00460054002300230053005300450045000000070000006D00610073007400650072000000</Binary>
    </EventData>
    </Event>
    I get more 3760 errors than 2424's. However, the
    2424's do seem to usually correspond to a 3760 18456 17137 occurance and the
    3760 are always preceeded by 18456 17137. I was getting one or two sets a day, lately that has increased to 5 or 10.
    I've done a lot of
    web research on Sharepoint Errors 3760 and
    2424 and I see a number of people are experiencing the the same issue. Most of what I've come across for solutions do not apply, since errors are intermittent, not chronic and my public remote URL has already been added
    to BackConnectionHostNames as per:
    http://blogs.technet.com/b/sbs/archive/2009/08/05/sharepoint-services-3-search-event-errors-after-an-sbs-2008-update-rollup.aspx
    I installed the SQL Server Management Studio Express so I could try to track down the permissions on this database. I see the SQL server instance, MYSERVER\Microsoft##ssee, and it shows as running, but when I try to connect to it I get the following
    error: "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote
    connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)" I'm assuming that is because I don't have access permission for that internal database.
    I don't see any errors in the event log related to failed logins or any errors at all from the SQL server, but there are the time matching informational entries right before the error events and lots of other 17137's and 2803's from MSSQL$Microsoft##ssee

    Thank you Kevin, that does seem to match my symptoms and I have made the change suggested. Just incase that page becomes unreachable by others, here is the part of the page that applies to this:
    Issue:
    =========
    Receive event error 3760 and 6398 on SBS 2008
    Cause:
    ==========
    Issue was caused by incorrect Auto Close option for ShareWebDb database
    Solution:
    ==========
    1. On the SBS 2008 server, click Start -> All Programs -> Microsoft SQL Server 2005, right click SQL Server Management Studio Express and choose run as administrator.
    NOTE: You must run it as administrator to perform steps below.
    2. In the Server Name box, type \\.\pipe\MSSQL$Microsoft##SSEE\sql\query, click connect.
    3. Expand Database node and right click the ShareWebDb then choose properties.
    4. Click Options in the left pane, in the right pane, please check whether the Auto Close option is set to True, if so, please change it to False.

  • Advise on SQL database process

    Dear all,
    We have build our own product CMS platform configuration which is running on SQL server and CMS web site link to it.
    We will lauch our product soon but need to identify the correct hosting plan for not having any further issue.
    For exemple for now all is hosted in our company azure account with a Standard Basic 5 DTU's.
    When we go in production we can expect some connection and big amount of data on our database.
    My question are as follow :
    - Does using a single database storage for my potential Customers would be enough ?
    - How should I plan backup efficiently ?
    - Should I plan a safety replication process somewhere in azure or duplicate the storage in order to switch in case of lack of place ?
    My concern is to avoid my database beeing full while customers increase
    Thanks for your advise and help
    regards
    serge

    Hi Solatys,
    - If I select by default STANDARD Azure database, which size, DTU, etc should I select ? 
    For this question, you may reference the below link. You can scale your Azure database performance based on the real-time requirement.
    Azure
    SQL Database introduces new near real-time performance metrics 
    - If for instance the initial URL of the web portal connected to SQL server1 has a trouble, how can I switch users transparently to a second replicated server in order that user will notify anything ?
    Azure SQL Database has a built-in high availability subsystem that protects your database from failures of individual servers and devices in a datacenter. Azure SQL
    Database maintains multiple copies of all data in different physical nodes located across fully independent physical sub-systems to mitigate outages due to failures of individual server components, such as hard drives, network interface adapters, or even entire
    servers. At any one time, three database replicas are running—one primary replica and two or more
    secondary replicas. Data is written to the primary and one secondary replica using a quorum based commit scheme before the transaction is considered committed.
    If the hardware fails on the primary replica, Azure SQL Database detects the failure and fails over to the secondary replica. In case of a physical loss of a replica, a new replica is automatically created.
    So there are always at minimum two physical, transactionally consistent copies of your data in the datacenter.
    Azure SQL Database Business Continuity
    - IF I select the Maximum size of the database, what will happen in case it will be nearly full and need to provide more space ?
    Insert and update transactions that exceed the upper limit will be rejected because the database will be in read-only mode. The maximum size has been gained from 50GB to 500GB as of now, you may have no concern about it. You can
    set a monitoring alertto
    notify the storage utilization and CPU percentage etc.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Data Search In SQL Database

    Hi, i want user to type a string in textbox, and i will search, if textbox.text exists in my SQL database table or not. Below is the code i'm using :---------------
     string txtname = (txtEmpName.Text).Trim();
     sQuery = "select * from tbUser where UserName='_username'";
     sQuery = sQuery.Replace("_username", txtname);
     SqlConnection objConnection = new SqlConnection(source);
     objDataAdapter = new SqlDataAdapter(sQuery,objConnection);
    // DataTable dtTable = new DataTable();
     if (objConnection.State  == ConnectionState.Closed)
     objConnection.Open();
     objDataSet = new DataSet();
     objDataAdapter.Fill(objDataSet);
    // objDataAdapter.Fill(dtTable);
    or i want to search if "txtname" exists in "tbUser" table.
    Thanks & Regards.
    Manish S. Anand

    This is a very poor coding, Unfortunately not fit anywhere :-(
    This code is a security risk (sql injection)!
    He should use SqlCommand class with parameters!
    but yet if i understand the problem he is facing, then the problem is in the SQL part of the code and not the Dot.net :-) therefor it is fit to this forum. Basically the code should work, but as i understand from him his problem is in the
    result set come back from the query filter. If so:
    * the problem is that he use:
    where UserName='_username'
    instead of:
    where UserName='%_username%'
    and he do ask about the search problem :-)
    [Personal Site] [Blog] [Facebook]

  • Database Initialiser does not create azure sql database

    I have a WPF application In the OnStartup in the app.cs I set the Database initializer and forced the context the initialise my database:
    Debug.WriteLine("Setting Initializer");
    Database.SetInitializer<MyContext>(new MyDatabaseInitializer());
    Debug.WriteLine("Declaring new context");
    using (MyContext c = new MyContext("MyContext"))
    Debug.WriteLine("Force the initialization");
    c.Database.Initialize(true);
    Debug.WriteLine("Done!");
    I created a sql database in the management portal of the azure.
    Copied the connectionstring it provided for ADO.net.
    But my database is not created.
    I also added a firewall rule but nothing happens. I Have no clue what to do.
    Can anybody please help me with this?
    If you need more information please ask i really have to get this sorted out.
    Thanks in advance!

    Hi Turkstra,
    I have tried to use EF to create Azure SQL database, it works as expect, the database 'jambordbcreate' appear in my SQL Azure, below is the detailed codes.
    using System;
    using System.Collections.Generic;
    using System.Data.Entity;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace CodeFirst
    class Program
    static void Main(string[] args)
    Database.SetInitializer(
    new CreateDatabaseIfNotExists<SchContext>());
    using (var db = new SchContext("Server=tcp:****.database.windows.net,1433;Database=jambordbcreate;User ID=vote@***;Password=***;Trusted_Connection=False;Encrypt=True;Connection Timeout=30"))
    string name = "jambor";
    var student=new Student(){Name=name, ID="1a"};
    db.Students.Add(student);
    db.SaveChanges();
    db.Database.Initialize(true);
    public class Student
    public string ID { get; set; }
    public string Name { get; set; }
    public string age { get; set; }
    public string sex { get; set; }
    public class School
    public string ID { get; set; }
    public string Name { get; set; }
    public virtual List<Student> Students { get; set; }
    public class SchContext : DbContext
    public SchContext(string connection):base(connection)
    public DbSet<Student> Students { get; set; }
    public DbSet<School> Schools { get; set; }
    I suggest  you check your SQL connection, after run your code, please refresh azure portal to see whether your database is exist. Hope this give you some help.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Are there any tutorials on making animated gifs in flash, from a video?

    I have an avi video file that i'd like to make into an animated gif in flash. How do I go about doing this? I know there is an option in photoshop where you can import the video frames onto layers. Is there something similar in flash?

  • Q: BAPI/FM Attachment list

    Hi all, I'm struggeling for a while with this question and I havn't found a solution yet. Using transaction FBL1N, people of accounting can enter a vendor code and search for Vendor Line Items. By viewing the details of a certain line, they can selec

  • How to consume web service in jdev 10.1.3 and OAF 12.1.3

    I have a question regarding consuming web service in jdev 10.1.3. I have a WSDL url and want to generate java stub files from the wsdl. How do I do this using jdev?

  • Multi-lingual String Shortening

    Hey all, I've got a program that allows the user to name certain objects. These names need to be displayed in a variety of places and there may different amounts of space. I didn't like JLabel's default way of displaying names that are too long to fi

  • Adding customer specific image on Masthead

    Hi , Could someone explain me the way i can add image on masthead. Thanks