il_masacratore's blog

How to recover the sa user password in Sql Server 2008

8

There are many ways to link it with our SqlServer database and one of them is to forget or not to have the user's password available to us. It may be because we never use it, because we have our own admin user and we really do not log in with that account. We may have inherited that wonderful database and we do not have any user or domain that is an administrator.

How to disable autocommit in SQL Server Management Studio

9

Disable autocommit on SQL Server Management Studio

Have you ever wondered how to disable autocommit in the Sql Server Management Studio?

Well the answer is quick. You can change it by activating the check in the menu..

 

 

Change in SQLServer the key column of a table to a new one of type integer that is identity using OVER

8

Relational scheme master detailAt some point it may be necessary to change the key column type for our table / s because of a poor design or a subsequent change that forces us to do so.

If we do and the new has to be a column of the integer type, maybe identity, we can do it with some criterion so that it is sorted ..

 

Update table statistics dynamically across an entire SQL Server database

8

In Oracle there is a table where all tables in the database (dba_tables) are listed and we can use it to perform maintenance operations dynamically. In Sql Server we can do the same by consulting the table [database].dbo.Sysobjects.

In the example below (as in others I've posted) I update the statistics of all tables in a Sql Server database dynamically by querying the data dictionary. This could be encapsulated in a stored procedure or directly executed in a job of the Agent of Sql Server to keep updated the statistics of all the tables of a database automatically..

Create table using the data dictionary on SQL Server

7

Sometimes we need to check the existence of a table in a script or scheduled task to record events of errors, first executions etc ... Let us take an example, a package of integration services that we tend to distribute or run there where we go and that leaves traces in a custom table that is not the default for loading logs.

Syndicate content