SQL Server

How to change in SQL Server the key column to an identity by using T-SQL and OVER clause

Up
0

Relational model with invoices master-detailIf you have to change the type of a key column on SQL Server, and the new column type has to be integer, and even identity, you can do it by using some criteria in order to get the rows ordered (PK= index clustered= order by in physical disk by this column)..

We will change the type of the PK column of a table in a sample with 2 typical invoice tables master-detail where the key columns are nchar. 'invheader.invoiceid' is the primary key of the master table and 'invlines.lineid' is the primary key of the detail table..

 

SQL Server Administration, and tips for Integration Services (SSIS) and Analysis Services (SSAS)

Datos inmemory en SQL Server 2014This SQL Server eBook compile our best articles about SQL Server administration and development, including posts about Database Administration, for SQL Server DBA's, and about the Business Intelligence components of the Database, the ETL tool SQL Server Integration Services (SSIS) and the OLAP tool SQLServer Analysis Services (SSAS).

 

How to recover the password of the user sa on SQL Server

Up
0

Init params con SQL Server Configuration ManagerWith SQL Server, when we forget or we lose the password of the DBA user 'sa', and we are the administrators of the database, we have a little problem.

It's easy to forget this password because probably we have our own user administrator and don't use to log in with the sa account. We also could have inherited the administration of a SQL Server database, with any documentation about the sa account or we coul'd have installed a database and deleted the login with admin privileges without knowing the password of the sa user.

For all this situations there is a better solution than reinstalling the database..