Question Status

Suggested Answer
Ramesh Dhamu asked a question on 20 Feb 2013 8:33 PM

Hi Friends,

 

My Db size went more than 200gb so i plan to shrink database log after shrink the db, some forms are not getting connected in ax when we browse the table in Aot not able to open that table but in SQL data are there in the db wat to do to correct these issue ?

Reply
Suggested Answer
Brandon Ahmad responded on 24 Feb 2013 7:41 PM

This was a huge "NO-NO"!  DBA's are taught to not shrink the SQL database because it can lead to very bad instability and data integrity problems,which is what you are having now.  What you needed to do instead was run the maintenace wizard and focus on defragmenting indexes. Use Indexes to get around the performance bottlenecks that come with large databases.  

We used to shrink databases back in the early 2000's when storage was very expensive, but there were always warnings and we worried when we did it.  In today's time, this is not recommended because you will get all kinds of issues just as you are now.  

You may be able to fix this issue through a painful process of replacing the forms or missing, unstable data but that will take a long time.  Many people used to just restore a backup and then foward the new added information to the restored backup.  

I'd say that you learned a good lesson about shrinking being bad, and that will save you a lot of work in the future.

Independent, Freelance Consultant and Dynamics Development Instructor

http://www.instructorbrandon.com

http://www.youtube.com/user/BrandonAhmad

Reply
Suggested Answer
Brandon Ahmad responded on 24 Feb 2013 7:41 PM

This was a huge "NO-NO"!  DBA's are taught to not shrink the SQL database because it can lead to very bad instability and data integrity problems,which is what you are having now.  What you needed to do instead was run the maintenace wizard and focus on defragmenting indexes. Use Indexes to get around the performance bottlenecks that come with large databases.  

We used to shrink databases back in the early 2000's when storage was very expensive, but there were always warnings and we worried when we did it.  In today's time, this is not recommended because you will get all kinds of issues just as you are now.  

You may be able to fix this issue through a painful process of replacing the forms or missing, unstable data but that will take a long time.  Many people used to just restore a backup and then foward the new added information to the restored backup.  

I'd say that you learned a good lesson about shrinking being bad, and that will save you a lot of work in the future.

Independent, Freelance Consultant and Dynamics Development Instructor

http://www.instructorbrandon.com

http://www.youtube.com/user/BrandonAhmad

Reply
Pradeep Itnal responded on 24 Dec 2013 7:34 AM

hi Brandon

You mean to say shrinking should not be done at all, if we are running out of space say in Development or test box, i just did a shrinking in my local box, however i get the error  Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics""  , when i try to sync.

But i can see proper data in all my masters forms.

Environment: Ax2012 R2

SQL : SQL server 2012

Reply