Technology Tips -SQL Server 2008 R2
Showing posts with label SQL Server 2008 R2. Show all posts
Showing posts with label SQL Server 2008 R2. Show all posts

Wednesday, December 11, 2013

Recently I just come across with an error while I was attaching and detaching sql server database so gathered some point for everyone and surely they will help them.
If you are having issues in attaching and detaching sql server databases so there are number of reasons behind it you need to fix and troubleshoot them one by one.
The first step probably that you are detaching the database from sql server when you click on database and tap into task>detach then a dialog box will open saying database name and in the last column you would see a “link message” saying users connected with database so you can ask these users to disconnect from database or you can follow other procedure to disconnect users from the same database by force.
Simple option to disconnect users by force is to click drop connection option from the same dialog and click "ok" this will drop all connected users from database and you can do detaching database.
Another way include you can run scripts for detaching database, and you also can tap into activity monitor utility which is available when you click on sql server node and right click from sql server management studio let the utility load and tap into processes and select your database name and see activity details and  processes by right clicking on the process from there.
 If you are attaching database and facing issues so there are number of steps you can follow:
If you find error like the following:
Error Question:
Error while opening mdf file
there is no editor for “path for your database and file”
 Make sure application for the file type is installed

Error Answer:
The above error says – you have tried opening database file .mdf without SSMS.
Actually mdf file can be browsed when you will attach it to sql server database so you cannot just open it, first you need  to attach this mdf file to database using sql server management studio.

Attaching mdf file to sql server 
Load SQL Server Management Studio> Connect with sql server instance> select database and right click on it> click attach> browse your mdf file and click ok. You are done you would be seeing your database listed when you refresh the database node. 

You may be getting access denied error while opening mdf file.
Attach database failed for server “server name” . (Microsoft.SQLServer.smo)
Unable to open physical file “file location mdf”. Operating system error 5: “5(Access is denied.)”.(Microsoft SQL Server, Error: 5120)


Mostly there are permission issues when you are having error while attaching database to SQL server. This error also a permission issue on OS level.

Final and super option to fix this permission issue instead of going through number of other options and trying other credentials you just copy that mdf and ldf file from data folder of sql server to other location and try connecting them from other location , if mdf file is attached so you can copy back the mdf file to its location means data folder which is default folder for all databases by SQL server.

The above practice is based on SSMS 2008 R2.

Saturday, April 3, 2010

 SQL Server 2008 R2 (rtm) release to manufacturing was in the market in 2010,
SQL Server 2008 R2 is sophisticated released by Microsoft added number of new features and functionality in this version.
SQL Server R2 includes number of new and enhanced functionality without purchasing any new component license like other has been following this model,  I am just outlining such issue that might have been faced by number of IT guys, when they are going to select or decide such a strong database for their organization. You may consider other than SQL Server 2008 R2 but please do a good research and try to download free trial of such databases server. Like you can ask from IBM to deploy a trial version in your organization environment and you also can request Oracle to deploy or you can install it by yourself – and try to test full load on this test environment.

IBM also a big company and invested millions in research so do a good research when you are going to buy any database solution for your organization like IBM DB2 etc.

SQL Server 2008 R2 supports many feature in terms of total cost of ownership where as oracle may be missing somewhere in our opinion. What Microsoft SQL Server 2008 R2 supports with single license they are:
  • Column compression,
  • Module signing using certificate, 
  • SQL Server data services, 
  • Power Shell, 
  • Policy based management etc.
     For such feature you might consider paying more for oracle if you want to get such feature in oracle environment.
    Microsoft has also released sql management studio to manage database on client pc's.
If you are not agree with the information above so please accept our apologies.Content here is not against any individual or organization but for informational purpose only.