How To Restric all kind of access to 2 specific tables in SQL Server for all Users.Instead of table we would like users to go through View.

Hi All,
I am looking at an Technical solution for Restricting the direct access some specific tables in my data base  to all the users(Except admins and few Service accounts). However views created on top of these tables would be exposed to all Users.
Could any one help me with the best solution.
Thanks in advance,
Regards,
Raja Suri

Hello,
You can try to create a new role "Client_User" in the database and deny access to the new role on the specify tables. And then add all user which you want to restricting the direct access the specific tables to the database role.
For example:
Use Database
CREATE ROLE [Client_User] AUTHORIZATION db_securityadmin;
DENY SELECT ON OBJECT::schema.table TO [Client_User] ;
EXEC sp_addrolemember 'Client_User', 'username';
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support

Similar Messages

  • Server based Office 2013 - where do I save word templates on the server for all users to access from "New"?

    Wonder if anyone can point me in the right direction. I'm used to working with stand alone desktop MS Office products.
    We have a server connected to six desktop work stations. All stations have access to Microsoft Office 2013 on the server, and the printer is linked through
    the server.
    Users are currently accessing Word doc Documents on the shared (p) drive as templates, and then saving them with relevant file names to their area on the
    (p).
    Surely there is a way to save Word templates to the server, so that when someone clicks on "New" in Word our own templates are also offered automatically?
    Thanks
    Mark

    If
    anyone knows the address
    for where Microsoft stores the main default templates  - then that would
    be really useful? It would also allow us to get rid of the numerous templates that we would never use.
    Thanks :)

  • How do I get the volume on my ipod classic to the same level for all songs?  Some are louder than others.

    How do I get the volume on my ipod classic to the same level for all songs?  Some songs are a lot lower than others.

    Coverflow in iTunes is sorted by Album Artist whereas coverflow on the iPod classic is sorted by Artist. Unfortunately, there is no way to set this on your iPod. This is such a fumble on Apple's part that I'm beginning to think they're becoming another Microsloth with buggy firmware and products.

  • Using iPhoto 09, 8.1.2 How do I re-route saving pictures to the hard drive? Currently am saving to files on 'my' partition, and would like to change to save to a shared file so both partitions can view and access.

    Using iPhoto 09, 8.1.2 How do I re-route saving pictures to the hard drive? Currently am saving to files on 'my' partition, and would like to change to save to a shared file so both partitions can view and access.

    Drag the Library from the Pictures folder to the Users/Shared folder. I would point out that folks doing this on 10.6 and later frequently meet permissions issues. You might do better moving it to an appropriately formatted External Disk.

  • How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?

    How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
    I tried using DROP Tables, Truncate Database, Delete and many more but it is not working.  I want to delete all tables using Query Analyzer, i.e. through SQL Query.
    Please help me out in this concern.
    Nishith Shah

    Informative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
    declare @TTName Table
    (TableSchemaTableName
    varchar
    (500),
    [status] int
    default 0);
    with AvailableTables
    (TableSchemaTableName)
    as
    (select
    QUOTENAME(TABLE_SCHEMA)
    +
    +
    QUOTENAME(TABLE_NAME)
    from
    INFORMATION_SCHEMA.TABLES)
    insert into @TTName
    (TableSchemaTableName)
    select *
    from AvailableTables
    declare @TableSchemaTableName varchar
    (500)
    declare @sqlstatement nvarchar
    (1000)
    while 1=1
    begin
    set @sqlstatement
    =
    'DROP TABLE '
    + @TableSchemaTableName
    exec
    sp_executeSQL
    @sqlstatement
    print
    'Dropped Table : '
    + @TableSchemaTableName
    update @TTName
    set [status]
    = 1
    where TableSchemaTableName
    = @TableSchemaTableName
    if
    (select
    count([Status])
    from @TTName
    where [Status]
    = 0)
    = 0
    break
    end

  • How to create a DSN-less connection to SQL Server for linked tables in Access

    hey
    i cant understand how i use that Function
    if that information what you need
     stLocalTableName: dbo_user_name
    stRemoteTableName: user_name
    stServer :sedo2015.mssql.somee.com
    stDatabase :sedo2015
    stUsername :sedo_menf_SQLLogin_1
    stPassword :123456789
    how will be that Function??
    please write that Function to me
    '//Name : AttachDSNLessTable
    '//Purpose : Create a linked table to SQL Server without using a DSN
    '//Parameters
    '// stLocalTableName: Name of the table that you are creating in the current database
    '// stRemoteTableName: Name of the table that you are linking to on the SQL Server database
    '// stServer: Name of the SQL Server that you are linking to
    '// stDatabase: Name of the SQL Server database that you are linking to
    '// stUsername: Name of the SQL Server user who can connect to SQL Server, leave blank to use a Trusted Connection
    '// stPassword: SQL Server user password
    Function AttachDSNLessTable(stLocalTableName As String, stRemoteTableName As String, stServer As String, stDatabase As String, Optional stUsername As String, Optional stPassword As String)
    On Error GoTo AttachDSNLessTable_Err
    Dim td As TableDef
    Dim stConnect As String
    For Each td In CurrentDb.TableDefs
    If td.Name = stLocalTableName Then
    CurrentDb.TableDefs.Delete stLocalTableName
    End If
    Next
    If Len(stUsername) = 0 Then
    '//Use trusted authentication if stUsername is not supplied.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";Trusted_Connection=Yes"
    Else
    '//WARNING: This will save the username and the password with the linked table information.
    stConnect = "ODBC;DRIVER=SQL Server;SERVER=" & stServer & ";DATABASE=" & stDatabase & ";UID=" & stUsername & ";PWD=" & stPassword
    End If
    Set td = CurrentDb.CreateTableDef(stLocalTableName, dbAttachSavePWD, stRemoteTableName, stConnect)
    CurrentDb.TableDefs.Append td
    AttachDSNLessTable = True
    Exit Function
    AttachDSNLessTable_Err:
    AttachDSNLessTable = False
    MsgBox "AttachDSNLessTable encountered an unexpected error: " & Err.Description
    End Function

    thanks more thanks for you
    look i add that code in form
    it worked but i cant add recored  why ??
    Private Sub Form_Open(Cancel As Integer)
    Call AttachDSNLessTable("dbo_user_name", "user_name", "sedo2015.mssql.somee.com", "sedo2015", "sedo_menf_SQLLogin_1", "123456789")
    End Sub

  • Reporting Services through ISA server for All Authenticated Users

    Hello colleagues.
    I have MS SQL 2012 server with Reporting Services and it work via link:
    https://reports2.domain.com/reports
    In LAN all work fine, but I want publish this resource via ISA for All Authenticated Users.
    When in publish rule I configure (in Condition) "All users" - all work fine, but when I configure "All Authenticated Users" - I have trouble on web form on
    https://reports2.domain.com/reports/Pages/Report.aspx?ItemPat...  - scripts not work, because it run how "anonymous" (I see on ISA logging) and ISA block scripts.
    I can't use "All Users", because it's not secure.
    Maybe somebody publish Reporting Services through ISA server for All Authenticated Users?
    OR maybe - how on Reporting Services configure Negotiate authenticated for scripts?

    Hi Alexander,
    All users or applications who request access to report server content or operations must be authenticated using the authentication type configured on the report server before access is allowed. The AuthenticationType named RSWindowsNegotiate is supported
    by Reporting Services. To configure Windows Authentication on the Report Server, please see:
    http://msdn.microsoft.com/en-us/library/cc281253(v=sql.110).aspx
    Besides, we can publish report server via ISA server. Please note that you should use a new web port number with a new listener which shouldn’t be used by other web site for report server. Reference:
    http://social.technet.microsoft.com/Forums/forefront/en-US/1cc68996-1ce6-4d88-a30d-2bfd13fba06e/how-to-publish-ssrs-2008-through-isa-2006?forum=Forefrontedgegeneral
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support
    Katherine thanks for answer.
    Report Server service started as Domain account.
    I have in RSReportServer.config this:
    <Authentication>
    <AuthenticationTypes>
    <RSWindowsNegotiate />
    </AuthenticationTypes>
    <RSWindowsExtendedProtectionLevel>Allow</RSWindowsExtendedProtectionLevel>
    <RSWindowsExtendedProtectionScenario>Proxy</RSWindowsExtendedProtectionScenario>
    <EnableAuthPersistence>true</EnableAuthPersistence>
    </Authentication>
    In web.config I have this:
    <authentication mode="Windows" />
        <identity impersonate="true" />
    I can go (from Internet through ISA) to
    https://reports2.domain.com/reports  and LogOn Authentication is work, but scripts not work, because it run how "anonymous" (I see this on ISA logging) and ISA block scripts.
    Do you know where in Reporting Services configure run scripts with Negotiate authentication?

  • How to Create a Temporary Table with SQL Server

    I know you can create a temporary table in SQL Server 2000, but not quite sure how to do it in CFMX 7, i.e., does the SQL go inside a <CFQUERY dbtype="query"> tag?
    I'm pulling the main set of records from an Oracle server (1st data source), but it does not contain employee names, only employee IDs.  Since I need to show the employee name along with the Emp ID, I'm then pulling a list of "current" employee names from a SQL Server (2nd data source), which is the main database on our CF server.
    I've got a QofQ that works fine, except it only matches EmpIDs that exist in both result sets.  Employees who are no longer employed, don't match, and don't display.  Since I can't do a LEFT OUTER JOIN with a QofQ, what I need to do is get the records from the Oracle server into the SQL Server.  Preferably in a temporary table.
    I was hoping if I could get those Oracle records written to a temp table on the main SQL Server, in same database as the Employee Name table, I could then write a normal <CFQUERY> that uses a LEFT OUTER JOIN.
    I think I could probably write a Stored Procedure that would execute the SQL to create the temporary table, but am trying to avoid having to write the SP, and do it the simplest way.
    This query will be a program that can be run hundreds of times per day, with a form that allows users to select date ranges, locations, and other options.  That starts the queries, which creates the report.  So I just need the temp table to exist only until all the SQL has run, and the <CFOUTPUT> has generated a report.
    If the premise is right, I just need some help with the syntax for creating a SQL Server temp table, when you want to write records to it from an external data source.  I'm trying the following, but getting an error:
    <CFQUERY name="ITE_Temp" datasource="SkynetSQL">
    CREATE TABLE #MyTemp
    (   INSERT INTO #MyTemp
    ITE2.TrueFile char (7) NOT NULL,
    ITE2.CountOfEmployee int NULL,
    ITE2.DTL_SUBTOT decimal NULL,
    ITE2.EMPTYPE char (3) NULL,
    ITE2.ARPT_CD char (3) NULL
    </CFQUERY>
    So I actually created a permanent table on the SQL Server, and wrote the below SQL, which does work, and does write the records to table.  I can then write another CFQUERY with a LEFT OUTER JOIN, and get all the records, including those that don't have matching employee name:
    <CFQUERY datasource="SkynetSQL">
    <CFLOOP index="i" from="1" to = "#ITE2.RecordCount#">
    INSERT INTO ITE_Temp
       (FullFile,
       EmployeeCount,
       DTL_Amount,
       EmployeeType,
       station)
    VALUES  ('#ITE2.TrueFile[i]#',
       #ITE2.CountOfEmployee[i]#,
       #ITE2.DTL_SUBTOT[i]#,
       '#ITE2.EMPTYPE[i]#',
       '#ITE2.ARPT_CD[i]#')
    </CFLOOP>
    </CFQUERY>
    But, I hate to have to create a table and physically write to it.  For one, it seems slower, and doing it in temp would be in memory, and probably much faster, correct?  Is there some way to code the above, so that it does something similar, but in a TEMPORARY TABLE?   If I can figure out how to do this, I can pull data from multiple data sources and servers, and using SQL Server temp tables, work with the data as if it was all on the same SQL Server, and do some cool reports.
    Everything I've done for the past few years, has all been from data from a single source, whether SQL Server, or another server.  Now I need to start writing reports where data can come from 3 or 4 different servers, and be able to do joins (inner and outer).  Thanks for any advice/help.  Much appreciated.
    Gary

    While waiting to hear back, I was able to write the query results from an outside Oracle server, to a table on the local SQL Server, and do the LEFT OUTER JOIN required for the final query and report to work.  That was with this syntax:
    <CFQUERY name="AddTableRecords" datasource="MyTable">
    TRUNCATE TABLE ITE_Temp
    <CFOUTPUT query="ITE2">
    INSERT INTO ITE_Temp
    (FullFile,EmployeeCount,DTL_Amount,EmployeeType,station)
    VALUES
    ('#TrueFile#', #CountOfEmployee#, #DTL_SUBTOT#, '#EMPTYPE#', '#ARPT_CD#')
    </CFOUTPUT>
    </CFQUERY>
    However, I was not able to write to a temporary table AND read the results. I got the syntax to run to write the above results to a temporary table.  But when I tried to read and output the results from the temp table, I got an error.  Also, it wouldn't take the single "#" (local) only the global "##" table var, using this syntax.  Note that if I didn't have the DROP TABLE in the beginning, the 2nd time you run this query, you get an error telling you the table already exists.
    <CFQUERY name="ITE_Temp2" datasource="MyTable">
    DROP TABLE ##MyTemp2
    CREATE TABLE ##MyTemp2
    FullFile char (7) NOT NULL,
    EmployeeCount int NULL,
    DTL_Amount decimal NULL,
    EmployeeType char (3) NULL,
    station char (3) NULL
    <CFOUTPUT query="ITE2">
    INSERT INTO ##MyTemp2 VALUES
    '#ITE2.TrueFile#',
    #ITE2.CountOfEmployee#,
    #ITE2.DTL_SUBTOT#,
    '#ITE2.EMPTYPE#',
    '#ITE2.ARPT_CD#'
    </CFOUTPUT>
    </CFQUERY>
    So even though the above works, I could use some help in reading/writing the output.  I've tried several things similar to below, but they don't work.  It't telling me ITE_Temp2 does not exist.  It's not easy to find good examples of creating temporary tables in SQL Server.
    <CFQUERY name="QueryTest2" datasource="SkynetSQL">
    SELECT *
    FROM ITE_Temp2
    </CFQUERY>
    <CFOUTPUT query="ITE_Temp2">
    Output from Temp Table<br>
    <p>FullFile: #FullFile#, EmployeeCount: #EmployeeCount#</p>
    </CFOUTPUT>
    Thanks for any help/advice.
    Gary.

  • How to use create-default-dbms-tables in SQL Server 2000

    Hi everyone,
    I'm new in EJB development. I'm trying to deploy a CMP to Weblogic 8.1 SP1 using
    JBuilderX. I configured a ConnectionPool and DataSource to allow the CMP to access
    the SQL Server 2000. However, I cannot deploy the CMP if I didn't create the table
    in SQL Server manually. Does anyone know how to use the create-default-dbms-tables?

    Refer to
    http://e-docs.bea.com/wls/docs81/ejb/DDreference-cmp-jar.html#1162249
    "Keith" <[email protected]> wrote:
    >
    Hi everyone,
    I'm new in EJB development. I'm trying to deploy a CMP to Weblogic 8.1
    SP1 using
    JBuilderX. I configured a ConnectionPool and DataSource to allow the
    CMP to access
    the SQL Server 2000. However, I cannot deploy the CMP if I didn't create
    the table
    in SQL Server manually. Does anyone know how to use the create-default-dbms-tables?

  • Import MS Access 2013 tables into SQL Server 2012

    Hi there,
    Is there a step by step example somewhere showing how to import an MS Access 2013 table into SQL Server 2012?
    I have read the existing posts and don't see a definitive answer.
    I have installed MS Access 2010 engine, first 32 bit then 64 bit.
    I have installed the MS Access 2013 runtime on my server.
    I use the Office 2015 Access Database Engine OLE DB Provider.
    I get the error:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database.
    The post regarding the above errors doesn't resolve the issue.
    I have full administrative permissions on the server.
    What is the trick to making this work?
    Thanks,
    Ric
    Ric Miller

    Hi there,
    I tried the exact same operation on a third machine.
    This machine has Windows 8.1 64 bit, SQL Server 2012 64 bit, MS Office 2013 Plus 32 bit.
    I am the administrator on this machine.
    I installed this:
    Microsoft Access Database Engine 2010 Redistributable 32 bit (because I have MS Office 2013 plus 32 bit installed.)
    From here:
    http://www.microsoft.com/en-us/download/details.aspx?id=13255
    It won't let me install the 64 bit version without uninstalling MS Office 32 bit.
    I created an MS Access database on this machine using MS Access 2013 and created a table with 3 records.
    I used the "Import and Export Data (32 bit)" from the start menu.
    After I installed the "Database Engine 2010 32 bit" driver above, I now have the option of "Office 2015 Access Database Engine OLE DB Provider" as Data Source which I did not have prior to doing this installation.
    I selected the driver and added the Properties of the Data Source Name file location of the MS Access file. I am using a blank password.
    I go thru the same sequence of selecting a table to import and after running the result is the same:
    Error 0xc0202009: Source - APEntries [1]: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E37.
    "Error 0xc02020e8: Source - APEntries [1]: Opening a rowset for "`TableName`" failed. Check that the object exists in the database."
    This seems to be consistent across three machines with three operating systems with the same files and the same result.
    I understand that some people have gotten this to work.
    I would appreciate it if anyone can report an error in the above procedure to me.
    Thanks,
    Ric
    Ric Miller

  • I am setting up ipads for use in an elementary, and I would like the "home screen" to be the apps, rather than the default with the chat, mail, etc icons.  how do I change that?

    Can anyone answer this question?
    I am setting up ipads for use in an elementary, and I would like the "home screen" to be the apps, rather than the default with the chat, mail, etc icons.  how do I change that?

    Depending on exactly what you want to do, there are a couple of ways of handling this. You may want to access teh user guide for some ideas: http://manuals.info.apple.com/en_US/ipad_user_guide.pdf
    In particular, check the sections on Customizing iPad and Settings > Restrictions.

  • Access Tables in SQL Server

    I was told that SAP on SQL Server maintains a very unique security where someone can not just directly access tables in SQL Server. I was told you need the SAP client in order to access the data stored within the DB. With other systems, normally users such as a DBA  or privileged users would be able to directly log into the database and possibly alter data, whereas this is not the case for SAP on SQL. Can someone help confirm if this is true or not and explain to me how this works.

    Hi Julia:
    You can access data stored in SQL tables using Enterprise Manager or SQL Query Analyzer and you can do in every other database system such as DB2, Informix or Oracle; there are some well-known Cluster tables that information can only be read from inside SAP.
    Regards,
    Federico

  • 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.

  • Is it possible to have access a table of DB SQL Server for the DB Oracle?

    Is it possible to have access a table of DB SQL Server for the DB Oracle? How?
    Thank you, Paulo.

    You can configure Heterogeneous Distributed Database Systems

  • Recently backing up my ipad onto my macbook, which is the backup server for all of my gadgets.  This includes all my photos and tons of music.  The macbook said it could not backup the ipad because there was insufficient disc space to do so. What now?

    I have a macbook operating OSX10.6.7.  Recently backing up my ipad which had lots of photos from a recent vacation.  I use this laptop as the backup server for all of my gadgets so it has thousands of photos and tons of music.  It just told me that it couldn't back up the ipad bc there wasn't enough disc space.  I was afraid that this would happen eventually.  What next?  Newer laptop with more space?  I'm not sure what files I could sacrifice to free up more space as most of these are important.

    What size hard drive do you have in your MacBook? The cheapest options are, a larger internal hard drive, or an external drive. Or you could get a cheap desktop PC and network to it for storage. I've got one that lives in the hall with 3 Terabytes (That's 3000gb) of storage.

Maybe you are looking for

  • How do I set up an autofill for forms, so that when I go to a page with a form it automatically gets filled in?

    I looked in the help section and preferences and there is no way you can fill in your information so that forms will be filled in for you.

  • Function keys won't copy or paste in iWork

    The Edit menu on both Pages and Numbers shows F2, F3 and F4 as shortcuts for Cut, Copy, and Paste.  These do not work; all I get it a ding sound.  Same result when using Apple-X, Apple-C or Apple-V.  These shortcuts do work in other software.  Any su

  • Authorization Issue in WebUI (also ST01 question)

    Hi All, we are implementing new CRM 2007 and users will be working with the WebUI mainly in the future. Now here is something strange that we found out: When a user logs on to the Web UI and enters some sales transaction trying to add a new material

  • Rebuild a hard drive

    Hi- I have a G4 laptop with 2 partitions on the hard drive. I don't know what possessed me to break the hd in 3 in the first place but now I regret it and would like to regress to one drive. I want to go the 'lazy' way. Question: If I copy the entire

  • Cfselect flash "style" question

    I'm using the <cfselect> tag with Flash formatting. The size attribute is set to 3. I'm using whatever the defaults are for the style attribute. When the cfselect renders to the screen, the spacing between the items in the select control is too much.