Sharing knowledge does not lessen your store, often it gets you more.
Success doesn't happen overnight and patience is key to living your dream life.
Success is a journey not a destination
Saturday, February 18, 2012
Could not locate file 'FIelD' for database db in sys.database_files. The file either does not exist, or was dropped.
If you get the above error while truncating the transaction logs then either you haven't selected the proper database to run the script for truncating the logs or you haven't provided the correct logical log file name for the database.
Truncating Transaction Logs in SQL SERVER
Truncating transacation logs!!! Normally you need to find why your transactional logs are growing. The major reason would be that your transaction logs are not getting backed up.
First thing is to check your database recovery model and if you have it as 'FULL' and you deal with too many transactions within the day then start backing up your transaction logs otherwise change your recovery model to 'SIMPLE' (not suitable for databases dealing with large transactions)
Before you change the recovery model you need to truncate your logs.
USE [DatabaseName]
GO
ALTER DATABASE [DatabaseName] SET RECOVERY SIMPLE
GO
DBCC ShrinkFile('[Database log file Logical name]',100)
GO
Note: For Data Warehouse Databases, it is recommended to use 'SIMPLE' recovery model
First thing is to check your database recovery model and if you have it as 'FULL' and you deal with too many transactions within the day then start backing up your transaction logs otherwise change your recovery model to 'SIMPLE' (not suitable for databases dealing with large transactions)
Before you change the recovery model you need to truncate your logs.
USE [DatabaseName]
GO
ALTER DATABASE [DatabaseName] SET RECOVERY SIMPLE
GO
DBCC ShrinkFile('[Database log file Logical name]',100)
GO
Note: For Data Warehouse Databases, it is recommended to use 'SIMPLE' recovery model
Thursday, November 10, 2011
.NET User Group: iPhone Application Development for .NET Junkies
Did my first presentation at the .NET User Group yesterday on Developing iPhone Applications using .NET (C# and MonoTouch).
Really encouraging feedback and comments.
Slides: iPhone Application Development for .NET Junkies
Really encouraging feedback and comments.
Slides: iPhone Application Development for .NET Junkies
Thursday, November 03, 2011
SSIS SQL Task - “Parameter name is unrecognized”
Scenario
You tried to set up a SSIS SQL Task and also assigned a parameter to that.
Solution
Make sure that you changed the Parameter name from 'NewParameterName' to 0.
You tried to set up a SSIS SQL Task and also assigned a parameter to that.
Solution
Make sure that you changed the Parameter name from 'NewParameterName' to 0.
Sunday, July 31, 2011
Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.
You may get the above error when trying to open the database diagram or trying to create a new diagram.
Solution
ALTER AUTHORIZATION ON DATABASE::DTLDW TO sa
or
Assign the Database owner to a valid login by right clicking on the database and choose properties > file.
Solution
ALTER AUTHORIZATION ON DATABASE::DTLDW TO sa
or
Assign the Database owner to a valid login by right clicking on the database and choose properties > file.