Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Help please? Tried moving installation directory of Cheftec (old restaurant management software) and broke the database(?) Expand / Collapse
Author
Message
Posted Wednesday, December 18, 2013 11:30 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, December 22, 2013 1:43 AM
Points: 3, Visits: 4
I had moved this program from an old, dying computer running xp to a new computer running windows 7. That worked just fine transporting the database files from c:\program files\cheftec to the same directory on the new computer. I tried moving the installation directory to a shared network directory so that we could potentially access it from other computers and now the whole things is broken, and I can't even access the program or the database on the original computer. I don't even care about running the program on other computers, I'd just love to get it back up and running in original condition.

The error message I am receiving from the program is as follows:

Cannot open database "DataDir" requested by the login. The login failed

ComputerName = CUBE-PC

User ID=sa;Initial Catalog=DataDir;Data Source=CUBE-PC\CSS;Application Name=ChefTec

User ID=sa;Initial Catalog=CTDir;Data Source=CUBE-PC\CSS;Application Name=ChefTec

I have next to zero knowledge with SQL but know enough to get around computers and provide any additional info you might need to help diagnose this problem. Any help is much appreciated as we are a small business and the company that sells this software won't provide any per instance support as we are out of our coverage period, and simply wants us to buy their new software and support package.
Post #1524450
Posted Wednesday, December 18, 2013 11:53 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
SQL Server is not a file-based database. Moving the files isn't enough. Someone (preferably someone with a mediocre of SQL knowledge) needs to log into the SQL instance on the new server and restore the backup (hopefully you took a backup, moving files is not guaranteed to result in a consistent, usable database) or if there's no backup attach the database files and hope they work.

You may also need to change connection strings or set up data sources on the new machine, depending what the app needs.

If I may suggest, find someone who knows SQL and get them in for a day or so to do what they can.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1524454
Posted Thursday, December 19, 2013 12:27 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, December 22, 2013 1:43 AM
Points: 3, Visits: 4
GilaMonster (12/18/2013)
SQL Server is not a file-based database. Moving the files isn't enough. Someone (preferably someone with a mediocre of SQL knowledge) needs to log into the SQL instance on the new server and restore the backup (hopefully you took a backup, moving files is not guaranteed to result in a consistent, usable database) or if there's no backup attach the database files and hope they work.

You may also need to change connection strings or set up data sources on the new machine, depending what the app needs.

If I may suggest, find someone who knows SQL and get them in for a day or so to do what they can.


GilaMonster, thanks for your reply.

I don't mean to argue, but wanted to give a bit more info that might be of use.

After transferring the files to the new computer, the program worked fine for nearly a year. This was simply copying the .mdf and .ldf files that seem to store everything. It was only after uninstalling the program and re-installing it to a different directory that everything went haywire. I was able to do a clean install of the program on my home computer today, copy the old database files and see all the info present. I do have a couple different backups of the entire directory where I believe all the data was stored.

If there is no other way around the problem I guess I will have to find someone versed in SQL to come in and fix my mess. But I'd love to give it another shot and see if there is a way to recover the data simply.
Post #1524463
Posted Thursday, December 19, 2013 12:42 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:43 PM
Points: 43,047, Visits: 36,206
jhaddow (12/19/2013)
After transferring the files to the new computer, the program worked fine for nearly a year. This was simply copying the .mdf and .ldf files that seem to store everything.


Then the app was still pointing at its old SQL instance. Copying SQL Server database files is NOT sufficient to get the database available and working in a new location, the files need to be attached to the instance or a backup (and I mean a database backup, not a file backup) restored, logins created with their passwords, permissions need to be set, etc.

If there is no other way around the problem I guess I will have to find someone versed in SQL to come in and fix my mess. But I'd love to give it another shot and see if there is a way to recover the data simply.


If you want to spend time fiddling, by all means. Figure out what database instance the app is trying to connect to (It's the machine called CUBE-PC, the SQL named instance called CSS), log in to that instance, make sure that the database that the app needs (DataDir) exists, if not attach the files or restore a database backup.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1524467
Posted Sunday, December 22, 2013 1:47 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, December 22, 2013 1:43 AM
Points: 3, Visits: 4
Thanks for your reply. Turns out all that was needed was to detach the databases and reattach. Datadir and CTdir were there but were empty. Pointing them at the backed up database files seems to have worked just fine.
Post #1525336
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse