STTM
TEST CASES
STTM – TESTING
Whether same datatype in source and target or not
The value should be both zero , viceversa
Incremental data validation
Already loaded data , if we run again on that data is called incremental like SCD functionalities .
Means if there are any changes in the CUSTOMER table the old functionalities should not be impacted and new functionalities shd be tested as well
Active : only load dept =10 records , num of records reduce
Passive : name = fname + lnam , num of records don’t decrease
AGILE METHODOLOGY
Sprint :
Sprint planning ( First day of sprint )
Sprint story points ( jira )
Sprint daily call
Sprint retrospective ( Last day of sprint )
Sprint backlog ( planned , Actual , moved to backlog )
RESUME CONTENT
ETL testing notes / Data modeling / SQL - index
My Doubts
Data Modeling Doubuts
How the size is calculated for each column with a datatype
How to see the performance of a Table in a Data model
How to optimize the performance of a Table in a Data model
Performance Tuning Doubts
Requirement Gathering questions
Sfs
Dsfds
SQL
COPY ROWS FROM ONE TABLE TO ANOTHER
USE db1;
SHOW tables;
SELECT * FROM emp;
DROP TABLE emp3;
CREATE TABLE emp3 LIKE emp;
SELECT *FROM emp3;
INSERT INTO emp3 SELECT * FROM emp WHERE id = 1;
How MYSQL autocommit off
set autocommit =0;
INSERT INTO emp3 SELECT * FROM emp WHERE id = 1;
select * from emp3;
rollback;
Create user and grant privileges
Create the User: Replace newuser with your desired username and password with the desired password.
sql
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Grant Privileges: Assign the necessary privileges to the new user. For example, to grant all privileges on a specific database:
sql
GRANT ALL PRIVILEGES ON your_database.* TO 'newuser'@'localhost';
Flush Privileges: Apply the changes.
sql
FLUSH PRIVILEGES;
Exit MySQL:
sql
EXIT;
Now, newuser can log
Change User Password
To change the password for an existing user:
sql
ALTER USER 'username'@'host' IDENTIFIED BY 'new_password';
Or for MySQL 5.7.6 and newer:
sql
SET PASSWORD FOR 'username'@'host' = 'new_password';
Grant Additional Privileges
To grant new privileges to an existing user:
sql
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'host';
Or a more specific privilege:
sql
GRANT SELECT, INSERT ON database_name.* TO 'username'@'host';
Rename a User
To rename an existing user (MySQL 5.7.8+):
sql
RENAME USER 'old_username'@'host' TO 'new_username'@'host';
Revoke Privileges
To revoke privileges from a user:
sql
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'username'@'host';
Drop a User
To delete an existing user:
sql
DROP USER 'username'@'host';
Remember to always flush privileges after making changes to ensure they take effect:
sql
FLUSH PRIVILEGES;
If you have any specific changes in mind, let me know, and I can guide you through it!
FLUSH AND REVOKE COMMANDS
FLUSH
Purpose: The FLUSH command is used to reload, reset, or clear various caches and logs. When you FLUSH PRIVILEGES, it reloads the privilege tables, making any changes to user accounts or permissions effective immediately.
Example:
sql
FLUSH PRIVILEGES;
REVOKE
Purpose: The REVOKE command is used to remove specific privileges from a user. It explicitly takes away permissions that have been granted to a user.
Example:
sql
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'username'@'host'
No comments:
Post a Comment