Is it possible to create a new table in the master database with SSMS ?

Hello ,
I have problems with this thread :
http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/5153c43b-7844-41c4-a414-d14730abe435/
If no user database has been created , in SSMS , we can see only the 5 system databases ( master, msdb , tempdb... ).
Logically , the user should connect automatically on the Master database ( if the user is the same as this used to install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and especially dbcreator ).
Is it true that it is impossible to create a new table on the master database ?
I have done many researches about this possibility , all I have found is the advice : don't touch to the master database. This database is used to store critical information about the instance and its user databases. Even in the last book of Kalen Delaney
about SQL Server 2012 Internals , I have found nothing clear about the creation of tables in this database ( and what about the other system databases ? I am excluding tempdb ).
If someone has an idea about this thread and my questions , I would be thankful for a reply on this thread or on the related thread in the SQL Server Express Forum ( with my poor written English , I am not sure to have poster in a correct and understandable
way ).
If you think that this thread is not in the good forum , a moderator of this forum can move this related thread ( I have not done the move as I am not sure which is the good forum Database Engine or Transact-SQL ... )
Thanks beforehand and have a nice day.
Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

>>Logically , the user should connect automatically on the Master database ( if the user is the same as this used
to >>install a new SQL Server instance, this user should be sysadmin that's to say he/she has all possible permissions and >>especially dbcreator ).
If you add the current user during the installation you can have it as system admin , or you can add him/her later on
in SQL Server. BTW regarding dbcreator I have wrote some blog , need to read... :-)
http://sqlblog.com/blogs/uri_dimant/archive/2010/09/02/be-careful-to-grant-dbcreator-server-role-to-the-user.aspx
You can (if you have needed permissions) to create objects in master database, usually I create objects for instance maintenance (like rebuild indexes...) 
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

Similar Messages

  • How can I create a new table in a MySQL database in MVC 5

    I have an MVC 5 app, which uses MySQL hosted in Azure as a data source. The point is that inside the database, I want to create a new table called "request". I have already activated migrations for my database in code. I also have the following
    code in my app.
    Request.cs: (inside Models folder)
    public class Request
    public int RequestID { get; set; }
    [Required]
    [Display(Name = "Request type")]
    public string RequestType { get; set; }
    Test.cshtml:
    @model Workfly.Models.Request
    ViewBag.Title = "Test";
    <h2>@ViewBag.Title.</h2>
    <h3>@ViewBag.Message</h3>
    @using (Html.BeginForm("SaveAndShare", "Home", FormMethod.Post, new { enctype = "multipart/form-data" }))
    @Html.AntiForgeryToken()
    <h4>Create a new request.</h4>
    <hr />
    @Html.ValidationSummary("", new { @class = "text-danger" })
    <div class="form-group">
    @Html.LabelFor(m => m.RequestType, new { @class = "col-md-2 control-label" })
    <div class="col-md-10">
    @Html.TextBoxFor(m => m.RequestType, new { @class = "form-control", @id = "keywords-manual" })
    </div>
    </div>
    <div class="form-group">
    <div class="col-md-offset-2 col-md-10">
    <input type="submit" class="btn btn-default" value="Submit!" />
    </div>
    </div>
    @section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    HomeController.cs:
    [HttpPost]
    public ActionResult SaveAndShare(Request request)
    if (ModelState.IsValid)
    var req = new Request { RequestType = request.RequestType };
    return RedirectToAction("Share");
    The point is that, I want the user to fill the form inside the Test view and click submit, and when the submit is clicked, I want a new entry in the new table to be created. But first of course I need to create the table. Should I create it using SQL query
    through MySQL workbench? If yes, then how can I connect the new table with my code? I guess I need some DB context but don't know how to do it. If someone can post some code example, I would be glad.
    UPDATE:
    I created a new class inside the Models folder and named it RequestContext.cs, and its contents can be found below:
    public class RequestContext : DbContext
    public DbSet<Request> Requests { get; set; }
    Then, I did "Add-Migration Request", and "Update-Database" commands, but still nothing. Please also note that I have a MySqlInitializer class, which looks something like this:
    public class MySqlInitializer : IDatabaseInitializer<ApplicationDbContext>
    public void InitializeDatabase(ApplicationDbContext context)
    if (!context.Database.Exists())
    // if database did not exist before - create it
    context.Database.Create();
    else
    // query to check if MigrationHistory table is present in the database
    var migrationHistoryTableExists = ((IObjectContextAdapter)context).ObjectContext.ExecuteStoreQuery<int>(
    string.Format(
    "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = '{0}' AND table_name = '__MigrationHistory'",
    // if MigrationHistory table is not there (which is the case first time we run) - create it
    if (migrationHistoryTableExists.FirstOrDefault() == 0)
    context.Database.Delete();
    context.Database.Create();

    Hello Toni,
    Thanks for posting here.
    Please refer the below mentioned links:
    http://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-deploy-aspnet-mvc-app-membership-oauth-sql-database/
    http://social.msdn.microsoft.com/Forums/en-US/3a3584c4-f45f-4b00-b676-8d2e0f476026/tutorial-problem-deploy-a-secure-aspnet-mvc-5-app-with-membership-oauth-and-sql-database-to-a?forum=windowsazurewebsitespreview
    I hope that helps.
    Best Regards,
    Sadiqh Ahmed

  • Creating a new user in the same database

    I have a user in my database who owns all the objects of application.This user has sysdba privilege.
    I want to create a user(schema) in the same database which should also contain exactly the same objects.
    But at the same time the newly created user should not have sysdba privilege.
    What would be the best possible way to do this?
    Can I use expdp/impdp?If yes which options should I use for expdp and impdp?

    Hello,
    Can I use expdp/impdp?If yes which options should I use for expdp and impdp?After exporting the source Schema (with Datapump), you may create a User on the Database with specific Tablespace and Roles / Privileges (without the DBA role).
    Then, with the Parameter REMAP_SCHEMA=source_schema:target_schema, you may Import with Datapump the exported Objects into the User/Schema newly created:
    http://download.oracle.com/docs/cd/E11882_01/server.112/e16536/dp_import.htm#SUTIL927
    Hope this help.
    Best regards,
    Jean-Valentin

  • Creating new tables in Logical Standby database

    Hi
    I have a requirement to create new tables in logical standby database. These tables will not be present on primary database. Is it possible to do this ?
    I have a new schema already created which has the privilege to CREATE new table.
    I have stopped the logical standby apply.
    When I am now trying to create a new table but it is failing with error : insufficient privileges.
    When I am trying to run below statement on new schema it is also failing with error of insufficient privileges.
    alter session disable dataguard;
    Please help.

    user8819121 wrote:
    Thanks Mahir,
    I was able to create the table after logging in as sysdba.
    But I need my user on that table to execute DML statements. My user has privileges to insert,delete and update any table.
    I tried the following statements to disable the guard but it is sill not working
    ALTER DATABASE GUARD STANDBY.
    Do I need to skip the tables created using dbms_logstdby package to not making it part of SQL Apply ? I guess not since the table is not in primary database.
    Amit
    You can skip only on primary, your created schema on Standby is not in primary.
    Then you must change Status of data guard to NONE. NONE is means is not any security on your data.
    In Guard status NONE can change all schema data.
    Please check link: http://docs.oracle.com/cd/E11882_01/server.112/e10700/manage_ls.htm#CHDGFGHG
    Following tests on user created before guard status is change from ALL to STANDBY.
    C:\Users\Administrator>sqlplus / as sysdba
    SQL> conn test/test
    Connected.
    SQL> select table_name from user_tables;
    TABLE_NAME
    T
    SQL> insert into t values(22);
    insert into t values(22)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    ALL
    SQL> alter  database guard standby;
    Database altered.
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    insert into t values(1)
    ERROR at line 1:
    ORA-16224: Database Guard is enabled
    SQL> conn / as sysdba
    Connected.
    SQL> select guard_Status from  v$database;
    GUARD_S
    STANDBY
    SQL> alter  database guard none;
    Database altered.
    SQL> select guard_Status from  v$database;
    GUARD_S
    NONE
    SQL> conn test/test
    Connected.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.And Now I want share with you new tests :)
    Now user creating when after guard status change
    SQL> drop  user test cascade;
    User dropped.
    SQL> select guard_status from v$database;
    GUARD_S
    STANDBY
    SQL> create user test identified by test;
    User created.
    SQL> grant create session,  resource, create table to test;
    Grant succeeded.
    SQL> conn test/test
    Connected.
    SQL> create table t (n number);
    Table created.
    SQL> insert into t values(1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>It means when guard status is ALL then all of user created guarding.
    When you changed status to STANDBY then Logical Standby guard only primary schema and created schema before change.
    NONE is not guard any schema. it means you can delete standby schema data too.
    Regards
    Mahir M. Quluzade
    Edited by: Mahir M. Quluzade on Apr 19, 2013 4:07 PM

  • I'm unable to create a new Table on SQL Azure.

    I'm trying to create a new table in my custom database. But i'm getting this error message:
    'Filegroup reference and partitioning scheme' is not supported in this version of SQL Server.'
    Here is the sample create schema:
    CREATE TABLE dbo.[Contact](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [FirstName] [nvarchar](250) NULL,
    [LastName] [nvarchar](250) NULL,
    [InsertDateTime] [datetime] NULL,
    [UpdateDateTime] [datetime] NULL,
    [PhoneNo1] [nvarchar](50) NULL,
    [CellNo1] [nvarchar](50) NULL,
    [IsActive] [bit] NOT NULL,
    CONSTRAINT [PK_Contact] PRIMARY KEY CLUSTERED
    [ID] ASC
    )WITH (STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    BT

    In addition to Neil's comment, I would add that one of the major strengths of SQL Azure is its simplicity from an administrative standpoint while providing as much parity as possible for the relational and programming stack.  In somes
    cases, less is more. SQL Azure is an example.  By having a simpler system we are able to get certain capabilities not available on premise. Take a look at the CREATE DATABASE XYZ AS COPY OF operation for example, you do not have to worry about finding
    a server with enough space; you do not have to worry about moving files around a network or creating shares between machines; and best of all, you do not have to any kind or provisioning of cleanup as a result of cloning a database. The upcoming Data Federation
    feature is another example of what you can achieve when you are free of underlying configuration details.
    That's not to say SQL Azure wouldn't benefit from some capabilties of the SQL Server platform (for example TDE); but personally I am happy that two years later we still don't have to worry about many of those low-level configuration details.
    Herve Roggero, Blue Syntax MVP SQL Azure Co-Author: Pro SQL Azure

  • Create a new table maintenable by user using SM30 transaction

    Hi,
    is it possible to create a new table maintenable by user using sm30 transaction with class C without opening the customizing each time there is a modification to do.
    thank you.

    Hi,
    u told u alredy create table and corresponding view. Now u can follw below this process.........
    go to se11.
    go to menu Utilities ->table maint. generator.
    after that u will go to menu -> Environment -> maintence Object -> Generate.
    then u select category -> CUSY
    Transport -> 2 automatic transport
    Adjustment-> automatically adjustment
    then save it and create T. code .
    I think your problem will be solve.
    Regards,
    Tarapada D.

  • Creating a new table, to replace an old one

    Hi experts;
    I'm looking for an advice about what I'm going to do.
    This is the situation;
    I got a production table with more than 1,000,000,000 of records.
    the queries to this table are too slow, and I decided to create a new table, to replace this one.
    But my doubts are:
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    Thanks for your comments.
    Al

    >
    How can I create a new table including the same structure as the old one, and with some data.
    I got this query:
    Create new_table as select * from old_table
    where trans_year = '2012';
    I know with this I got the structure, but what about indexes?
    My other doubt is, to replace the old one, just I drop it, and rename the new one?
    This table belong to an oracle 9i DB.
    >
    You could export the table metadata and then import it as a renamed table. That would keep the indexes, triggers, constraints.
    But for one table it may be easier to just recreate the indexes and other objects.
    For the query you may want to disable logging of the INSERT.
    Create table new_table NOLOGGING as select * from old_table where trans_year = '2012';
    -- set the table back to logging mode
    ALTER table new_table LOGGING;Then you can drop the old table (if you already have a backup of it) and rename the new one to the old name.
    The create will perform much better with NOLOGGING but because it is not logged you will not be able to recover the data from the log files.
    So you should take a backup afterward.

  • How do I create a new schedule via the Metadata Navigator Web interface?

    Hi All,
    Just wondering if it is possible to create a new schedule via the Metadata Navigator Web interface? What security rights do you need? Is this even possible? I have logged in as SUPERVISOR and It still looks like I can't do it.
    Thanks,
    Erik

    You can't. To create a new schedule, use the Operator or Designer tool.
    Craig

  • Can you create a new table from an Excel spreadsheet

    It would be GREAT if there was a way to use SQL Developer to take an Excel Spreadsheet, and create a new table based on it - does anyone know if that's possible?
    Thanks,
    Brad Blake

    Excellent - yes, from the thread on the SQLDeveloper website, it looks like you will be able to create a new table from an .xls file - very cool!
    Does anyone know when version 1.1 is supposed to be coming out?
    --Brad                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to find out the user who has created  a new field in the custom table.

    How to find out the user details who has created  a new field in the custom table.
    Thanks,
    Joan

    Hi Jesudasan ,
    You can know the user details with version management.Please find the
    below procedure to know.
    Go to table->Utilities tab->version->Version management->Compare the previous one .
    Hope this solves the issue,Let me know if you have any issues.
    Thanks,
    Rajani

  • How can I create a new table from a filed cell?

    Every time that I fill a row of cells I want to creat a new table with the content of that cells.
    How can I do it?
    Donw here it´s the example.
    From the top table, I want to fill these rows, and everytime that it´s done, I want that a new table apears like the cells under.
    There is any Way to do it?
    In the Spanish version of Number I found in the references formulas, one formula called "DIRECTION" that describes to do this.
    But I found no way to do it.
    The above formula it´s this:
    =DIRECCION(row; collumn; type of direction; stile of direction; table name)
    Anyone can help me?
    I really need this solution.

    Otto,
    Based on the syntax you quoted for that function, the english equivalent is "Address". It doesn't create a Table, but rather it creates an Address that references a Cell, in the form of a String. The common, and only, use that I am aware of for Address is to use it as the parameter for INDIRECT. For example: INDIRECT(ADDRESS)) will produce a reference to a table cell, but it will not produce a table.
    Jerry

  • Is it possible to create a new tab in 'Default settings for items' option?

    Hi everybody
    I am Raghu working in EBP2.0 & I have come across a difficlty and that is of creating a new tab and also the fields 'GL a/c', 'cost centre' or 'internal order' in this new tab.
    First of all please let me know whether is it possible to create a new tab for these fields.
    The purpose of this new tab is to default the cost centre and GL account with reference to shopping cart.
    As per current scenario, user has to enter the cost centre & the GL code as many times as the number of items in a shopping cart. I mean, if you have 10 items in your shopping cart then 10 times user has to input the cost centre & GL account. To avoid this we are required to add new tab so that per shopping cart we can enter the GL account & cost centre only once.
    Your immediate response would be very much apprecited.
    Regards
    Raghu

    hi Ram & Sreenivas
    Thanks for your immediate response.
    Ram, we can default GL a/c & cost centre in org structure since client wants to us to keep the option of entering these for every shopping cart.
    Sreenivas, I checked the 'copy to clipboard' option & its not there in EBP2 and I feel what you meant as cost centre tab is account assignment tab.
    Let me explain you more clearly about this requirement.
    Current Scenario
    1.Say a user has added 5 items to his SC.
    2.User has to enter cost centre & GL code 5 times & then he can order
    Required scenrio
    1.Say a user has added 5 items to his SC.
    2.As per the proposed functionality, user will click on 'Default settings for items' button. Three tabs will appear-->Basic data, Internal note & Delivery Address.
    We have to provide a new tab here where in user will default his GL & cost centre for this shopping cart & then order. This will help user to avoid entering GL & cost centre 5 times.
    For some reasons our client is not interested in defaulting this data.
    Please help in this regard if time permits.
    Thanks
    Raghu

  • I don't have the option to create a new table in my database

    Hi, I have SQL 2014, for some reason, a few weeks ago I was able to create a new table for my databases, now, I don't have the option to do so, all I get when I right click on tables is "Tables..." instead of "New Table", when I select
    "Tables..." it allows me to write my codes but it doesn't save except in a text files witch doesn't want to open when I want to resume my work.
    Is there any option in SQL to activate the "New Table" by right clicking on Tables? I have all the rights and permissions available to my use as it's my computer and my own server. 
    To fix the issue I tried
    -Re-installing SQL
    -Changed for 4 different versions
    -Allowing more than necessary permissions 
    -Making it public to use (it's only to test it, anyway, I'm in the learning phase)
    Any kind of help or advice will be welcome and much appreciated.
    Thank you!

    I don't know the reason why you are experiencing this, so what I am describing below are just some steps that you can take to diagnose the problem if it is related to a permissions issue.
    1. If you are not already on the computer where SQL Server is installed, login on that box and launch SQL Server Management Studio and run it as Administrator.
    2. Connect to the Server and open up the object explorer and expand the Security node that is directly under the Sever tab.
    3. Under logins, find your login, right-click properties and see what kind of server level permissions you have, and which databases you are mapped to and what kind of permissions you have on those.
    It may just be that this is not related to permissions at all, but I can't think of what that would be. To test whether it is a SSMS GUI problem or not, open up a query window and select a database on which you think you have permissions to create tables.
    Then create a test table using T-SQL, for example:
    create table dbo.MyTestTable( col1 int);

  • Is it possible to create a new iCloud account and permanently transfer existing store purchases to it?

    Is it possible to create a new iCloud account and permanently transfer existing store purchases to it?

    Thank you for taking the time to try to answer my question. Let me phrase it slightly differently...
    I have a very old appleid that I've used for store purchases. I had a MobileMe account that was upgraded to iCloud. I'd like to merge the account data. I've been hoping Apple would come up with a solution to this, but they haven't yet.
    So, I'm wondering if I should make a new account of some sort and try to transfer data to it from both of the old accounts. It sounds like that can't work.
    I suppose then that the only thing to do is manually transfer all the information from the old MobileMe account to the primary appleid (which is some sort of iCloud + Store combination, no?). That might not be that hard to do, but it is somewhat high risk.

  • New field catalog VOLEH does not display while creating a new table

    Dear Gurus,
    I added new field as VOLEH in field catalog. However while I am creating a new table, new field (VOLEH) does not showed in field catalog...
    How can I fix this error?
    Kind Regards,

    HI
    Check once again in IMG>SD>Basic func>Pricing >Pricing control>define condition table>conditions : allowed fields> go to new entries then press F4
    check here newly created field is there or not
    (or) when creation of condition table check properly next page button in menu bar
    still if its not found
    Note 21040 - Allowed Fields not appearing for condition table
    or check this link
    http://www.sap-basis-abap.com/sd/how-to-add-new-fields-to-field-catalog.htm
    Regards,
    Krishna.

Maybe you are looking for

  • Not able to clear GR/IR accont

    Hi, We are executing transaction code F.13 to clear GR/IR account. However, still there are some documents appearing in the account as uncleared. For all the documents unclaered, two accounts are involved: one for GR and other one for IR. We tried tr

  • All of a sudden I can't use my iTouch on iTunes 9???

    Aloha; Up until a few days ago plugging my iTouch into my G5 tower (OS 10.4.11) worked fine. It showed up on iTunes and I was able to add the latest Rush program for listening at the gym. Now when I plug in the iTouch I get a splash panel saying I ne

  • Fixed number of detail rows

    Hi all, I have "shipment form" that I need to replicate in reporting services - see image. FYI, there is more header info below the "shipment details" section... My issue, is fixing the number of detail lines, my data can have between 1 and 5 detail

  • Using ps help

    Wy can't I use the refining edges tool on my ps touch

  • Report addition via PFCG - erraneous

    Hi All, I have a issue.The reports added to a role thr PFCG is not visible when the role is opened in Bex. The table AGR_HIER is not updating the unique ID of the query when added via PFCG and hence this issue. Is there some settings that we need to