Archivo de la categoría: SQL Server

Bitacora de SQL Server

How to monitor encryption or decryption Progress. SQL Server

SELECT DB_NAME(database_id) AS DatabaseName, encryption_state, encryption_state_desc = CASE encryption_state WHEN ‘0’ THEN ‘No database encryption key present, no encryption’ WHEN ‘1’ THEN ‘Unencrypted’ WHEN ‘2’ THEN ‘Encryption in progress’ WHEN ‘3’ THEN ‘Encrypted’ WHEN ‘4’ THEN ‘Key change in progress’ WHEN ‘5’ THEN ‘Decryption in progress’ WHEN ‘6’ THEN ‘Protection change in progress (The certificate… Leer más »

Remove Transparent Data Encryption (TDE) from SQL Server user databases

Transparent Data Encryption is getting popular these days because every business owner is serious about protecting their data. Everybody wants to use the latest encryption technologies to make sure their systems are more secure and stable. SQL Server also offers some encryption features to protect client’s data like TDE (Transparent Data Encryption), Always Encrypt, etc. Sometimes, business wants… Leer más »

SSIS Package Excel file could not be saved.

Error:  HRESULT: 0x800A03EC E To solve this create a folder Create a folder called «Desktop» in «C:\Windows\System32\config\systemprofile\» and It should work This issue can be resolved by adding a Desktop folder to the following directories:

How to assign permissions by schema in SQL Server

To assign permissions to a schema in SQL Server, you must first create a security role and assign permissions to the role. Then, assign the role to the desired user or group of users. Here is an example of code to assign SELECT permissions to a «test_schema» schema: sqlCopy code– Create a security role CREATE… Leer más »

SQL Duplicates Count Query for two or more columns

This query uses a commonly used query (CTE) to group the results and count duplicates in the zip_to_fips table. The first part of the query, the CTE, selects the columns «fips», «cnty_name» and adds an additional column «DuplicateCount» that uses the ROW_NUMBER() function to assign a unique number to each row that has equal values… Leer más »

User, group, or role already exists in the current database

You moved the database to another instance and created a new login for this database instead of moving the login from the old instance to the new instance. I recommend that you read my article “How To Move Logins To Another Instance(sp_help_revlogin)”. You may receive this error when you want to authorize the login that you created for the database… Leer más »