SQL 2
SQL 2
Whether, you create a database graphically using the designer or, using a query,
the following 2 files gets generated.
.MDF file - Data File (Contains actual data)
.LDF file - Transaction Log file (Used to recover the database)
You cannot drop a database, if it is currently in use. You get an error stating -
Cannot drop database "NewDatabaseName" because it is currently in use. So, if other
users are connected, you need to put the database in single user mode and then drop
the database.
Alter Database DatabaseName Set SINGLE_USER With Rollback Immediate
With Rollback Immediate option, will rollback all incomplete transactions and
closes the connection to the database.
thanks
Reply
If the size of the .LDF file is getting increased in GBs so how to decrease the
size of it. In my case the size is increased about 48GB. I have tried with shrink
option but it is not working.
Thanks.
Reply
Replies
Reply
Reply
Reply
In this blog, as per you said if we delete the database both .mdf and .ldf will be
deleted but if we rename the database, Will the actual database name in file path
be changed?
I found in my case that if I rename the database, the change in database name is
not reflecting in the actual file path, so what's the reason behind it?
Thanks
Reply
Complete Tutorials
How to become a full stack web developer
JavaScript tutorial
Bootstrap tutorial
Important Videos
The Gift of Education
C tutorial
Angular 6 Tutorial
Angular CRUD Tutorial
Angular 2 Tutorial
Design Patterns
SOLID Principles
Bootstrap
AngularJS Tutorial
jQuery Tutorial
JavaScript Tutorial
Charts Tutorial
LINQ
LINQ to SQL
LINQ to XML
Entity Framework
WCF
C#
SQL Server
ADO.NET
ASP.NET
GridView
ASP.NET MVC
Slides
Entity Framework
WCF
ASP.NET Web Services
C#
SQL Server
ADO.NET
ASP.NET
GridView
ASP.NET MVC
Interview Questions
C#
SQL Server
Written Test
Powered by Blogger.