PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.db.ms-sqlserver > working with a local db copy
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
working with a local db copy

Réponse
 
LinkBack Outils de la discussion
Vieux 10/01/2008, 20h48   #1
ll
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut working with a local db copy

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
  Réponse avec citation
Vieux 10/01/2008, 23h26   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: working with a local db copy

ll (barn104_1999@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, esquel@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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h35.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09518 seconds with 10 queries