SQL Server
Recover sa login[1]Edit
Launch the Command Prompt as Administrator and connect to SQL Server using SQLCMD. You would be able to successfully connect to the SQL Server instance. Ignore the red text.
If you do not know the “sa” login password, create a SQL server login using the below T-SQL script.
CREATE LOGIN NewSA WITH PASSWORD = 'Password@1234';
Add the login NewSA to the server level role sysadmin. Please use the following T-SQL script to add the SQL Server login to the server level role sysadmin.
ALTER SERVER ROLE sysadmin ADD MEMBER NewSA GO
Foreign Keys and table properties[2]Edit
How to determine whether a database table has foreign keys, and list just about every conceivable attribute of the table.
Shows:
- table name, owner, type created date / time
- table columns / fields and types, whether computed, lengths, prec, scale, nullable, trim trailing, fixed length, collation
- Identity
- RowGuidCol
- Data location on filegroup
- Indexes
- Constraints
sp_help 'TableName'