dbTalk Databases Forums  

working with a local db copy

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss working with a local db copy in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ll
 
Posts: n/a

Default working with a local db copy - 01-10-2008 , 01:48 PM






Hi,
I have copied a MS SQL database to my local machine and am testing it
with ASP pages, locally, on IIS. I have a db connect page that keeps
the current connections for the live database. My question is, as the
local db is named 'local,' is there another name I need to give it and
thus call from the connection page?
Also, when copying a db, are the permissions (username and pass)
copied over with it?

Thanks,
Louis

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: working with a local db copy - 01-10-2008 , 04:26 PM






ll (barn104_1999 (AT) yahoo (DOT) com) writes:
Quote:
I have copied a MS SQL database to my local machine and am testing it
with ASP pages, locally, on IIS. I have a db connect page that keeps
the current connections for the live database. My question is, as the
local db is named 'local,' is there another name I need to give it and
thus call from the connection page?
Since I don't at all how your connection page looks like that is a little
hard to tell. But if the database is called local, your connection
string would look something like:

Provider=SQLNCLI;Server=(local);Database=local;
UserID=xxx;Password=yyy

It seems though, that it would be simpler to have the same name as the
live database (which I assume is on another server). I guess that you
still need to change the Server part, since I assume that in the live
system, IIS runs on a different machine from SQL Server. (Well, it
should do.)

Quote:
Also, when copying a db, are the permissions (username and pass)
copied over with it?
The database as such does not include any logins and password, they
are stored in the master database. The server logins map to users in
your database, and the database users are copied with the database
(since they are part of it). However, if you have login X and user
X on the source system, and also the login X on the local system,
user X will typically not map to login X after the copy, because the
SID are different. This is something you need to clean up after the
copy.

Then aagain, some schemes for copying will permit you to copy logins
as well. But I don't know how you copied the database, so I can't
say whether your logins were copied or not.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.