473,388 Members | 1,256 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,388 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 1093
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.