Grant permission to "Create Database" Only

I want to create a user in SQL,
user just need a permission to create a new database nothing else,
how can i accomplish this?
Regards
k

use [master]
GO
GRANT CREATE ANY DATABASE TO [LoginName]
GO
-Prashanth

Similar Messages

  • Grant Permission In Access Database

    Hello All
    How to set Grant Permission in Access Database, I get an error here
    what's wrong in my SQL syntax?
    Best Regard
    Xan To

    Hello Matthias Kläy
    I Have try your code and I get an error
    this my code
    Imports System.Data.OleDb
    Imports System.Data
    Imports ADOX.ObjectTypeEnum
    Imports ADOX.ActionEnum
    Imports ADOX.RightsEnum
    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim cat As ADOX.Catalog
    Dim grp As New ADOX.Group
    Dim Builder As New OleDb.OleDbConnectionStringBuilder
    Try
    With Builder
    .Provider = "Microsoft.ACE.OLEDB.12.0"
    .DataSource = "C:\Users\Xan To\Desktop\Test.mdb"
    End With
    'Using cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Xan To\Desktop\Test.mdb; Jet OLEDB:System Database=system.mdw;")
    Using cn As New OleDb.OleDbConnection
    With cn
    .ConnectionString = Builder.ConnectionString
    End With
    Using cmd As New OleDb.OleDbCommand
    With cmd
    .Connection = cn
    .CommandText = "GRANT SELECT ON TABLE MSysObjects TO PUBLIC"
    End With
    cn.Open()
    'cmd.ExecuteNonQuery()
    cat = New ADOX.Catalog
    cat.ActiveConnection = cn
    grp.Name = "Public"
    cat.Groups.Append(grp)
    grp.SetPermissions("MSysObjects", adPermObjTable, adAccessGrant, adRightRead)
    End Using
    End Using
    Catch ex As Exception
    MessageBox.Show(ex.ToString)
    End Try
    End Sub
    End Class

  • Is it possible to grant users to create views only?

    We are using SQL Server 2008 R2.
    Some advanced users have been working on the database to retrieve data from tables and alter existing views for years. Now we would like to give them permissions to create their own views.
    It is not supposed to give them too much rights such as creating tables. Is it possible to do that, such as creating new schema for that purpose. Thanks.

    You left out an important step that we failed to mention: you muist change the order of the schema. This is required, or else ownership chaining will void all security checks.
    In script below, you get a permission error trying to create the first view, but comment out the ALTER AUTHORIZATION statement and it will not.
    Using a loginless user and EXECUTE USER is an execellent way to test a permission setup on database level.
    CREATE DATABASE yngve
    go
    USE yngve
    go
    CREATE SCHEMA torsten
    go
    CREATE USER ulrik WITHOUT LOGIN WITH DEFAULT_SCHEMA = torsten
    GRANT SELECT ON SCHEMA::torsten TO ulrik
    GRANT ALTER ON SCHEMA::torsten TO ulrik
    GRANT CREATE VIEW TO ulrik
    ALTER AUTHORIZATION ON SCHEMA::torsten TO ulrik
    go
    CREATE TABLE dbo.alfa(a int NOT NULL)
    INSERT dbo.alfa(a) VALUES (88)
    go
    EXECUTE AS USER = 'ulrik'
    go
    CREATE VIEW torsten.albin AS SELECT a FROM dbo.alfa
    go
    SELECT * FROM torsten.albin
    go
    CREATE VIEW torsten.alfons AS SELECT getdate() AS today
    go
    SELECT * FROM torsten.alfons
    go
    REVERT
    go
    USE tempdb
    go
    DROP DATABASE yngve
    Erland Sommarskog, SQL Server MVP, [email protected]
    Thanks. I have tried to create a login less account.
    CREATE USER [testuser] without login WITH DEFAULT_SCHEMA=[SchemaTest]
    GOGRANT SELECT ON SCHEMA :: SchemaTest TO  [testuser]
    GO
    GRANT ALTER ON SCHEMA :: SchemaTest TO  [testuser]
    GOGRANT CREATE VIEW TO  [testuser]
    GO
    ALTER AUTHORIZATION ON SCHEMA :: SchemaTest TO [testuser]
    GO
    Without "ALTER AUTHORIZATION" statment, user can create SchemaTest.v_MyView and select all data.
    With "ALTER AUTHORIZATION" statment, user can still be able to create SchemaTest.v_MyView, but unable to select retrieve data from the view. The error is as below.
    The SELECT permission was denied on the object 'MyTable', database 'ViewTest', schema 'dbo'.
    Maybe I still miss something. But at least user cannot retrieve protected data.

  • Grant Permission to create/drop functions only

    I have to grant permissions to a user to drop/create/execute functions owned by several schemas. How do I do it without giving away the keys?
    Thanks

    AFAIK ALTER SCHEMA + CREATE FUNCTION does not allow to do anything with a table.. in fact the user can't even select from the function he creates. - Unless he_owns_ the schema already..
    The second is correct, the first is not:
    CREATE PROCEDURE somesp AS PRINT 'Created by dbo'
    go
    CREATE TABLE sometable (a int NOT NULL, b int NOT NULL)
    go
    CREATE USER funcuser WITHOUT LOGIN
    GRANT CREATE FUNCTION TO funcuser
    GRANT ALTER ON SCHEMA::dbo TO funcuser
    go
    EXECUTE AS USER = 'funcuser'
    go
    CREATE FUNCTION funky_user() RETURNS nvarchar(23) AS
    BEGIN
    RETURN 'Created by funcuser'
    END
    go
    SELECT dbo.funcuser()
    go
    ALTER PROCEDURE somesp AS PRINT 'Altered by funcuser'
    go
    ALTER TABLE sometable DROP COLUMN b
    go
    REVERT
    go
    EXEC somesp
    SELECT b FROM sometable
    go
    DROP PROCEDURE somesp
    DROP TABLE sometable
    DROP FUNCTION funky_user
    DROP USER funcuser
    Also, what do you man by "without giving away the keys" - what "keys"? Do you have some form of data encryption in place?
    I interpreted this pictorially. That is, how do I give out this permission without permitting the user to take over the database. As seen from above, ALTER on SCHEMA does not give away the entire key-ring, but more keys that may be desired.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Permission denied when creating database in Sql Server 2008 for SQLExpress

    I'm getting an permission error while restoring the database. I'm using SQL Server 2008 SQLEXPRESS
    I'm able to create the user using this script " CREATE LOGIN [darth\vader] FROM WINDOWS;
    GO;"
    But when I try to give role to the user it's still give me permission error.. SP_ADDSRVROLEMEMBER ‘darth\vader’, ‘sysadmin’
    Can someone guide me how to resolve this issue?

    http://msdn.microsoft.com/en-us/library/ms186858.aspx
    Permissions
    If the database being restored does not exist, the user must have CREATE DATABASE permissions to be able to execute RESTORE. If the database exists, RESTORE permissions default to members of the sysadmin and dbcreator fixed
    server roles and the owner (dbo) of the database (for the FROM DATABASE_SNAPSHOT option, the database always exists).
    RESTORE permissions are given to roles in which membership information is always readily available to the server. Because fixed database role membership can be checked only when the database is accessible and undamaged, which is not always the case when RESTORE
    is executed, members of the db_ownerfixed database role do not have RESTORE permissions.
    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

  • Is db_name is the only parameter for creating database ? [Exper. on 32-bit]

    Because of the discussion present in the following thread, I did few experiments and would you like to share with you. Hope it is a useful information for you guys.
    Re: db_name & memory allocation
    OS: Win XP SP2 or Windows 2000 <b>(32-bit)</b>
    Oracle Version: Oracle 10gR2
    System RAM: 1G
    <b>Attempting to create the database CCC by specifying db_name parameter only</b>
    C:\oracle\product\10.2.0\db_1\database>copy con initCCC.ora
    db_name=CCC
    ^Z
            1 file(s) copied.
    <b> Starting the service </b>
    C:\oracle\product\10.2.0\db_1\database>oradim -new -sid CCC -startmode m
    Instance created.
    C:\oracle\product\10.2.0\db_1\database>set oracle_sid=CCC
    C:\oracle\product\10.2.0\db_1\database>sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 6 07:50:06 2007
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to an idle instance.
    SQL>
    SQL>
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  <b>113246208</b> bytes -- Default SGA size
    Fixed Size                  1247588 bytes
    Variable Size              58721948 bytes
    Database Buffers           50331648 bytes
    Redo Buffers                2945024 bytes
    <b> On seeing dynamic components size, shared pool got
    33m, large pool got 0m, java pool got 25m and buffer cache
    got 50m. Please check the references for these default
    values. </b>
    SQL> select component,current_size from v$sga_dynamic_components;
    COMPONENT                                                        CURRENT_SIZE
    shared pool                                                          33554432
    large pool                                                                  0
    java pool                                                            25165824
    streams pool                                                                0
    DEFAULT buffer cache                                                 50331648
    KEEP buffer cache                                                           0
    RECYCLE buffer cache                                                        0
    DEFAULT 2K buffer cache                                                     0
    DEFAULT 4K buffer cache                                                     0
    DEFAULT 8K buffer cache                                                     0
    DEFAULT 16K buffer cache                                                    0
    COMPONENT                                                        CURRENT_SIZE
    DEFAULT 32K buffer cache                                                    0
    ASM Buffer Cache                                                            0
    13 rows selected.
    <b>Total=109051904 </b>
    SQL>
    create database
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    <b>Errors in alert log file</b>
    ORA-00604: error occurred at recursive SQL level 1
    <b>ORA-04031: unable to allocate 40 bytes of shared memory ("shared pool","create unique index
    i_proxy_...","sql area","kksol : kksnsg")
    </b>
    Error 1519 happened during db open, shutting down database
    USER: terminating instance due to error 1519
    <b>It was thought that shared_pool memory area is not
    sufficient. Then thought to know how oracle will behave on
    setting sga_target parameter.</b>
    <b>initCCC.ora</b>
    db_name=CCC
    sga_target=113m
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  <b>121634816 bytes -- Got around 121m  </b>
    Fixed Size                  1247636 bytes
    Variable Size              54527596 bytes
    Database Buffers           62914560 bytes
    Redo Buffers                2945024 bytes
    <b>Now create database statement got success here.
    Instance got few extra Mbs of memory and oracle can create
    the database.</b>
    <b>Then it was thought that, why to give 121Mb even. Let exactly 113246208 bytes be devoted to the instance.</b>
    initCCC.ora
    db_name=CCC
    sga_target=113246208 -- providing exact number of bytes as obtained in default case
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area  113246208 bytes
    Fixed Size                  1247588 bytes
    Variable Size              54527644 bytes
    Database Buffers           54525952 bytes
    Redo Buffers                2945024 bytes
    SQL>
    <b> Now create database statement got success here as
    well. Because of sga_target, automatic shared memory
    management enabled and instance was taking care of buffer
    cache, shared pool, large pool, java pool and
    streams_pool. In this case shared pool got 46m (greater
    than default case value). Java pool and Large pool got 4
    mb each and buffer cache got 54m. </b>
    SQL> select component,current_size
      2  from v$sga_dynamic_components;
    COMPONENT                                                        CURRENT_SIZE
    shared pool                                                          46137344
    large pool                                                            4194304
    java pool                                                             4194304
    streams pool                                                                0
    DEFAULT buffer cache                                                 54525952
    KEEP buffer cache                                                           0
    RECYCLE buffer cache                                                        0
    DEFAULT 2K buffer cache                                                     0
    DEFAULT 4K buffer cache                                                     0
    DEFAULT 8K buffer cache                                                     0
    DEFAULT 16K buffer cache                                                    0
    COMPONENT                                                        CURRENT_SIZE
    DEFAULT 32K buffer cache                                                    0
    ASM Buffer Cache                                                            0
    13 rows selected.
    <b>Total=109051904 </b>
    SQL>
    By providing 113246208 bytes (as in default case) of
    memory to SGA by setting sga_target value, Oracle gave
    extra memory to shared_pool and buffer cache than in case
    of default, thus helping create database statement to get
    pass. Oracle always recommends to use automatic shared
    memory management by setting sga_target parameter value.
    Hope this experiment provides few clues about automatic
    shared memory management feature of Oracle 10g. This case
    was conducted on 32-bit Oracle. It is quite possible that
    create database statement might get success in 64-bit
    Platform as by default Oracle will provide 84 Mb to Shared
    pool. But to confirm, it has to be experimented.
    References:
    Shared pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams196.htm#sthref804
    Large Pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams090.htm#sthref377
    Java Pool
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams087.htm#sthref364
    Buffer Cache
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams043.htm#sthref185

    Hi,
    Good Work Mohammed !!!
    Regards
    Taj

  • Only one CPU core high sys usage when create database instance via dbca

    when using dbca to create database instance
    JUST ONLY ONE CPU core high sys usage
    how to troubleshoot it
    see this:
    top - 09:28:19 up 55 days, 20:38, 10 users,  load average: 1.00, 1.08, 1.31
    Tasks: 1231 total,   2 running, 1228 sleeping,   0 stopped,   1 zombie
    Cpu(s):  0.0%us,  1.3%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:  57588328k total, 55028620k used,  2559708k free,   196852k buffers
    Swap: 16386292k total,    23156k used, 16363136k free, 23011232k cached
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                        
    11343 oracle    25   0 1771m  30m  23m R 99.7  0.1   5:36.39 oracle                                                                                         
    3692 oracle    16   0 13948 2348  816 S  1.6  0.0  17:00.94 top                                                                                            
    11432 root      15   0 13540 2024  820 R  1.3  0.0   0:00.21 top                                                                                            
    11034 oracle    16   0  737m 171m  33m S  0.3  0.3   0:52.39 java                                                                                           
    11435 oracle    15   0 66056 1596 1180 S  0.3  0.0   0:00.01 bash                                                                                           
        1 root      15   0   784  172  160 S  0.0  0.0  38:56.76 init                                                                                           
        2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.58 migration/0                                                                                    
        3 root      34  19     0    0    0 S  0.0  0.0   0:00.75 ksoftirqd/0                                                                                    
        4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0                                                                                     
        5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.81 migration/1                                                                                    
        6 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/1                                                                                    
        7 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/1                                                                                     
        8 root      RT  -5     0    0    0 S  0.0  0.0   0:02.53 migration/2    mpstat info
    [root@localhost ~]# mpstat -P ALL 2
    Linux 2.6.18-164.el5 (localhost.localdomain)    09/12/12
    09:29:09     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
    09:29:11     all    0.01    0.00    1.27    0.01    0.00    0.01    0.00   98.69   1658.29
    09:29:11       0    0.50    0.00    0.00    0.00    0.00    0.50    0.00   98.99   1657.29
    09:29:11      73    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      74    0.00    0.00  100.00    0.00    0.00    0.00    0.00    0.00      0.00
    09:29:11      75    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      76    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      77    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      78    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      79    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
    09:29:13     all    0.01    0.00    1.26    0.01    0.00    0.02    0.00   98.70   1761.19
    09:29:13       0    0.50    0.00    0.50    1.00    0.00    1.99    0.00   96.02   1761.19
    09:29:13      71    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      72    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      73    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      74    0.00    0.00  100.00    0.00    0.00    0.00    0.00    0.00      0.00
    09:29:13      75    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      76    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      77    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      78    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:13      79    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00          you can see there is only one CPU CORE (core 74 but is random , other core have same status but just one CPU core)
    [root@localhost ~]# vmstat -S m 2
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
    r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
    3  0     23   1861    203  24267    0    0     8    12    0    0  0  0 99  0  0
    4  0     23   1845    203  24262    0    0   602 16460 3682 8121  2  2 96  1  0
    3  0     23   1842    203  24276    0    0   692  7520 3297 6610  2  2 97  0  0
    3  0     23   1830    203  24277    0    0   786  3040 3302 7118  2  2 97  0  0
    4  0     23   1829    203  24277    0    0   126  3144 3247 7343  2  1 97  0  0
    3  0     23   1827    203  24279    0    0    76  2944 3292 7502  2  2 96  0  0
    3  0     23   1823    203  24281    0    0     0  3248 3164 7656  2  1 97  0  0
    2  0     23   1827    203  24279    0    0     0  3646 3080 7480  2  1 97  0  0
    2  0     23   1828    203  24279    0    0     0   476 2942 5648  1  1 98  0  0
    3  0     23   1824    203  24281    0    0     2  7476 3377 8111  2  2 97  0  0iostat infor
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               1.28    0.00    1.29    0.00    0.00   97.43
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    hda               0.00         0.00         0.00          0          0
    sda               5.47         0.00        83.58          0        168
    sda1              0.00         0.00         0.00          0          0
    sda2              5.47         0.00        83.58          0        168
    sda3              0.00         0.00         0.00          0          0
    sda4              0.00         0.00         0.00          0          0
    sda5              0.00         0.00         0.00          0          0
    sdb               8.96         0.00       123.38          0        248
    sdb1              8.96         0.00       123.38          0        248
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               1.27    0.00    1.27    0.00    0.00   97.46
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    hda               0.00         0.00         0.00          0          0
    sda               0.00         0.00         0.00          0          0
    sda1              0.00         0.00         0.00          0          0
    sda2              0.00         0.00         0.00          0          0
    sda3              0.00         0.00         0.00          0          0
    sda4              0.00         0.00         0.00          0          0
    sda5              0.00         0.00         0.00          0          0
    sdb              17.50         0.00       236.00          0        472
    sdb1             17.50         0.00       236.00          0        472
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               1.29    0.00    1.30    0.01    0.00   97.41
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    hda               0.00         0.00         0.00          0          0
    sda               0.50         0.00        16.00          0         32
    sda1              0.00         0.00         0.00          0          0
    sda2              0.50         0.00        16.00          0         32
    sda3              0.00         0.00         0.00          0          0
    sda4              0.00         0.00         0.00          0          0
    sda5              0.00         0.00         0.00          0          0
    sdb               7.50         0.00       144.00          0        288
    sdb1              7.50         0.00       144.00          0        288more detail:
    database version 11.2.0.2.0
    system version
    [root@localhost ~]# cat /etc/issue
    Red Hat Enterprise Linux Server release 5.4 (Tikanga)
    Kernel \r on an \m
    [root@localhost ~]# lsb_release
    LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
    [root@localhost ~]# uname -a
    Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linuxhardware info
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 47
    model name      :        Intel(R) Xeon(R) CPU E7- 4860  @ 2.27GHz
    stepping        : 2
    cpu MHz         : 2261.057
    cache size      : 24576 KB
    physical id     : 3
    siblings        : 20
    core id         : 18
    cpu cores       : 10
    apicid          : 229
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 11
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx pdpe1gb rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx smx est tm2 cx16 xtpr popcnt lahf_lm
    bogomips        : 4522.11
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 44 bits physical, 48 bits virtual
    [root@localhost ~]# free -m
                 total       used       free     shared    buffers     cached
    Mem:         56238      55892        346          0        196      23645
    -/+ buffers/cache:      32050      24188
    Swap:        16002         22      15979
    [root@localhost ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda2              19G  4.9G   14G  27% /
    /dev/sda5             230G   27G  192G  12% /home
    /dev/sda1              99M   12M   83M  13% /boot
    /dev/sdb1             2.9T  2.3T  464G  84% /arrayEdited by: JOhnLiu on Sep 11, 2012 7:31 PM

    JOhnLiu wrote:
    thanks for reply sb92075
    [root@localhost ~]# mpstat -P ALL 2
    Linux 2.6.18-164.el5 (localhost.localdomain)    09/12/12
    09:29:09     CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
    09:29:11     all    0.01    0.00    1.27    0.01    0.00    0.01    0.00   98.69   1658.29
    09:29:11       0    0.50    0.00    0.00    0.00    0.00    0.50    0.00   98.99   1657.29
    09:29:11      73    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      74    0.00    0.00  100.00    0.00    0.00    0.00    0.00    0.00      0.00
    09:29:11      75    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
    09:29:11      76    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00I think you don't understand what i mean .
    there just have ONLY ONE CORE %sys 100
    the top command show average of all cpu core sys% usage
    when the one core sys% is 100%
    the system are very slow .
    e.g: when I create a database instance used for a long time . over 2 hours
    but generally it will be done at most 1 hours or shorteris any type of OS virtualization involved in this environment?

  • SQL Express 2008 R2 - CREATE DATABASE permission denied in database 'master'

    I have created a setup application with SQLEXpress 2008 as a prerequisite. On test SQLExpress installs OK
    after the application is installed it must create and install a database using a mixture of SMO and Scripting. I used SMO to add the current user (who is a Windows Administrator) as a Login to the SQL Express server.
    Dim l As Login = New Login(srv, My.User.Name)
                    l.LoginType = LoginType.WindowsUser
                    l.AddToRole("sysadmin")
                    l.DefaultDatabase = "MASTER"
                    l.Create()
    It fails on srv.CreateDatabase with error message "permission denied in database MASTER"
    this thread talks about converting the server to single user mode before adding a login
    http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/86daf5f5-d333-40b1-ae6f-0da052a96600
    how is it possible to scrip this? there is no documentation i can find. 
    the database must be installed in the ProgramData folder. Is there a permissions issue with this. Do I need to assign permissions to this folder somehow?
    bear in mind this will be a remote install and the user expects it work flawlessly.  No manual interventions

    if i connect to the sqlexpress instance  (local)\SQLEXPRESSS  using SQL Management Studio and try to modify the Windows User Login I get the error message:
    "User does not have permission to perform this action. (Microsoft SQL Server, Error: 15247)"
    how is this possible. it seems to be at an impasse. can't go forward or backward 
    Now try launching Managenment Studio by right clicking on shortcut and choosing "Run As Adminitstartor".
    If above works then you are running on Windows 2008 family OS (Vista, 2k8 or Win7) which has
    UAC feature.
    If above does not work then you really don't have permission then follow below. 
    Troubleshooting: Connecting to SQL Server When System Administrators Are Locked Out
    Start the instance of SQL Server in single-user mode by using either the
    -m or
    -f options. Any member of the computer's local Administrators group can then connect to the instance of SQL Server as a member of the
    sysadmin fixed server role.
    http://msdn.microsoft.com/en-us/library/dd207004.aspx
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq

  • How to grant user permission to create "Credential" and "Proxies"

    Hi Team,
    Kindly let me know how to grant permission for user to create "Credential" and "Proxies" on server:
    Thanks in advance
    Santosh

    Can I revoke this permissions once I grant?
    You can use DROP and REVOKE commands to do the opposite.
    USE [msdb]
    GO
    ALTER ROLE [SQLAgentOperatorRole] DROP MEMBER [TestLogin1]
    GO
    USE [msdb]
    GO
    ALTER ROLE [SQLAgentReaderRole] DROP MEMBER [TestLogin1]
    GO
    USE [msdb]
    GO
    ALTER ROLE [SQLAgentUserRole] DROP MEMBER [TestLogin1]
    GO
    use [master]
    GO
    REVOKE ALTER ANY CREDENTIAL TO [TestLogin1] AS [sa]
    GO
    Cheers,
    Vaibhav Chaudhari
    [MCTS],
    [MCP]

  • Set Grant Permission to table in Access Database

    Hello All,
    How to set grant permission in Access 2003 Database. I am using Microsoft ACE OLEDB 12.0 Connection String, Using System.Data.OleDb Component and want to set Grant DELETE, INSERT, PROCEDURE, SELECT, UPDATE ON MSysObjects TO Admin
    Best Regard
    Xan To

    Hello Kevin And Paul
    I have tried what you all say, but I get an error like this
    this my code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Dim Builder As New OleDb.OleDbConnectionStringBuilder
    Try
    With Builder
    .Provider = "Microsoft.ACE.OLEDB.12.0"
    .DataSource = "C:\Users\Xan To\Desktop\Test.mdb"
    End With
    'Using cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Xan To\Desktop\Test.mdb; Jet OLEDB:System Database=system.mdw;")
    Using cn As New OleDb.OleDbConnection
    With cn
    .ConnectionString = Builder.ConnectionString
    End With
    Using cmd As New OleDb.OleDbCommand
    With cmd
    .Connection = cn
    .CommandText = "GRANT SELECT ON TABLE MSysObjects TO Admin"
    End With
    cn.Open()
    cmd.ExecuteNonQuery()
    End Using
    End Using
    Catch ex As Exception
    MessageBox.Show(ex.ToString)
    End Try
    End Sub

  • Error message "CREATE TABLE permission denied in database 'master'"

    I am starting an application and I get the error message above. I do not want to creat tables in the master database - therefore I created my own database and added it to the Connection string:
    DATABASE=TEST
    But still the same message.

    Hi,
    As said you have created the new database and want create a table. Please make sure you are connecting to the right database. If you are unable to get the connection string of the newly created database, please go to the management portal and click
    on the newly created database and click on dashboard to get the connection strings for the database. Then you can add the same information from where you are trying to create table with the database name to proceed further.
    It seems that you are connecting to master instead of connect against your new database that you have created. Once you connect to your database you will need permission to create tables. If you are "dbmanager" role you should not have any problem
    to create it.
    Hope this helps you.
    Girish Prajwal

  • DB Permission: User can drop only their created db's?

    I want to set permission against a user, which can create database and drop on their created databases neither any database. Any idea/suggestion ?

    Well, not every company my afford them to  purchase addition license :-(
    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
    you're right :-)
    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

  • If ur database crash u have only export of database how u create database f

    if ur database crash u have only export of database how u create database from starting with help of export give steps

    What is an "export give steps?"
    If ur's database crashes, how is it u's responsibility to restore it?
    Now, if my database crashes, I just restart it in crash recovery mode and not even worry about the backup or export. It is not needed.

  • CREATE DATABASE permission denied in database 'master'.

    Hi,
    I have tipical situation in my database environment. i have task for deployment few object in Stage environment while running those scripts showing these error message "create database permission denied in database 'master'"
    I have SA permissions in my server and environment is Sql server 2008 r2.
    Please help on this.
    thanks in advance
    Vijay

    If you have SA permissions then you will never get this error.
    What is the login that you used. Confirm if you indeed has SA permissions in the instance that you are trying to execute the script and got this error.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Grant Permission for xp_cmdshell

    Hi! After google the permission grant for xp_cmdshell, I find only 2 roles could successfully
    trigger xp_cmdshell 
    (1) DB user with sysadmin permission.(i.e. this is the super user for SQL Server)
    (2) Windows user.
    (1) and (2) both need to be granted to use xp_cmdshell.
    If above understanding is correct, I have difficulty in granting the permission to C# web
    project.
    My web project triggers SSIS on demand and gets processed results in return.
    The current design is caller (C#) execute stored procedure, then sp uses xp_cmdshell to execute
    dtexec.
    The caller, C#, should have what kind of role to pass the permission check ? 
    For (1), that sounds too dangerous to give him such high privilege, 
    for (2), it's not allowed in client's environment to have windows local user account or service
    account, i.e. every windows user should be a real person and connected to AD.
    How do I grant the permission to my C# web project or is there any better design to trigger
    SSIS in my case ? 
    Need your advice, thank you!

    How do I grant the permission to my C# web project or is there any better design to trigger SSIS in my
    case ? 
    There a couple of other approaches you might consider.  One is to create an on-demand SQL Server Agent job that executes the package, and then use sp_start_job from a user stored procedure to execute the job.  You can use certificates to control
    permissions.  See Erland's artice
    http://www.sommarskog.se/grantperm.html for details on how you can use cross-database certificates for your user database and msdb.
    In SQL 2012 and later, you can use the SSIS catalog procs to run a package without a job.  See
    http://technet.microsoft.com/en-us/library/hh479588.aspx.
    Another approach is the Service Broker External Activator.  See
    http://www.dbdelta.com/service-broker-external-activator-example/ for an example of how to launch an SSIS package using that tool.
    All of the above methods run the SSIS package asynchronously.  I'm not sure how your web application processes the results of the package, or if you may have multiple simultaneous executions of the package.  Those points need to be considered in
    the design.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

Maybe you are looking for