473,583 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2414
ll (ba**********@y ahoo.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=SQLNCL I;Server=(local );Database=loca l;
UserID=xxx;Pass word=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****@sommarsk og.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
3632
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 my settings if my profile became tampered with or corrupt. Is there any sample code available out there? -Robert
3
5110
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 file to the online validator and it passes with flying colours. When I pass it to my offline version, it says, "This page is not Valid XHTML 1.0...
2
1294
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 as don't copy local, when project starts running in dev env. project cant see this dll's that is needed.
6
14438
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 postback code, but I have a workaround for that installed (and it looks like the code generated by ASP.NET when it renders the page does the same...
1
5438
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 will be copied to the output directory." I have a solution file with several project that is both class library dll and user control dll.
7
6660
by: pauldepstein | last post by:
#include <iostream> using namespace std; double & GetWeeklyHours() { double h = 46.50; double &hours = h; return hours; } //---------------------------------------------------------------------------
4
4725
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. If folder "01" have 9 files than new local files is copied in to directory 10. The directory 10 is created while use the copy function ...
2
1543
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 contain the keyword but got returned as matching. The script is looking for a list of PROD in the setup file and dynamically changing the keyword by...
6
7586
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 work. Please review my work and let me know if you see that one little thing that is throwing me for a loop. HTTPD.CONF # # This is the main...
0
7888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7811
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8159
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8185
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6571
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5689
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3811
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1416
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.