Che cos'è un'istanza di SQL Server?


14

Quando installo SQL Server 2008 Express mi viene richiesto di creare un'istanza e, in caso contrario, si interrompe. Poi vedo quelle informazioni in una voce in Gestione configurazione SQL Server su SQL Server Services. Che cos'è un'istanza di SQL Server?

Risposte:


22

Un'istanza di SQL Server è un server SQL completo e puoi installare molte istanze su una macchina ma puoi avere solo 1 istanza predefinita.

Un'istanza di SQL Server ha una propria copia dei file del server, dei database e delle credenziali di sicurezza.

Questo URL può aiutarti


È possibile eseguire più di un'istanza contemporaneamente?
pupeno,

1
Sì, è possibile eseguire più di 1 istanza alla volta. Hai solo bisogno di un nome univoco per ogni istanza che installi (così come il percorso del filesystem)
Wayne,

4
Puoi anche avere un'istanza come SQL 2000 e un'altra 2005; il più grande gotcha con più istanze è la gestione della memoria, se si utilizzano le impostazioni predefinite, tutte le istanze proveranno a rivendicare tutta la memoria, è meglio limitare esplicitamente la memoria massima in ogni istanza.
SqlACID,

5
SQL 2000 supporta 16 istanze. SQL 2005 e SQL 2008 supportano fino a 50 istanze per computer. È possibile eseguire SQL 2000 e SQL 2005 sullo stesso computer o SQL 2005 e SQL 2008 sullo stesso computer. Tuttavia, non è possibile eseguire SQL 2000 e SQL 2008 sullo stesso computer.
mrdenny,

1
Tenere presente che non tutti i servizi di SQL Server sono "a grado di istanza" o multiistanza. Integration Services, ad esempio, viene installato una sola volta per host Windows. Queste istanze includono istanze Express che potrebbero essere installate dalle applicazioni.
Steve Jones,

2

ISTANZA DEL SERVER SQL Un'istanza del Motore di database è una copia dell'eseguibile sqlservr.exe che viene eseguito come servizio del sistema operativo. Ogni istanza gestisce diversi database di sistema e uno o più database utente. Ogni computer può eseguire più istanze del Motore di database indipendentemente da altre istanze.

SQL Server è composto da tre parti principali: 1. Un motore, ovvero il software avviato da alcuni servizi di Windows che esegue ricerche, ordinamenti e altre azioni; 2. Meta-dati come i database di sistema master e msdb; 3. Database utenti in cui sono archiviati i dati.

The master database contains the information that the engine reads when it starts up. It includes such things as security settings, file locations, sort orders, and database locations. The msdb database contains the information used by the SQL Server Agent program and information about maintenance plans. Yet another system database, called model, is the "template" from which other databases are created. Finally, the tempdb database is the "scratch" area that the engine software uses. This format holds true for all versions of SQL Server, although other control mechanisms are also implemented as Dynamic Link Libraries, or DLL’s.

This means that a single installation of SQL Server has only one set of certain data, such as server-level security credentials, scheduling information, temporary files and other meta-data.

Beginning with SQL Server 2000, you can run multiple copies of the software, using what Microsoft calls Instances. Instances share a few files between them, mostly dealing with client tools. This allows you to have two different system administrators (sa accounts) and other server-level security on the same hardware. So if you have different security needs, say running more than one company with different administrators, you can install multiple copies of SQL Server on the same hardware.

Another advantage is that since some of the files that run the Instance are duplicated, you can apply service packs separately to each Instance. That way you can host several applications on the same hardware that require different service pack levels.

Le istanze consentono inoltre di lavorare con più versioni e persino edizioni del prodotto. È possibile installare le istanze in qualsiasi momento, anche dopo l'installazione e l'esecuzione di SQL Server per un certo periodo di tempo. Quindi per Instance (nessun gioco di parole previsto), è possibile installare SQL Server 2005 Express Edition, SQL Server 2005 Enterprise Edition, SQL Server 2008 Standard Edition e SQL Server 2008 R2 Developer Edition, tutti sullo stesso hardware.

If a connection request specifies only the name of the computer only, then connection is made to the default instance. A named instance is one where you specify an instance name when installing the instance. A connection request must specify both the computer name and instance name in order to connect to the instance. The computer name and instance name are specified in the format computer_name\instance_name.

Le istanze si applicano principalmente al motore di database e ai suoi componenti di supporto, non agli strumenti client. Quando si installano più istanze, ogni istanza ottiene un set univoco di: 1. Database di sistema e utente. 2. I servizi SQL Server e SQL Server Agent. Per le istanze predefinite, i nomi dei servizi rimangono MSSQLServer e SQLServerAgent. Per le istanze denominate, i nomi dei servizi vengono cambiati in MSSQL $ nome istanza e SQLAgent $ nome istanza, consentendo loro di essere avviati e arrestati indipendentemente dalle altre istanze sul server. I motori di database per le diverse istanze vengono avviati e arrestati utilizzando il servizio SQL Server associato. I servizi di SQL Server Agent gestiscono eventi pianificati per le istanze associate del motore di database. 3.

Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.