Provide WCF service caller to a SQL server that is access by a technical user account

Hi,
we have a WCF Service that is hosted in a windows service and access a SQL Server database. The database is accessed with the technical user the windows service runs with. That means nevertheless of the WCF service caller, the database is always
accessed in context of the technical user. Furthermore some company users access the database via the SQL Management Studio and sign in via Windows Authentication.
The management now wants us to provide a change log functionality. In case data is changed by the WCF service the caller should be logged. In case of using the SQL Management Studio the domain-user's account should be logged.
Because both ways must be supported we want to use a table trigge to monitor insert/update/delete ddl events, but we got struggled by passing the WCF service caller to the SQL server database.
Does anyone have a good idea for the issue? Any advice is appreciated.
Kind regards,
Christian

Do you know a way to use the 'SET CONTEXT_INFO' expression wth LINQ2SQL?
This is a T-SQL forum. There are other forms for LINQ.
No, I don't know LINQ. Then again, why on earth would you? This would be a command you would submit when the WCF connects. Ah, of course, you are only connecting when you submit a query. Which you do through LINQ. Oh well. Could be an incitement to move
away from LINQ maybe? :-)
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • Permission to run SQL Server DTA - dbo access needed --- to the user database, or msdb ?

    Hi All,
           I am remotely working with a developer who wants to run DTA (SQL Server 2008 R2). I gave the AD Group "ALTER TRACE" permission, and also "execute" permission to xp_msver in master db. I also read that
    the user needs to be in dbo group. This is to the user database they wish to use DTA with, correct ? I just want to be sure that dbo to msdb is not needed.
    Thank you,
    Joe Clark
    Joe Clark

    Please see the link bellow
    http://technet.microsoft.com/en-us/library/ms190987(v=sql.105).aspx
    vt
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

  • Cluster resource 'Analysis Services' of type 'Generic Service' in clustered role 'SQL Server' failed.

    Windows Server 2012 R2
    SQL Server 2012
    After a recent cluster failover from node 1 to node 2, the Analysis Services role is in a failed state, with the service stopped. When attempting to start the service, there are two error messages captured in Failover Cluster Manager:
    Log Name:      System
    Source:        Microsoft-Windows-FailoverClustering
    Date:          4/10/2014 11:48:49 AM
    Event ID:      1042
    Task Category: Generic Service Resource
    Level:         Error
    Keywords:      
    User:          SYSTEM
    Computer:      HQ-HASQL-1.sbgnet.int
    Description:
    Generic service 'Analysis Services (HASQL)' failed with error '1067'. Please examine the application event log.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-FailoverClustering" Guid="{BAF908EA-3421-4CA9-9B84-6689B8C6F85F}" />
        <EventID>1042</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>16</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-04-10T15:48:49.752168200Z" />
        <EventRecordID>26212</EventRecordID>
        <Correlation />
        <Execution ProcessID="9036" ThreadID="14748" />
        <Channel>System</Channel>
        <Computer>HQ-HASQL-1.sbgnet.int</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data Name="ResourceName">Analysis Services (HASQL)</Data>
        <Data Name="Status">1067</Data>
      </EventData>
    </Event>
    Log Name:      System
    Source:        Microsoft-Windows-FailoverClustering
    Date:          4/10/2014 11:48:49 AM
    Event ID:      1069
    Task Category: Resource Control Manager
    Level:         Error
    Keywords:      
    User:          SYSTEM
    Computer:      HQ-HASQL-1.sbgnet.int
    Description:
    Cluster resource 'Analysis Services (HASQL)' of type 'Generic Service' in clustered role 'SQL Server (HASQL)' failed.
    Based on the failure policies for the resource and role, the cluster service may try to bring the resource online on this node or move the group to another node of the cluster and then restart it.  Check the resource and group state using Failover Cluster
    Manager or the Get-ClusterResource Windows PowerShell cmdlet.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Microsoft-Windows-FailoverClustering" Guid="{BAF908EA-3421-4CA9-9B84-6689B8C6F85F}" />
        <EventID>1069</EventID>
        <Version>1</Version>
        <Level>2</Level>
        <Task>3</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2014-04-10T15:48:49.752168200Z" />
        <EventRecordID>26213</EventRecordID>
        <Correlation />
        <Execution ProcessID="6464" ThreadID="9076" />
        <Channel>System</Channel>
        <Computer>HQ-HASQL-1.sbgnet.int</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data Name="ResourceName">Analysis Services (HASQL)</Data>
        <Data Name="ResourceGroup">SQL Server (HASQL)</Data>
        <Data Name="ResTypeDll">Generic Service</Data>
      </EventData>
    </Event>
    With just these generic error messages being present, this has been difficult to diagnose. Some research has yielded possible resolutions of the Event Viewer log being full, .NET corruption, missing registry entries, but none of those seem to be the issue
    (Event Viewer logs cleared, Analysis services is working on the same physical servers in a different cluster, and the registry entries was only a supported issue for SQL Server 2008 and 2008 R2).
    Any help would be greatly appreciated.

    Bring up Configuration Manager, look at binary path for SSAS.  Make sure BOTH folders exist.  Sometimes with failovers mappings get screwed up.

  • Asynchronous web service call using PL/SQL

    Hi Guys,
    i'm using Apex 4.1.
    Is that possible to invoke a web service asynchronously within PL/SQL code block ? If so,
    How can i access the return value of the service when execution of that web service completes ?

    Bolev wrote:
    We have (Oracle 10g) automated process (ETL) based on internal data. Now there is an offer to incorporate existing web service call (let's say for additional record verification) in this process. Service call (I do not know what type of it yet) is using data from remote database which is not ours.Web service calls from PL/SQL is not that complex. You can use the standard UTL_HTTP package as shown in {message:id=4205205}.
    I never heard anybody goes this way especially for ETL processes.Well, if you push a million rows through the ETL process and the call overhead for the web service call (assuming perfect network and web server response) is 1 sec, that translates into 277+ hours of runtime alone for the validation to be done via web service.
    So yeah - it would seem kind of silly to use something like a web service to validate large volumes ETL data.

  • Can Reporting Services 2005 report on SQL Server 2012 database?

    We would like to upgrade our SQL Server from Standard 2005 to Enterprise/Standard 2012. Unfortunately, we also have a lot of reports based on Reporting Services 2005. If possible we would like avoid upgrading them at this time.
    Is it possible to run Reporting Services 2005 of SQL Server 2012? If yes then is there pre-requiste  like drivers  or dll or any other to connect SSRS 2005 to SQL server 2012?  
    If we run Reporting Services 2005 of SQL Server 2012  then do we will face performance lag issue due to version difference of SSRS 2005 and SQL server 2012?

    Moderators,
    Can anyone merge this -
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/2c44351c-35b4-4208-a2b7-88fc810d53ff/can-reporting-services-2005-report-on-sql-server-2012-database?forum=sqlreportingservices
    sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **.

  • How to provide joins between oracle tables and sql server tables

    Hi,
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server.
    how to provide joins between oracle tables and sql server tables ? Any help on this
    Regards,
    Malli

    user10675696 wrote:
    I have a requirement that i need to generate a report form two different data base. i.e Oracle and Sql Server. Bad idea most times. Heterogeneous joins do not exactly scale and performance can be severely degraded by network speed and b/w availability. And there is nothing you can do in the application and database layers to address performance issue at the network level in this case - your code's performance is simply at the mercy of network performance. With a single glaring fact - network performance is continually degrading. All the time. Always. Until it is upgraded. When the performance degradation starts all over again.
    If the tables are not small (few 1000 rows each) and row volumes static, I would not consider doing a heterogeneous join. Instead I would rather go for a materialised view on the Oracle side, use a proper table and index structure, and do a local database join.

  • Activate Reporting Services on My Sharepoint SQL SERVER Databse ?

    Hi,
    I have small sharepoint farm (1 FW and 1 SQL).
    I can't find if it's recommended or not to activate and use Reporting Services on the SHAREPOINT SQL SERVER Instance ?
    I wouldn't want to decrease my global farm performance.
    Thank you for helping.
    Regards

    SSRS integrated must run on a server that has SharePoint installed and joined to the farm. That will have a significant impact on the SQL Database Engine server from a memory contention and CPU utilization perspective.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • SQL server can't access network share

    Hello,
    I am facing an issue where the SQL server can't access the network share. The network share is mounted by  a domain user who is also configured as Administrator on the server.
    Through SQL Server management studio as well as PoweShell script when i try to access the share in order to attach the database contained within the share, i get the error "Unable to find the file specified". I can't mention the network drive to
    the SQL management GUI file browser too if i try to attach the database through GUI.
    For all SQL services, I changed the service log on account to be the same account which mounts the network share.
    As work around - 
    I launched a command prompt under NT Authority \ SYSTEM (LocalSystem) account and mounted the drive to the same location which lead to adding one more connection but under local system account. With this change, the SQL server was able to access the network
    share!
    I couldn't understand whey SQL expects the network share to be mounted under local system account even if all the SQL services are running under domain account ? I want SQL to be able to access the network share without opting for above work around.

    Hello,
    I couldn't understand whey SQL expects the network share to be mounted under local system account even if all the SQL services are running under domain account ? I want SQL to be able to access the network share without opting for above work around.
    It doesn't have to be. The workaround is only a temporary fix and is certainly not a good idea. I would not use mounted folders with SQL Server, at all, period.
    The reason you're having difficulty is that when the folder is mounted, it's mounted for YOUR session not ALL sessions. SQL Server has already started its services and is running under its' own session and is not privy to the things you do to change the
    environment. For example, if you changed a system or user variable (for example, a SET variable) SQL Server would have no idea about this because when it started, that variable either didn't exist or was something else. This is not SQL Server's fault but how
    Windows works (this information is stored in the Process Environment Block [PEB]) for any windows process.
    As other's have said, don't use mounted drives - use a UNC path. UNC paths are 100% supported on 2012+ as well as running databases on a SMB 3.x share (UNC pathed of course).
    If you absolutely must use a mounted drive, enabled xp_cmdshell access (through sp_configure) and run the net use command through xp_cmdshell. I, once again, would highly advise not doing this and using an UNC path.
    -Sean
    The views, opinions, and posts do not reflect those of my company and are solely my own. No warranty, service, or results are expressed or implied.

  • HOW TO INSERT DATA INTO SQL SERVER FROM MS ACCESS TABLE??

    NEED TO INSERT DATA INTO SQL SERVER FROM MS ACCESS TABLE.

    this is another method
    http://www.mssqltips.com/sqlservertip/2484/import-data-from-microsoft-access-to-sql-server/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Can a SQL SERVER table be accessed via Oracle Forms

    My boss asked me this question today. I am pretty sure the answer is "no", but thought it better to throw it out to the crowd:
    "Can a SQL SERVER table be accessed via Oracle Forms?"

    Yes, this is possible using Oracle's Transparent Gateway. Check out the My Oracle Support (formerly Metalink) document "How To Create A Form Based on SQL Server Table" (Doc ID: 564915.1) for all of the details. This document is based on Forms 10g (10.1.2.0.2) so you may need to upgrade your Forms version if you are not already at this version at a minimum.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Can service broker work between SQL Server 2008 and 2012, ssbdiagnose returned an error !

    Hello, 
    We have a setup of three applications that sends and receive messages using Service Broker.
    One part is on a server, we'll call 'S' have Microsoft SQL Server 2008 (SP3) - 10.0.5512.0 (X64)
    The other part, we'll call 'E' use to have Microsoft SQL Server 2008 (SP3) - 10.0.5512.0 (X64).
    But I am migrating these apps to a new server, we'll call 'C' that has: Microsoft SQL Server 2012 (SP1) - 11.0.3339.0 (X64)
    I have used this command line tool to test it :
    ssbdiagnose -E CONFIGURATION FROM SERVICE "//E/S/CService" -S "ServerC" -d EDatabase TO SERVICE "//S/S/ECService" -S ServerS -d SDatabase ON CONTRACT //E/S/ECContact
    It returned: 
    An internal exception occurred: Cannot read property ServiceBrokerGuid.
    This property is not available on SQL Server 7.0.
    So, I am wondering, is it supposed to work between these two versions ?
    As more info, in the previous setup, it was using certificates but I have changed the Endpoints to use only Windows Authentication.
    Thanks for any advice.
    Claude

    Hello, 
    Many thanks to you and Fanny for looking at my question.
    In fact I was unclear, please let me provide you with more details.
    Maybe the use of "always on" plays a role here...  I will use different names so it might be clearer...
    ServerSoftware2008 server has SoftwareDB database.
    ServerEmployees2008 server has EmployeesDB database.
    Service broker use to work fine between those two above, with certificates.
    The new server comes in, two virtual servers with SQL Server 2012 Enterprise Edition with Always On.
    I call it ServerEmployeesC but this is the listener.  Behind, there is ServerEmployees2012_A and ServerEmployees2012_B and of course, both have a EmployeesDB database.
    So, to use SSBDiagnose, I wonder if I need to use quotes around values and if I can use the listener name with FQDN.  Concerning the use of instance name in the syntax, there is only one instance per server, is it best practice to use it on the command
    line ?
    Here is again, my command :
    ssbdiagnose -E CONFIGURATION FROM SERVICE "//E/S/E" -S "ServerEmployeesC.sub.acme.com" -d EmployeesDB TO SERVICE "//S/S/E" -S "ServerSoftware2008.sub.acme.com" -d SoftwareDB ON CONTRACT //E/S/E
    Again, many thanks for any help you will be able to provide, the people who configured this application at first are no longer here and I am trying to configure the new server in a task of migrating to SQL Server 2012 for one of the two servers involved
    and I am having a lot of problems doing it.
    Best regards,
    Claude

  • Oracle 8i Gateway Service problem for MS SQL Server 7.0

    I am installing Oracle Gateway services of oracle 8.1.7 with MS SQL Server 7.0 and want to create gateway service to access SQL Server. At some point Oracle document says :
    AT the MS-DOS prompt, enter:
    SET GTW_EXE = TGMSQL80.EXETo create a new gateway service name, enter:
    GTWSRV80 sid -CREATEI have complete Oracle 8.1.7 Release 3 pack but could not find the GTWSRV80 executable, I also do not have TGMSQL80.EXE. From where I can have these executables.
    Would some one provide solution for this problem please.
    Thanks and regards,
    Ghulam

    I am installing Oracle Gateway services of oracle 8.1.7 with MS SQL Server 7.0 and want to create gateway service to access SQL Server. At some point Oracle document says :
    AT the MS-DOS prompt, enter:
    SET GTW_EXE = TGMSQL80.EXETo create a new gateway service name, enter:
    GTWSRV80 sid -CREATEI have complete Oracle 8.1.7 Release 3 pack but could not find the GTWSRV80 executable, I also do not have TGMSQL80.EXE. From where I can have these executables.
    Would some one provide solution for this problem please.
    Thanks and regards,
    Ghulam

  • Calling Function in SQL Server through DBLINK

    Hello
    I need to call a function that exists in other database (*SQL Server*) through DBLINK
    Is It possible? If yes, please give me the syntax
    Thanks

    Hi,
    You can call remote functions on SQL*Server if you create the database link using the Database Gateway for SQL*Server (DG4MSQL).
    You need to install and configure DG4MSQL then you can call remote functions as follows -
    SELECT function1@Remote_DB(7782) FROM dual;
    You need to set the parameter -
    HS_CALL_NAME
    in the DG4MSQL init<sid>.ora file with the owner and name of the function, for example -
    HS_CALL_NAME = "owner1.function1, owner2.function2 "
    and if you want to return values using the function you need to set the parameter in the gateway init file -
    HS_FDS_PROC_IS_FUNC=TRUE
    For full details you need to refer to the documentation -
    Oracle® Database Gateway for SQL Server User’s Guide, 11g Release 2 (11.2)
    Oracle® Database Heterogeneous Connectivity User’s Guide 11g Release 2 (11.2)
    which is available from -
    http://www.oracle.com/pls/db112/homepage
    and click on the 'Integration Information' option on the left.
    The documentation has further details on how to call and use remote functions.
    For information about installing and configuring the gateway and links to further information have a look at the following note -
    Note.1083703.1 Master Note for Oracle Gateway Products
    available in My Oracle Support
    You cannot use the Database Gateway for ODBC (DG4ODBC) to create the database link as it does not supported stored procedures or remote functions.
    Regards,
    Mike
    Edited by: mkirtley on Sep 2, 2011 11:09 AM

  • SQL Server Reporting Services won't start - SQL Server 2008 R2 SP1 on Windows 2008 SP2

    All has been fine for some time, this server runs SQL and SSRS.  
    Recently reporting service says it starts, then stops.  No changes of which I am aware.
    This is in the application log:
    Service cannot be started. System.Exception: Default appdomain failed to initialize.
       at Microsoft.ReportingServices.Library.ServiceAppDomainController.Start()
       at Microsoft.ReportingServices.Library.ReportService.OnStart(String[] args)
       at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
    I've tried changing the account to a domain admin, just to see - but it doesn't help.
    Thoughts?  Help?

    Hi BlakeDuffey,
    Generally, we may see the error messge "Default appdomain failed to initialize" in the application log when try to start Reporting Services if the RSreportserver.config file has been modified unexpectedly. At this time, I suggest that you back up your
    current RSreportserver.config file, and then check the config file referring to the following article:
    RSReportServer Configuration File
    Note: The RSReportServer.config is located in the <drive>:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer folder.
    If you cannot find the exceptions in the RSreportserver.config file, please post the config file so that we can help you to check it.
    Meanwhile, please also check the Reporting Services Log file to see if there are any error messages related to the issue. If there are, please post the error messges as well. The Reporting Services Log file is located in the <drive>:\Program Files\Microsoft
    SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles folder.
    Hope this helps.
    Regards,
    Mike Yin
    TechNet Subscriber Support
    If you are
    TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Mike Yin
    TechNet Community Support

  • SharePoint farm - SQL Server - MSSQLSERVER service is running as "Local System" - Can I change it to Domain User account?

    Hi there,
    In my SharePoint 2010 farm - on the SQL Server:
    The MSSQLSERVER service is running under Local System.
    1. Can I change it to run as a normal Domain User account?
    2. Does it need any extra privileges?
    3. Is it a safe thing to do?
    Brief description will be very useful.
    Thanks so much.

    You need to create Service account with password never expire option+ User never change password
    Then you need to go through below recommendation from Microsoft
    Security Considerations for a SQL Server Installation
    Planning for Services, Accounts, and Connections
    Hope you got starting point
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

Maybe you are looking for