473,387 Members | 1,455 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,387 software developers and data experts.

working with a local db copy

ll
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
Jan 10 '08 #1
1 2398
ll (ba**********@yahoo.com) writes:
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.)
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, es****@sommarskog.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
Jan 10 '08 #2

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

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
3
by: Vigil | last post by:
Hi, I have downloaded the source code and installed everything on http://validator.w3.org/source/. I have the validator 'working' offline with Apache2. I have uploaded a valid XHTML 1 Strict...
2
by: Ahmet | last post by:
Hi; We have one project that has multiple dll dependencies. on one shared folder, we have shared dll's that project needs to load and use on runtime. if I add items to referance list and mark...
6
by: Mark Olbert | last post by:
The doPostBack javascript functioning is not submitting the page when called by linkbuttons (or an autopostback checkbox, for that matter). I'm aware of a problem with Netscape browsers and the...
1
by: tony | last post by:
Hello! I use visual studio 2003 and here you can set true or false on a identifier called copy local on each reference. The description on this copy local says "Indicates whether the references...
7
by: pauldepstein | last post by:
#include <iostream> using namespace std; double & GetWeeklyHours() { double h = 46.50; double &hours = h; return hours; }...
4
by: maheswaran | last post by:
Hi, I copy the file from local to server using "Copy" function. see Copy($localfile,"Document/01/$file) The number 01 is incresing dynamically according to number of files in a folder....
2
by: ahgan | last post by:
Hi I'm new here. I'm trying to put some code to copy files with specific patterns/keywords from a target location. I encountered a pattern matching (regexp) issue where the filename didn't...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.