Download - Nov SQL 2000 64bits
![Page 1: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/1.jpg)
![Page 2: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/2.jpg)
Novedades de Microsoft SQL Server 2000
64 bits Edition
Gonzalo MorenoGerente de ServidoresMicrosoft de Argentina
![Page 3: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/3.jpg)
SQL Server 2000 - 64 bits Edition
• Características de producto
• ¿En que proyecto debo usar SQL 2000 64 bits?
• Disponibilidad de producto
![Page 4: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/4.jpg)
Alta Disponibilidad y Performance
en Microsoft SQL Server
Emilio BoucauMicrosoft MVP SQL Server www.portalsql.com
![Page 5: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/5.jpg)
Failover Clustering
Stand by Servers / Warm Servers
Log Shipping
Alta Disponibilidad
Opciones disponibles
Los servidores de misión crítica se
apoyan en
![Page 6: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/6.jpg)
Alta Disponibilidad
Clustering
Clustering … ¿Qué es clustering ?
![Page 7: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/7.jpg)
Alta Disponibilidad
Clustering – Un poco de historia …
Windows NT 3.51
Add-on llamado Wolfpack / NT Cluster Plus Pack
Soporte nativo en Windows NT 4.0 Enterprise Edition
MSCS : Microsoft Clustering Server
![Page 8: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/8.jpg)
SQL Server 6.5 Enterprise Edition
soportaba Clustering !
Alta Disponibilidad
Clustering – Un poco de historia …
![Page 9: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/9.jpg)
SQL Server 7.0 Enterprise Edition
introdujo importantes cambios al soporte de Clustering
Alta Disponibilidad
Clustering – Un poco de historia …
![Page 10: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/10.jpg)
Alta Disponibilidad
Clustering – La actualidad
Windows 2000 incluye un poderoso soporte de Clustering
MSCS: Microsoft Cluster Service
Windows 2000 Advanced Server
Windows 2000 Datacenter Server
![Page 11: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/11.jpg)
Clustering en Windows 2000
2 Nodos W2000 Advanced Server
3 Nodos W2000 Datacenter Server
4 Nodos W2000 Datacenter Server
Alta Disponibilidad
Clustering – La actualidad
![Page 12: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/12.jpg)
2 Nodos - El Cluster más simple
Activo / Activo
Activo / Pasivo
Conceptos similares se aplican a Clusters de 3 y 4 nodos
Alta Disponibilidad
Clustering
![Page 13: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/13.jpg)
Nodo A
Nodo B
Array de discos compartido
Alta Disponibilidad
Clustering – ¿Cómo funciona el Cluster?
LAN
Heartbeat
SQL 2000 Virtual Server - MSCS
SQL 2000 Virtual Server - MSCS
LAN
![Page 14: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/14.jpg)
Server Virtual
• Se le asigna un nombre
• Se le asigna una IP
• Para el cliente, es indistinto y transparente el nodo que le brinda servicio
Alta Disponibilidad
Clustering
![Page 15: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/15.jpg)
Pros del Clustering
• Reduce al mínimo los tiempos de un server caído
• Tiene respuesta automática ante la caída de un nodo
• No se necesita renombrar los servidores
• La recuperación es rápida: tan pronto se arregle el server
Alta Disponibilidad
Clustering
![Page 16: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/16.jpg)
Contras del Clustering
• Costo mayor que un Stand by server
• Precisa más tiempo en la instalación
• Requiere un mantenimiento mayor
• Requiere administradores de red y DBA’s con más experiencia
Alta Disponibilidad
Clustering
![Page 17: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/17.jpg)
Software necesario para un Cluster de 2 nodos• 2 Windows 2000 Advanced Server
• 1 SQL Server 7 Ent. ó 1 SQL 2000 Ent. para un cluster Act / Pas
• 2 SQL Server 7 Ent. ó 2 SQL 2000 Ent. para un cluster Act / Act
Aplicar el último Service Pack para Windows y SQL Server
Alta Disponibilidad
Clustering
![Page 18: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/18.jpg)
Software necesario para un Cluster de 3 ó 4 nodos• 3 ó 4 Windows 2000 Datacenter Server
• 3 ó 4 SQL Server 7 Enterprise Edition ó SQL 2000 E.E.
Aplicar el último Service Pack para Windows y SQL Server
Alta Disponibilidad
Clustering
![Page 19: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/19.jpg)
Hardware necesario para un Cluster
• 2 servidores con 256 MB de RAM y 1 CPU Pentium III
• 2 placas de red en cada servidor
• Un array de discos SCSI en RAID 5 o RAID 10
Alta Disponibilidad
Clustering
![Page 20: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/20.jpg)
Log Shipping … ¿qué es Log Shipping?
Alta Disponibilidad
Clustering
![Page 21: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/21.jpg)
![Page 22: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/22.jpg)
Alta Disponibilidad
Log Shipping
Integrantes del log shipping
• 1 Servidor de producción (Primario)
• 1 ó más servidores receptores (Secundarios)
• 1 Servidor de monitoreo (Monitor)
![Page 23: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/23.jpg)
Producción Stand by Server
Copia
de Log de Log
RestoreBackup
Monitor
Alta Disponibilidad
Log Shipping
![Page 24: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/24.jpg)
Log Shipping automático
Utilizar versión Enterprise de SQL Server 2000 (para SQL Server 7 esta implementado en el Resource Kit)
Hacer un DTS que copie SysLogins y lo restaure en el Stand by server (al menos 1 vez), o no existirán los derechos !
Alta Disponibilidad
Log Shipping
![Page 25: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/25.jpg)
Sincronizando los servidores
¿Cuán sincronizados deben estar?
¿Cada cuánto tiempo se transfiere el log?
¿Cuánto tardará en copiarse y aplicarse el log?
Utilizar una conexión directa al pair server,
no network normal
Alta Disponibilidad
Log Shipping
![Page 26: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/26.jpg)
Activar el servidor
sp_change_primary_role....... deja de ser el primario
sp_change_secondary_role... deja de ser el secundario
sp_change_monitor_role...... notifica del cambio de roles
sp_resolve_logins................. elimina los posibles problemas
de login
Alta Disponibilidad
Log Shipping
![Page 27: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/27.jpg)
No tengo SQL Server 2000 Enterprise
o
Tengo SQL Server 7 y no tengo el Resource Kit...
… qué hago ?
Alta Disponibilidad
Log Shipping
![Page 28: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/28.jpg)
Log Shipping manual … ¿se puede?
Utilizando RESTORE combinado con
WITH STANDBY ............ modo read-only y acepta archivos
de log
WITH NORECOVERY ...... solo acepta archivos de log
WITH RECOVERY ..........aplica el log y entra en proceso de
recovery
Alta Disponibilidad
Log Shipping
![Page 29: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/29.jpg)
Log Shipping manual
En el servidor de producción:
1) BACKUP DATABASE
2) BACKUP LOG *
* Rehacer esta operación en los períodos establecidos (un Job es lo normal)
Alta Disponibilidad
Log Shipping
![Page 30: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/30.jpg)
Log Shipping manual
En el Stand by server :
1) RESTORE DATABASE WITH STANDBY (modo read-only y acepta archivos de log). WITH NORECOVERY solo acepta logs.2) RESTORE LOG WITH STANDBY *
* Para cada copia del log recibida
Alta Disponibilidad
Log Shipping
![Page 31: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/31.jpg)
Log Shipping manual
Levantar el Stand by server
1) Ultimo Backup/Restore de log (si se puede)
2) RESTORE DATABASE WITH RECOVERY
Alta Disponibilidad
Log Shipping
![Page 32: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/32.jpg)
En resumen …
En servidores críticos :
Implementar un Cluster Implementar Log Shipping
automático Implementar un proceso de Log
Shipping manual
En cualquier caso … Backup y Restore !!
![Page 33: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/33.jpg)
Análisis de Performance
Performance … ¿Para qué?
![Page 34: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/34.jpg)
El tiempo es dinero
A nadie le gusta esperar
Aprovechar los recursos al máximo
Análisis de Performance
Finalidad
![Page 35: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/35.jpg)
El Front-End
El diseño de la base
La configuración del SQL Server
El hardware del servidor (insuficiente o mal configurado)
Análisis de Performance
Control /
Búsqueda de mermas de performance
![Page 36: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/36.jpg)
Análisis de Performance
SQL Server - T-SQL
Sólo recuperar lo necesario (nunca datos de más)
SELECT * FROM Tabla WHERE ...
![Page 37: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/37.jpg)
Agregar, quitar o modificar los índices (usar Covered Indexes cuando sea posible)
Utilizar Stored Procedures en vez de queries
Analizar el plan de ejecución de los procesos
Análisis de Performance
SQL Server - T-SQL
![Page 38: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/38.jpg)
Argumentos de búsqueda: partes del query que acotan las búsquedas (los índices deberían estar armados para ayudarnos en esto !).
=, >, <, >=, <=, BETWEEN, LIKE, IN
Los operadores lógicos AND y OR agrupan argumentos de búsqueda.
Optimización (Query Optimizer)
Análisis de Performance
SQL Server - T-SQL (Ejecución de una consulta )
![Page 39: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/39.jpg)
No se consideran argumentos de búsqueda:
Comparaciones entre columnas: SALDO > SOBRE_GIRO
Cálculos: SALDO * 1.5
Optimización (Query Optimizer)
Análisis de Performance
SQL Server - T-SQL (Ejecución de una consulta )
![Page 40: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/40.jpg)
Búsqueda de JOINs en la consulta
Microsoft recomienda no utilizar la cláusula WHERE; si, en cambio, usar ON.
Optimización (Query Optimizer)
Análisis de Performance
SQL Server - T-SQL (Ejecución de una consulta )
![Page 41: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/41.jpg)
SELECT Apellido, Nombre FROM Clientes, Cuentas
WHERE Clientes.Cliente_ID = Cuentas.Cliente_ID
AND Cuentas.Nivel = ‘VIP’
SELECT Apellido, Nombre FROM Clientes INNER JOIN Cuentas
ON Clientes.Cliente_ID = Cuentas.Cliente_ID
WHERE Cuentas.Nivel = ‘VIP’ANSI
T-SQL
Análisis de Performance
SQL Server - T-SQL
![Page 42: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/42.jpg)
¡ Utilizar Stored Procedures siempre que se pueda !
El query plan de la consulta es reaprovechable
El código ya esta chequeado, normalizado y optimizado
Usar sp_recompile si el código del SP se modifica
Análisis de Performance
SQL Server - T-SQL
![Page 43: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/43.jpg)
Emplear los triggers con cautela(tanto INSTEAD OF como AFTER)
Evitar el uso de cursores
Usar OLE DB para cceder datos(evitar ODBC si se puede)
Análisis de Performance
SQL Server - T-SQL
![Page 44: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/44.jpg)
Análisis de Performance
SQL Server - Monitoreo
Herramientas
Windows Performance Monitor
SQL Server Profiler
![Page 45: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/45.jpg)
En resumen …
En servidores críticos :
Implementar un ClusterImplementar Log Shipping automáticoImplementar un proceso de Log Shipping manual
En cualquier caso … Backup y Restore !!
SIEMPRE CONTROLAR EL DESEMPEÑO Y LA PERFORMANCE !
![Page 46: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/46.jpg)
Websites de MVP’s
Salvador Ramos http://www.helpdna.netFernando Guerrero http://www.callsql.com Eladio Rincón http://eu.webmatrixhosting.net/Eladio
Grupo de noticias en castellano
Servidor: msnews.microsoft.comGrupo: microsoft.public.es.sqlserver
PASS Spanish Groupwww.sqlpass.org
Referencias
![Page 47: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/47.jpg)
TechNet: www.microsoft.com/spain/technetMSDN: www.microsoft.com/spain/msdnSQL Server: msdn.microsoft.com/sqlserverSQL Server 64 bits: www.microsoft.com/sql/64bit/ DTS: www.sqldts.com
www.mssqlserver.comwww.sql-server-performance.com
www.connectionstrings.comwww.insidesqlserver.comwww.netiq.com
Sitios de interés
![Page 48: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/48.jpg)
Windows Server 2003 paso a paso
¡Inscríbase ya!
![Page 49: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/49.jpg)
¿Preguntas?
• Por favor, complete el formulario de evaluación
Cierre
• Intervalo de 10’
¡Muchas gracias!Emilio Boucau
![Page 50: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/50.jpg)
Después del intervalo, en esta sala.
![Page 51: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/51.jpg)
Tu potencial. Nuestra pasión.®
![Page 52: Nov SQL 2000 64bits](https://reader036.vdocumento.com/reader036/viewer/2022062418/5535297b55034678168b4671/html5/thumbnails/52.jpg)