Muchas veces nos encontramos en situaciones en las cuales tenemos un servidor SQL Server, y los usuarios reportan que el sistema está lento, por lo tanto, es crucial que podamos identificar cuál es la causa. El primer paso puede ser identificar cuáles son las consultas TSQL que están consumiendo más recursos en el servidor, para poder identificarlas podemos recurir al siguiente script, el cual nos devuelve las consultas ordenadas por tiempo de ejecución, a partir de esta consulta podemos identicar el TSQL que consume más recursos e iniciar nuestras tareas de mejoras de desempeño. -- Consultas que afectan el desempeño SELECT TOP 10 SUBSTRING ( qt . TEXT , ( qs . statement_start_offset / 2 ) + 1 , ( ( CASE qs . statement_end_offset WHEN - 1 THEN DATALENGTH ( qt . TEXT ) ELSE qs . statement_end_offset END - qs . statement_start_offset ) / 2 ) + 1 ) AS consulta_TSQL , db . name AS [nombre_base_datos] , qs . total_...
El siguiente es un ejemplo de código de Microsoft sobre cómo implementar un Membership Provider personalizado. using System.Web.Security; using System.Configuration.Provider; using System.Collections.Specialized; using System; using System.Data; using System.Data.Odbc; using System.Configuration; using System.Diagnostics; using System.Web; using System.Globalization; using System.Security.Cryptography; using System.Text; using System.Web.Configuration; /* This provider works with the following schema for the table of user data. CREATE TABLE Users ( PKID Guid NOT NULL PRIMARY KEY, Username Text (255) NOT NULL, ApplicationName Text (255) NOT NULL, Email Text (128) NOT NULL, Comment Text (255), Password Text (128) NOT NULL, PasswordQuestion Text (255), PasswordAnswer Text (255), IsApproved YesNo, LastActivityDate DateTime, LastLoginDate DateTime, LastPasswordChangedDate DateTime, CreationDate DateTime, IsOnLine YesNo, IsLockedOut YesNo,...
En este articulo se incluyen los scripts para configurar y utilizar los servicios de Machine Learning Services en Azure Managed Instance y de esa forma poder ejecutar scripts de Python dentro de la base de datos -- Para habilitar Machine Learning Services en Azure SQL Managed Instance, habilite la extensibilidad sp_configure 'external scripts enabled' , 1 ; RECONFIGURE WITH OVERRIDE ; -- Ejecucion de un script sencillo EXECUTE sp_execute_external_script @language = N'Python' , @script = N ' a = 1 b = 2 c = a/b d = a*b print(c, d) ' -- Script en Python que devuelve un Result Set EXECUTE sp_execute_external_script @language = N'Python' , @script = ...
Comments