Primary Key for Table

All tables with Primary Key All tables missing Primary Key t.type Рobject type: Table View c.type Рtype of constraint: Primary key Unique key Foreign key Check constraint Default constraint

Changing Password On Another Domain

Start a Remote Desktop Connection to one of the servers on the domain. When logging into the server, the domain must show that domain. If it doesn’t, select ‘Use a different account’ and enter domain01\username01. Once logged in, press Ctrl-Alt-End and select ‘Change a password.’


Use TRUNCATE instead of DELETE If you need to clear the data in a table, use TRUNCATE instead of DELETE. TRUNCATE lock the table instead of at each row. No triggers are activated and no logs are generated resulting in faster performance. Note: TRUNCATE TABLE will reset your identity to the initial seed, whereas DELETE... » read more

SSRS Permissions

Error: The permissions granted to user ‘DOMAIN\user01’ are insufficient for performing this operation. (rsAccessDenied) User permissions need to be setup both at the SQL Server and SSRS. Account can be both SQL Server account or NT account. SQL Server Account has access to database. (Database -> Security) SSRS Reports pointing to correct Data Sources file.... » read more

Sql Not Exist

The following SQL Server Not Exists query will find the Employees whose Occupation is neither Skilled Manual nor Clerical. Sources:

Generating Data Files

SSMS -> Database Name -> Task -> Generate Script Select object -> Next Click on “Advanced” in the “Types of Data to Script” select “Data only” Generated Script

Alter Table with Large Amount of Data Takes a Long Time

The schema change it taking so long because you are assigning a default value to the column during the change and enforcing that with a non-nullable column, and it has to populate the column for millions of rows, which is an incredibly expensive operation. Alternative to making it faster would be to add it in... » read more