SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help please? Tried moving installation directory of Cheftec (old restaurant management software)...


Help please? Tried moving installation directory of Cheftec (old restaurant management software) and broke the database(?)

Author
Message
jhaddow
jhaddow
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 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.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235350 Visits: 46376
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, MVP, M.Sc (Comp Sci)
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


jhaddow
jhaddow
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 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.
GilaMonster
GilaMonster
SSC Guru
SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)SSC Guru (235K reputation)

Group: General Forum Members
Points: 235350 Visits: 46376
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, MVP, M.Sc (Comp Sci)
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


jhaddow
jhaddow
SSC Rookie
SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)SSC Rookie (35 reputation)

Group: General Forum Members
Points: 35 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search