Skip to main content

11 docs tagged with "SQL"

View All Tags

Activities on SQL server

This SQL script creates a temporary table named @Table and populates it with the results of the system stored procedure sp_who2, which returns information about active connections to a SQL Server instance. The SELECT statement then retrieves all rows from @Table where the DBName column matches any value, effectively returning information about all active connections regardless of the database they are connected to.

Find Restore History

This SQL script fetches information about database restores from a table called restorehistory in the msdb database.

Insert SUPER User

The script imports the Microsoft.Dynamics.Nav.Management.dll module, which provides the cmdlets that are used to manage users and tenants.