.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Use of Default Database

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :Sql Server

Hi All,


Recently we have implement the security health check for all SQL server. In which one of the point they mentioned default database should not be Master.

My question is if i change the default database as msdn or other user database for all the logins including SA. Is there is any impact or any other issue is there?

Regards, RM Thirunavukkarasu MCP, MCITP, ITIL V3 | http://thiruna.blog.com

View Complete Post

More Related Resource Links

Why is it that this code updates my sql database with the default EditBox text?

Any help is appreciated. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using MySql.Data.MySqlClient; public partial class _Default : System.Web.UI.Page { TextBox EditBox = new TextBox(); TableRow[] NewRows = { new TableRow(), new TableRow() }; TableCell[] NewCells = { new TableCell(), new TableCell() }; string ID; protected void Page_Init(object sender, EventArgs e) { } protected void Page_Load(object sender, EventArgs e) { var Connection = new MySqlConnection("Server=localhost;Database=site;Username=root;Password=root"); var Command = new MySqlCommand("select * from news", Connection); Connection.Open(); var Reader = Command.ExecuteReader(); while (Reader.Read()) { ID = Reader.GetString("ID"); string Title = Reader.GetString("Title"); string Text = Reader.GetString("Text"); foreach (TableRow Row in NewRows) { NewsTable.Rows.Add(Row); } NewCells[0].Text = Title; NewCells[1].Text = Text; NewCells[0].Font.Bold = true; NewCells[0].Font.Underline = true; NewCells[0].Font.Size = Fon

how to display matrix report with default zero when we are not having data related to it in database

Hi, I am having a matrix report in SSRS 2005 which is parameterized.When I select parameter which is having related data in the database report is working well.But When I select a parameter for which data is not present in database at that particular time.I donot see the matrix on report .So can any one suggest me how to show the matrix report with zeros in data region when user select that parameter   Thanks in advance.

ASPNetSQLProvider - Changing it from the default to a custom SQL Database




I am new to ASP.NET and need some help.


What I am trying to do is to create a login for a new site that I am developing, and I need the users etc to be contained within the SQLEXPRESS database that I am using.

Can someone please help me to work out how to point the default ASPNETSQLProvider to my SQL database and not the default APP_Data one?

I am using Visual Studio 2008 and SQLExpress 2005.

Many thanks,



Website without any default membership Database. Is it possible?


I am in the initial stage of implementing a new webstie, which will use only twitter and facebook to login and use. So my approach is not use any Default memberhip database, just simple store the user data in my created "membership" database. I will set cookies and use sessions to restrict and grant access to various parts of the sites. So for example, the user creates an account and I set a cookie allowing him or her to traverse the site. And on each page request from the client browser check to see if my website cookie is there in the browser and if it has expired or not. Is this approach veasible? Thanks

Linked Server with SQLNCLI and a default database.


I have a linked server from one 2005 server (server A) to another 2005 server (server B). The linked server is created like this:


EXEC sp_addlinkedserver

@server = N'TEST',



creating profile using an existing database raither than default database of ASPNETDB.MDF


Alternatively, you could create your own custom Profile provider that operates against existing database tables .

Please, i want u to help me out if u have an idea where i can get steps by steps to carry out the above operation.

i know there are various options in creating profile , particularlly the use of web. configuration, the default ASPNETDB,  and XML files, BUT i wish to use an existing database which i prefer.

Change the default users for a new database?

Is there any way to customise the default users that have access to a newly created database? I have an Active Directory group that has been granted logon rights to the SQL server, but I need it to have read/write access to any new databases that are created on the server. I don't want to use the Mgmt Studio to grant the permissions. This is because we have an app that creates the databases, but it doesn't set the security. I want an easy way for the security to be granted.

ODBC: My Database missing in list of default databases


Hello everybody

I have the following problem:

When creating a new ODBC data source to an SQL Server 2k5 I want to change the default database from 'master' to my database 'addresses'.

However my database 'addresses' doesn't appear in the drop down list.

I'm conneting with the 'sa' account.

I've activated all protocols in the SQL Server Configuration Manager.

What shall I do?


Any help is greatly appreciated.



Consistently restoring database files to default database file paths


Dear All,

I have a customer who is trying to restore their own customer's databases, and have the restored mdf and ldf files go to the respective default data and log file locations for that SQL instance; eg c:\sql. What they are finding is that this works for most database restores, and the mdf files and ldf files will be automatically created in the c:\sql directory; however certain databases will try and recreate under the SQL install default directory of eg: c:\program files\Microsoft SQL Server\MSSQL.1\MSSQL\data. This is a problem as they want the restore to be easy for their support guys to manage, and they are finding that sometimes databases are created in the wrong location

The only common themes here are that this is occurring on SQL Server 2005, and not 2008; and that it is the same databases everytime. They are also using the SQL Server Enterprise Manager GUI to do the restores, rather than command line.

Although I haven't ever studied this in great detail before, what I have always found is that a database which was maybe hosted on d:\SQLdata on one server will try and restore to d:\SQLdata on a second server even if the directory in question does not exist.

Can anybody shed any light on this? I am having trouble searching for solutions as the terms I need to search for give me instructional pages rather than problem posting

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

Publishing SQL Server Database using Publishing Wizard : Tips & Tricks

We can use SQL Server Publishing Wizard to deploy our local Database to remote hosting server/production server.This feature is available in SQL Server 2008/VWD 2008.

Below is the complete step by step guide of this process.

Adding Rows in GridView without using a Database

This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

Default ASP.NET Architecture

In providing an architectural approach, some assumptions are made concerning the project goals. These assumptions should be used as a litmus test to determine if the described architecture may be an appropriate fit for your ASP.NET application.

ASP.NET Database Tutorial

This tutorial will show you how to display data using the .NET GridView Control, ASP.NET 2.0 and VB.NET

The GridView control is a powerful tool and is simple to implement.

First, you will need to import the System.Data.SqlClient namespace.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend