Showing posts with label downloaded. Show all posts
Showing posts with label downloaded. Show all posts

Sunday, February 19, 2012

Database design

I just downloaded VS 2005 beta 2 and am learning about the new features and getting acquanted with it.

I used to do all the database design in Visio Enterprise Architect. Is there a replacement for Visio in VS 2005? Or we continue to use visio to model our databases? I want to be able to create a model that I can deploy in not only SQL Server.

Thanks in advance,

MCHi
There is no such replacement for visio in Vs 2005. One can continue to use visio for modelling the db

Friday, February 17, 2012

Database creation

I downloaded the sample database AdventureWorks from microsoft . When I run the download it created the data and log files under data folder in MSQLalong with other data and log files of master databases etc. However I do not see this database in SQLserver management studio. Can some one help me how to fix this so that I will be able to see this database in management studio.

I am downloading this for SQL server reporting purpose

Hi Kash,

The sample database installation delivers the database files to your machine, but does not "attach" the database to a specific SQL instance.

To attach the database you could do one of the following:

(1) Execute the following query:

USE master
GO
EXEC sp_attach_db 'AdventureWorksDW', '<path to your MDF file>AdventureWorksDW_Data.mdf', '<path to your LDF file>AdventureWorksDW_Log.ldf'

(you could use whatever name you like and also - make sure the MDF and LDF file names are correct, too)

(2) In SQL Management Studio, right-click the Databases folder, select "Attach". Navigate to the folder where the MDF file is installed and select it.

With either steps, the database is attached, recovered and comes online. BTW - this is a good way to move or rename a database: detach, move, attach (possibly under different name).

HTH,

Jivko Dobrev - MSFT
--
This posting is provided "AS IS" with no warranties, and confers no rights.