Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 work on .mdf home & office

Author  Topic 

lpace76
Starting Member

6 Posts

Posted - 2011-07-23 : 06:35:09
New at SQL. Created a database at work and needed to work on program development at home. Copied the .mdf file to a thumb drive, copied the contents to my c: and tried to open within the SQL Server Management and got an access is denied error. File is not protected yet and rights are all rights. Office computer is xp home computer is 7. Could that be the problem?

Larry Pace

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-23 : 06:48:01
nope did you set up server at home and try to attach the mdf in it with name given as your database name?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-07-23 : 09:04:51
What you have tried is the way MS Access is working.
SQL Server is complete different to this!



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

lpace76
Starting Member

6 Posts

Posted - 2011-07-24 : 12:33:53
quote:
Originally posted by visakh16

nope did you set up server at home and try to attach the mdf in it with name given as your database name?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/




I used the same database name and tried to import when I got the error message. Thanks for the reply

Larry Pace
Go to Top of Page

lpace76
Starting Member

6 Posts

Posted - 2011-07-24 : 12:35:13
quote:
Originally posted by webfred

What you have tried is the way MS Access is working.
SQL Server is complete different to this!



No, you're never too old to Yak'n'Roll if you're too young to die.


What should I have done different?

Larry Pace
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-24 : 13:13:44
quote:
Originally posted by lpace76

quote:
Originally posted by visakh16

nope did you set up server at home and try to attach the mdf in it with name given as your database name?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/




I used the same database name and tried to import when I got the error message. Thanks for the reply

Larry Pace


dont try to import but you should use attach option and point it to mdf file. then give it name of db you want and you will be able to access the db. I'm assuming you've installed sql server instance at home and also client tools like sql management studio.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-07-24 : 14:07:07
Or backup the database and restore it at home. That's far safer.

--
Gail Shaw
SQL Server MVP
Go to Top of Page

lpace76
Starting Member

6 Posts

Posted - 2011-07-24 : 14:21:56
quote:
Originally posted by visakh16

quote:
Originally posted by lpace76

quote:
Originally posted by visakh16

nope did you set up server at home and try to attach the mdf in it with name given as your database name?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
That Worked but in 'Read Only'



I used the same database name and tried to import when I got the error message. Thanks for the reply

Larry Pace


dont try to import but you should use attach option and point it to mdf file. then give it name of db you want and you will be able to access the db. I'm assuming you've installed sql server instance at home and also client tools like sql management studio.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Larry Pace
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-25 : 00:28:15
did it work for you?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

lpace76
Starting Member

6 Posts

Posted - 2011-07-30 : 17:21:59
quote:
Originally posted by visakh16

did it work for you?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/




I think I am having a permissions difficulty -- when I tried to 'Attach' the file from my office I get this error:
System.Data.SqlClient.SqlError: The media set has 2 media families but only 1 are provided. All members must be provided. (Microsoft.SqlServer.Smo)

I am using 7 pro and I am the only user. Checking the file attributes it indicates that it is not protected?


Larry Pace
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-07-31 : 01:50:26
This error message means backup of the database wrote its data to two files, not one.

When attempting to restore, you need to specify all of the files which were used to take the backup.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-07-31 : 04:34:35
This is most likely what happened: http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/07/18/sql-server-backup-_1320_-inadvertent-striping.aspx

--
Gail Shaw
SQL Server MVP
Go to Top of Page

lpace76
Starting Member

6 Posts

Posted - 2011-07-31 : 06:40:37
quote:
Originally posted by GilaMonster

This is most likely what happened: http://www.sqlservercentral.com/blogs/steve_jones/archive/2011/07/18/sql-server-backup-_1320_-inadvertent-striping.aspx

--
Gail Shaw
SQL Server MVP



You are RIGHT this is exactly what happened to me.
THANKS ALOT
Larry

Larry Pace
Go to Top of Page
   

- Advertisement -