473,242 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,242 software developers and data experts.

SQL Server 2005

Hello!

SqlConnection myConnection = new
SqlConnection(@"Server=(local)\sqlexpress;Integrat ed Security=True;" +
"Database=northwind");

When I have this Integrated Security=True does this mean that I will
automatically have access to this database norhwind
when I have logged into windows ?

My next question this entry sqlexpress is the connection string is the
instance name for the sql server according to a book a reading.
What does this actually mean because I have never heard about instance name
for a Sql Server ?

//Tony
Aug 19 '08 #1
5 1090
When I have this Integrated Security=True does this mean that I will
automatically have access to this database norhwind
when I have logged into windows ?
Well, it will try to connect to the database with the executing user's
credentials, if that is the question. So "yes", /if/ you have a login
to that SQL Server associated with your windows account.
What does this actually mean because I have never heard about instance name
for a Sql Server ?
A named instance is basically a way to run multiple servers (each with
their own databases and configuration) on a single host while keeping
more isolation than just databases (on a single server instance) would
allow. Under the bonnet I believe each maps to a TCP port (or ports),
but using a name is more convenient in many cases (but there are some
tricks if you are coming through a firewall to a database cluster).
The express editions install themselves as .\sqlexpress.

Marc
Aug 19 '08 #2
"Tony Johansson" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
SqlConnection myConnection = new
SqlConnection(@"Server=(local)\sqlexpress;Integrat ed Security=True;" +
"Database=northwind");

When I have this Integrated Security=True does this mean that I will
automatically have access to this database norhwind
when I have logged into windows ?
Not necessarily. It means that your Windows credentials will be passed
to Sql Server. This will only grant you access to the database if Sql Server
is configured to accept those credentials. A default install of Sql Server
maps the Administrators group to the sysadmin role in Sql Server, so every
Windows Administrator will be granted access to all databases in Sql Server.
Plain users will not be able to acess the database unless you add their
credentials into Sql Server.

My next question this entry sqlexpress is the connection string is the
instance name for the sql server according to a book a reading.
What does this actually mean because I have never heard about instance
name
for a Sql Server ?
During installation of Sql Server you are prompted to select either a
"default instance" (you can only have one default instance) or a "named
instance", which allows you to install several copies of Sql Server in the
same machine if you provide different names for those instances. The Express
version of Sql Server that is provided with Visual Studio defaults to the
instance name "SqlExpress" during installation.
Aug 19 '08 #3
Hello!

What is the reason for having several copies of sql Server in the same
mashin ?
The only reason I can imagine is when having different versions ?

Do you agree with me ?

//Tony
"Alberto Poblacion" <ea******************************@poblacion.orgskr ev i
meddelandet news:O0**************@TK2MSFTNGP04.phx.gbl...
"Tony Johansson" <jo*****************@telia.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
SqlConnection myConnection = new
SqlConnection(@"Server=(local)\sqlexpress;Integrat ed Security=True;" +
"Database=northwind");

When I have this Integrated Security=True does this mean that I will
automatically have access to this database norhwind
when I have logged into windows ?

Not necessarily. It means that your Windows credentials will be passed
to Sql Server. This will only grant you access to the database if Sql
Server
is configured to accept those credentials. A default install of Sql Server
maps the Administrators group to the sysadmin role in Sql Server, so every
Windows Administrator will be granted access to all databases in Sql
Server.
Plain users will not be able to acess the database unless you add their
credentials into Sql Server.

My next question this entry sqlexpress is the connection string is the
instance name for the sql server according to a book a reading.
What does this actually mean because I have never heard about instance
name
for a Sql Server ?

During installation of Sql Server you are prompted to select either a
"default instance" (you can only have one default instance) or a "named
instance", which allows you to install several copies of Sql Server in the
same machine if you provide different names for those instances. The
Express
version of Sql Server that is provided with Visual Studio defaults to the
instance name "SqlExpress" during installation.


Aug 19 '08 #4
On Aug 19, 11:37*am, "Tony Johansson" <johansson.anders...@telia.com>
wrote:
Hello!

What is the reason for having several copies of sql Server in the same
mashin ?
The only reason I can imagine is when having different versions ?
Different instances can have very different configurations (e.g., to
name some of the more obvious, one may have TCP/IP enabled, another
may have it disabled). Also, since they are different processes, one
crashing for whatever reason would not disturb the rest.
Aug 19 '08 #5
Other scenarios:

You can use a single host to co-host several logical servers that (in
production) would have isolated hardware - in particular this lets me
have an isolated dev and QA setup on the same machine, i.e.

..\dev (databases: foo, bar)
..\test (databases: foo, bar)

(without having the overhead of lots of VM instances etc, which might
be another option - but with different OS licencing).

This might also be a sensible approach if you either want to replace
several old servers with a single big grunty box (comms room space/
power is expensive), or if you want to host things on a single machine
today, with a view to separating them later as usage increases
(without having to worry about any accidental cross-database ties).

Security would be another issue, as would redundancy; if I recall,
some of the failover-cluster options in SQL 2005/2008 mandate named
instances.

Marc
Aug 19 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AlessanBar | last post by:
Hello Friends !! I have a strange problem, and I need to know what would be the source of this. I have a laptop computer with the following configuration: Pentium III Brand : Toshiba Speed :...
17
by: Danieltbt05 | last post by:
just installed SQL server 2000 and using my client , i can't locate the server. I used SQL query analyzer to search but no servers were found. Error message is as below Server : Msg17,level...
1
by: Peter | last post by:
I've purchased VS.NET 2005 Standard and have tried to install SQL Server 2005 Express, but get the following error in the error log. Please could someone help me.... Microsoft SQL Server 2005...
16
by: Jeremy S. | last post by:
I'm about to install VS.NET 2005 and SQL Server 2005 on a new/clean development machine (XP Pro/SP2 etc). Is the order of installation important (i.e., which product should I install first)? ...
16
by: Jeremy S. | last post by:
I'm about to install VS.NET 2005 and SQL Server 2005 on a new/clean development machine (XP Pro/SP2 etc). Is the order of installation important (i.e., which product should I install first)? ...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.