Sql Server 2005 Limite de connexion

voix
1

Y at-il une limite de connexion sur Sql Server 2005 Édition développeurs. Nous avons beaucoup de discussions accaparement des connexions, et je sais que ADO.NET ne mise en commun de connexion, mais je reçois des exceptions OutOfMemory. Nous prenons les connexions db et il fonctionne très bien.

Créé 02/10/2008 à 20:03
source utilisateur
Dans d'autres langues...                            


4 réponses

voix
4

Ceci est la réponse à cette question sur Euan Garden (un gestionnaire de programme pour Visual Studio Team Edition) blog:

Il n'y a pas de limites en ce qui concerne la mémoire, la taille db ou procs pour DE, il est essentiellement Enterprise Edition. Il y a cependant une restriction de licence qui l'empêche d'être utilisé dans la production.

Par conséquent, vous devez probablement juste pour vous assurer que vous fermez votre connexion des objets correctement. L' utilisation de bloc sera parfait pour un tel travail ...

Créé 02/10/2008 à 20:07
source utilisateur

voix
3

Vous ne pouvez pas être la fermeture ou l'élimination de vos objets de connexion correctement. Assurez-vous que votre code ressemble à ceci:

using (SqlConnection conn = new SqlConnection("connectionstring"))
{
    conn.Open();

    // database access code goes here
}

Le bloc en utilisant automatiquement fermer et disposer de votre objet de connexion.

Créé 02/10/2008 à 20:06
source utilisateur

voix
2

32767 sur Enterprise Edition


<ServerProductVersion> 9.00.3235.00 </ ServerProductVersion>
<ServerProductLevel> SP2 </ ServerProductLevel>
<ServerEdition> Enterprise Edition </ ServerEdition>
<ServerEngineEdition> 3 </ ServerEngineEdition>

Comment puis-je vérifier ...

CREATE FONCTION [dbo] .svfV1GetSessionAndServerEnvironmentMetaData REVIENT xml BEGIN AS

-- Declare the return variable here
DECLARE @ResultVar xml

-- Add the T-SQL statements to compute the return value here
SET @ResultVar =
    (
        SELECT  
            @@SPID                                          as  SPID,
            @@ProcID                                        as  ProcId,
            @@DBTS                                          as  DBTS,
            getdate()                                       as  DateTimeStamp,
            System_User                                     as  SystemUser,
            Current_User                                    as  CurrentUser,
            Session_User                                    as  SessionUser,
            User_Name()                                     as  UserName,
            Permissions()                                   as  UserSessionPermissionsBitmap,
            Host_Id()                                       as  HostId,
            Host_Name()                                     as  HostName,
            App_Name()                                      as  AppName,

            ServerProperty('ProcessId')                     as  ServerProcessId,
            ServerProperty('MachineName')                   as  ServerMachineName,
            ServerProperty('ServerName')                    as  ServerServerName,
            ServerProperty('ComputerNamePhysicalNetBIOS')   as  ServerComputerNamePhysicalNetBIOS,
            ServerProperty('InstanceName')                  as  ServerInstanceName,
            ServerProperty('ProductVersion')                as  ServerProductVersion,
            ServerProperty('ProductLevel')                  as  ServerProductLevel,

            @@CONNECTIONS                                   as  CumulativeSqlConnectionsSinceStartup,
            @@TOTAL_ERRORS                                  as  CumulativeDiskWriteErrorsSinceStartup,
            @@PACKET_ERRORS                                 as  CumulativeNetworkPacketErrorsSinceStartup,

            --Note:  
            --If the time returned in @@CPU_BUSY, or @@IO_BUSY exceeds approximately 49 days of cumulative CPU time, 
            --you receive an arithmetic overflow warning. In that case, 
            --the value of @@CPU_BUSY, @@IO_BUSY and @@IDLE variables are not accurate. 
        --  @@CPU_BUSY * @@TIMETICKS                        as  CumulativeMicroSecondsServerCpuBusyTimeSinceStartup,
        --  @@IO_BUSY * @@TIMETICKS                         as  CumulativeMicroSecondsServerIoBusyTimeSinceStartup,
        --  @@IDLE * @@TIMETICKS                            as  CumulativeMicroSecondsServerIdleTimeSinceStartup,

            ServerProperty('BuildClrVersion')               as  ServerBuildClrVersion,
            ServerProperty('Collation')                     as  ServerCollation,
            ServerProperty('CollationID')                   as  ServerCollationId,
            ServerProperty('ComparisonStyle')               as  ServerComparisonStyle,
            ServerProperty('Edition')                       as  ServerEdition,
            ServerProperty('EditionID')                     as  ServerEditionID,
            ServerProperty('EngineEdition')                 as  ServerEngineEdition,
            ServerProperty('IsClustered')                   as  ServerIsClustered,
            ServerProperty('IsFullTextInstalled')           as  ServerIsFullTextInstalled,
            ServerProperty('IsIntegratedSecurityOnly')      as  ServerIsIntegratedSecurityOnly,
            ServerProperty('IsSingleUser')                  as  ServerIsSingleUser,
            ServerProperty('LCID')                          as  ServerLCID,
            ServerProperty('LicenseType')                   as  ServerLicenseType,
            ServerProperty('NumLicenses')                   as  ServerNumLicenses,
            ServerProperty('ResourceLastUpdateDateTime')    as  ServerResourceLastUpdateDateTime,
            ServerProperty('ResourceVersion')               as  ServerResourceVersion,
            ServerProperty('SqlCharSet')                    as  ServerSqlCharSet,
            ServerProperty('SqlCharSetName')                as  ServerSqlCharSetName,
            ServerProperty('SqlSortOrder')                  as  ServerSqlSortOrder,
            ServerProperty('SqlSortOrderName')              as  ServerSqlSortOrderName,

            @@MAX_CONNECTIONS                               as  MaxAllowedConcurrentSqlConnections,

            SessionProperty('ANSI_NULLS')                   as  SessionANSI_NULLS,
            SessionProperty('ANSI_PADDING')                 as  SessionANSI_PADDING,
            SessionProperty('ANSI_WARNINGS')                as  SessionANSI_WARNINGS,
            SessionProperty('ARITHABORT')                   as  SessionARITHABORT,
            SessionProperty('CONCAT_NULL_YIELDS_NULL')      as  SessionCONCAT_NULL_YIELDS_NULL,
            SessionProperty('NUMERIC_ROUNDABORT')           as  SessionNUMERIC_ROUNDABORT,
            SessionProperty('QUOTED_IDENTIFIER')            as  SessionQUOTED_IDENTIFIER
        FOR XML PATH('SequenceIdEnvironment')
    )   
-- Return the result of the function

RETOUR @ResultVar

FIN

sur ma base de données SQL Server retourne l'instance de moteur


<SequenceIdEnvironment>
  <SPID> 56 </ SPID>
  <procid> 1666821000 </ procid>
  <DBTS> AAAAAAAAB9A = </ DBTS>
  <DateTimeStamp> 2008-10-02T15: 09: 26,560 </ DateTimeStamp> ...
  <CurrentUser> dbo </ CurrentUser>
  <SessionUser> dbo </ SessionUser>
  <UserName> dbo </ UserName>
  <UserSessionPermissionsBitmap> 67044350 </ UserSessionPermissionsBitmap>
  <HostId> 3852 </ HostId> ...
  <AppName> Microsoft SQL Server Management studio - Recherche </ AppName>
  <ServerProcessId> 508 </ ServerProcessId> ...
  <ServerProductVersion> 9.00.3235.00 </ ServerProductVersion>
  <ServerProductLevel> SP2 </ ServerProductLevel>
  <CumulativeSqlConnectionsSinceStartup> 169394 </ CumulativeSqlConnectionsSinceStartup>
  <CumulativeDiskWriteErrorsSinceStartup> 0 </ CumulativeDiskWriteErrorsSinceStartup>
  < CumulativeNetworkPacketErrorsSinceStartup> 0 </ CumulativeNetworkPacketErrorsSinceStartup>
  <ServerBuildClrVersion> v2.0.50727 </ ServerBuildClrVersion>
  <ServerCollation> SQL_Latin1_General_CP1_CI_AS </ ServerCollation>
  <ServerCollationId> 872468488 </ ServerCollationId>
  <ServerComparisonStyle> 196 609 </ ServerComparisonStyle>
  <ServerEdition> Enterprise Edition </ ServerEdition> ...
  <ServerEngineEdition> 3 </ ServerEngineEdition>
  <ServerIsClustered> 0 </ ServerIsClustered>
  <ServerIsFullTextInstalled> 1 </ ServerIsFullTextInstalled>
  <ServerIsIntegratedSecurityOnly> 0 </ ServerIsIntegratedSecurityOnly>
  < ServerIsSingleUser> 0 </ ServerIsSingleUser> ...
  <ServerResourceLastUpdateDateTime> 2008-03-12T18: 59: 08,633 </ ServerResourceLastUpdateDateTime>
  <ServerResourceVersion> 9.00.3235 </ ServerResourceVersion>
  <ServerSqlCharSet> 1 </ ServerSqlCharSet>
  <ServerSqlCharSetName> iso_1 </ ServerSqlCharSetName>
  <ServerSqlSortOrder> 52 </ ServerSqlSortOrder>
  <ServerSqlSortOrderName> nocase_iso </ ServerSqlSortOrderName> **
  <MaxAllowedConcurrentSqlConnections> 32767 </ MaxAllowedConcurrentSqlConnections> **
  <SessionANSI_NULLS> 1 </ SessionANSI_NULLS>
  <SessionANSI_PADDING> 1 </ SessionANSI_PADDING>
  <SessionANSI_WARNINGS> 1 </ SessionANSI_WARNINGS>
  <SessionARITHABORT> 1 </ SessionARITHABORT>
  <SessionCONCAT_NULL_YIELDS_NULL> 1 </ SessionCONCAT_NULL_YIEL DS_NULL>
  <SessionNUMERIC_ROUNDABORT> 0 </ SessionNUMERIC_ROUNDABORT>
  <SessionQUOTED_IDENTIFIER> 1 </ SessionQUOTED_IDENTIFIER>
</ SequenceIdEnvironment>

Créé 02/10/2008 à 20:29
source utilisateur

voix
0

Sont les exceptions de mémoire du .NET? Si l'erreur était sur le serveur, vous devriez voir une connexion refusé un message à la place.

Créé 02/10/2008 à 20:06
source utilisateur

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more