SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 work on .mdf home & office
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lpace76
Starting Member

USA
6 Posts

Posted - 07/23/2011 :  06:35:09  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 07/23/2011 :  06:48:01  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

Germany
8764 Posts

Posted - 07/23/2011 :  09:04:51  Show Profile  Visit webfred's Homepage  Reply with Quote
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

USA
6 Posts

Posted - 07/24/2011 :  12:33:53  Show Profile  Reply with Quote
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

USA
6 Posts

Posted - 07/24/2011 :  12:35:13  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 07/24/2011 :  13:13:44  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 07/24/2011 :  14:07:07  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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

USA
6 Posts

Posted - 07/24/2011 :  14:21:56  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 07/25/2011 :  00:28:15  Show Profile  Reply with Quote
did it work for you?

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

Go to Top of Page

lpace76
Starting Member

USA
6 Posts

Posted - 07/30/2011 :  17:21:59  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 07/31/2011 :  01:50:26  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 07/31/2011 :  04:34:35  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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

USA
6 Posts

Posted - 07/31/2011 :  06:40:37  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000