Wednesday, March 7, 2012

BETWEEN LAPTOP AND DESKTOP

Hi,

I want to jumpstart my learning of SQL Server so I downloaded the Express edition onto my desktop in the office and also onto my laptop. I usually connect the two machines (through a LAN) to update whatever I was able to do at home while in the office.

What should I do in order to view or edit whatever I started on the laptop from the desktop? Would the databases I create on one be accessible through the other machine for editing and the likes?

Glint.

hi Glint,

you first need connectivity.. if that has to be performed at work, this is not a problem, as you just plug the office lan cable and you are on..

actually you do not need SQLExpress to be installed at all in the desktop pc as your "server" is located in the laptop.. so you just need to (remotely) connect from desktop (client) to the laptop (server)..

SQLExpress installs by default disabling network connections, so you need to run the Surface Area Configuration tool to enable "remote connections" and run SQL Server Configuration Manager to verify the desired network protocol is enabled..

you can then "connect" to your laptop server providing the appropriate credentials.. (by default SQLExpress installs allowing only WinNT authenticated connections, but you can modify that behaviour at "run time" to accept standard SQL Server authenticated connections (providing userid and password) modifying a Windows registry key,
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer
LoginMode = 2
where MSSQL.1 identifies your "engine number".. if you only installed 1 instance MSSQL.1 should be ok... or, you can download (recommended anyway) the SQL Server Management Studio Express, the "official" GUI based management tool for SQLExpress, from http://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en, and connect via a trusted connection witl administrators permissions, select the server node, access it's properties and modify the "Server authentication" properties (Security tab) to "SQL Server and Windows Authentication mode"..

but this does not "copy or sync" your laptop "databases" to the office desktop.. if you need it to (copy), you have to "detach" the database you are interested wih, copy the relative physical files to the desktop, and attach the database there (see http://msdn2.microsoft.com/en-us/library/ms190794.aspx and http://msdn2.microsoft.com/en-us/library/ms187858.aspx for further info).. the very same task can be performed via a backup+restore action.. you backup a database (full backup) on the "server", copy the backup file to the destination machine, and restore there the database, http://msdn2.microsoft.com/zh-cn/library/9st0dc24.aspx

so you have the choice to "copy" your homework to the office pc, eventually work on it and finally re-copy all to the laptop for further homeworks, or just always connect to your laptop for office work as well..

please consider downloading Books On Line (BOL), the official and primary help resource for SQL Server at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx..

regards

|||Thanx, Andrea.

No comments:

Post a Comment