Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best way to share a database. 1

Status
Not open for further replies.

frankyberry

Programmer
Mar 15, 2007
33
US
I've been working on a database and recently, I've had to travel and wanted to work on this database away from the original computer location.

What is the easiest way for me to work on this same database without actually connecting to the original computer via VNC or something...

Is it recommended that I just copy the .mdf from location to location?

Thanks!
 
You can connect to any database server via SSMS as long as you have a login, access to the domain and if it is remote ,an open port through the firewall for you PC.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
Thanks for the quick reply!

I'm not too sure of how to properly access my home computer via remotely...so that restricts me slightly.

I will attempt to increase my knowldge of that but for now....can I copy the *.mdf?

Thanks again!
 
Yes you can. You would need to detach the database first. The copy the .mdf and .ldf files to your local computer. When you detach a database nobody can access it. (But it sounds like you are the only one that has access anyway.)
Right click on the database and select all tasks -> detach. Then copy the .msf and .ldf files. Don't forget to reattach your database.

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
It you can't take the database offline then you can do a backup and a restore instead.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
mrdenny: I've tried that and I recieve an error that states:
Code:
The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on c:\program files\Microsoft SQL Server\MSSQL.2\MSSQL\Data\HRDerby.mdf'. (Microsoft.SqlServer.Express.Smo)

Sorry for all that...hope that helps.
Mike
 
What path did you give for the backup file?

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
I copied the .mdf and .ldf files and attached them to the other computer Sql Server.

tahnks all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top