Thursday, December 17, 2015

Shrink database SQL Server

Shrinking database is one of best option to reduce log space after taking Full Backup. To do that we requires to change your database in simple recovery mode than shrink the database.

ALTER DATABASE <database-name> SET RECOVERY SIMPLE

GO

DBCC SHRINKFILE (<database-log-name>, 5)

GO

ALTER DATABASE <database-name> SET RECOVERY FULL

GO

Database Change Log as Crucial part in database development life cycle

IT industries are keep growing so do Database size in terms of design and data. In mean time the database changes also take place in the industry. As a database developer and ETL developer, I found there is a lot miscommunication and discrepancies going inside the industry.
Due to this miscommunication a lots of production failure occurs and which causes IT industries hundreds of thousands of dollars. As a large database project, it is now necessary to implement Database Change Management. A simple table design that keep tracks of all database changes. May be it is in terms of reports or manage single spread sheet or table and retrieve using SQL queries.
ETL production failure I had seen in most cases due to table schema changes.  You may check a log but it’s not 100% accurate most of time and solution to this problem is to go for each table and compare the schema with the source which cost lots of time effort. Sometimes one more issue I came across is that some developers define their own schema design for the table which is sometimes more dangerous.
If DCM is implemented at right place than it resolved so many issues than compare each schema between source and destination. Like Event log or failure log DCM or I can say Database Change Log is also become part of IT database development strategy.
0
You can also contact me for spread sheet or taking it to database level.