Starting Database

  • Hello people,

    I am new to this site and relatively new to SQL, was wondering if anyone could help me.

    I'm trying to create a stand-alone server on my laptop for a VideoEzy store (AUS). The current store server is running SQL 2000 and so is the laptop. The problem is that everytime I try and start the POS software it just freezes. I've tried changing many things with no success. The service manager is "Started". I just dont know whether the database files are in the correct folders. I copied them from the currently running server onto a CD then onto the laptop. Where should they go? (I tried prog files/sqlserver....../data, still no luck).

    Ideas?

    Any help would be greatly appreciated

    Luke

  • What editon/version of SQL Server is installed on the Laptop and what OS is on the laptop?

    By edition/version, I mean:

    SQL Server 2000 or SQL Server 2005?

    MSDE, Express, Developer, Personal, Standard, or Enterprise?

    Standard and Enterprise editions require the OS be a server version OS.

    -SQLBill

  • Copying the files is the first step.  Attaching the files as a db, so the SQL Server knows they are a db, is the second.  In SQL Enterprise Mgr (2000) or SQL Server Mgt Studio (2005), navigate to the server & connect.  Right click the Databases node and select Attach.  In the Attach Database dialog, specify the name of the database to attach and navigate to the mdf file you copied to the laptop.  Verify the log file is correct or correct it and click the Attach button.  If all goes well, you will have a new db listed in the Databases node of the management tool.  You should be able to expand its nodes to view tables, etc. to verify the contents of the db.

    Assuming you are not using a SQL Server admin to connect to the db from the application, you will need to create any login(s) and associate the existing db user(s) needed for the application.  sp_change_users_login can be used to perform the login-dbuser association.

    HTH...

  • Ouch!!!! I just noticed what I missed before.

    copied them from the currently running server onto a CD then onto the laptop.

    Can't do that. No, No, No. If SQL Server databases are in use, you CANNOT copy them. The .mdf/.ldf files are in use and the copies will be unusable.

    Options:

    Backup up the databases (via SQL Server) while they are online. Restore the backup file to the laptop.

    or

    take the database(s) offline (Detach them or stop the SQL Server services), copy the .mdf/.ldf files, move them over to the laptop, attach the original database(s) on the original server and then attach the copies on the laptop.

    Refer to the SQL Server BOL (Books OnLine) for BACKUP DATABASE, RESTORE DATABASE, sp_detachdb, sp_attachdb.

    -SQLBill

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply