Aller au contenu

Photo

Unable to connect to database


  • Veuillez vous connecter pour répondre
156 réponses à ce sujet

#126
Ceneen

Ceneen
  • Members
  • 10 messages
Ok, this is quite some guesswork as this is from google ;) this answer was given multiple times though, so it may have it's validity:

If a database is restored and the WITH NORECOVERY option was specified,
it will be left in a restoring state to allow Transaction Log backups
to be applied to perform a point in time recovery.  To bring the
database online, all you have to do is run the following command:

RESTORE DATABASE <databasename> WITH RECOVERY

This will start recovery of the database and bring it online for use.


Link for the information: http://social.msdn.m...ff-60d2602f88be

So I guess something like replacing that long RESTORE line with the shorter one specified in the quote and inserting the database name where specified, might do the trick. Disclaimer: I do not understand why and how, but at least google comes up with a couple similar responses.

#127
Ubasti

Ubasti
  • Members
  • 116 messages
Thanks again, though I already started to manually install the SQLserver. Only problem with it is (again), that in the wiki it says I should get these two files:

bw_dragonage_content.ldf
and
bw_dragonage_content.mdf

but I just can't find them anywhere on my computer, not even with file search. So for some reason the SQLserver doesn't make them, even though I have followed every step through the wiki here:
http://social.biowar...se_installation

It also seems that parts of that wiki still are made for the first release of the toolset, not the one with the newest patch.

I'm actually slowly beginning to think that I should just give up. Or then try to find some computer genious to help me.

Modifié par Ubasti, 12 janvier 2010 - 03:19 .


#128
e-ver

e-ver
  • Members
  • 228 messages
I too can't use the toolset because of this "unable to connect to database" error. I've been trying for a month to get it to work (not continuously, I've given up countless times in frustration, only to come back later, because I'd *really* like to mod this game). So I'm hoping someone here might be able to help me.

With the information on the wiki, I managed to establish that the error is caused by the database not being restored in my case (surprise!). Unfortunately all my attempts of doing this failed. I've tried both the database restore batch file and the manual use of the commend line. I'd like to avoid having to install SQL Management Studio, simply because I don't want to install stuff on my computer that I don't really need for anything else then getting other stuff to work properly.

I've made some progress in my attempts to restore the database, but I'm now at a loss how to go on. While in the beginning, restoring anything simply failed due to files not being found etc, I'm now getting a very specific error. Here's the entry from the restore batch log:

Restore Batch File initated on 26.01.2010 at  8:57:05,96
using the following config.ini settings:
         -------------------------------------------
         Backup/Restore Config file
         [SQL Server Name]
         .\\\\SQLEXPRESS
         [Database Name]
         bw_dragonage_content
         [Path to Directory to Save new Backup files to]
         c:\\\\Backups\\\\
         [Name of New Backup File]
         DABackup001.bak
         [Path to Directory Containing Existing Backup Files]
         D:\\\\Dragon Age\\\\tools\\\\dbbak\\\\
         [Name of Existing Backup File to Restore]
         bw_dragonage_content.bak
         -------------------------------------------
 
Following command line being executed:
sqlcmd -S .\\\\SQLEXPRESS -E -Q "RESTORE DATABASE bw_dragonage_content FROM DISK = 'D:\\\\Dragon Age\\\\tools\\\\dbbak\\\\bw_dragonage_content.bak' WITH REPLACE"
 
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
 
Restored from backup located at: D:\\\\Dragon Age\\\\tools\\\\dbbak\\\\bw_dragonage_content.bak
 
Batch File completed at  8:57:18,46


When using the command line, I get an error as well, telling me that:

Sqlcmd: Error: Microsoft SQL Native Client: An error has occurred while
establishing a connection to the server. When connecting to SQL Server
2005, this failure may be caused by the fact that under the default
settings SQL Server does not allow remote connections.


I've followed the instructions on this website to allow remote connections and everything seems to be as it should be, except for the fact that I'm still getting the same error.

I'm at a loss what to try next. The main problem is of course, that I know next to nothing about the SQL Server program and so I'm just stumbling around in the dark here, following advice found here and on other websites, but not really understanding what I'm doing. Does anybody have an idea what to do to fix this? Any help would be most appreciated!

Modifié par Allerleihrau, 26 janvier 2010 - 08:13 .


#129
Wislander

Wislander
  • Members
  • 2 messages
If you have problems with the test database to see if you can solve with this guide..

http://mmo-colosseum...p?f=15&p=55#p55

#130
Eshme

Eshme
  • Members
  • 756 messages
I have put the infamous command line solution into a more readable ,correct and foolproof coat on the wiki. Just for those who have problems applying it themselves. The only other solution on the wiki is using management studio, which i didnt touch

Look here

http://social.biowar...er_Installation

Modifié par Eshme, 03 février 2010 - 06:17 .


#131
Eshme

Eshme
  • Members
  • 756 messages
http://social.biowar...er_Installation



well this forum sucks big time, whats with the editing

#132
CID-78

CID-78
  • Members
  • 1 124 messages
if i get this:



Msg 262, Level 14, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

CREATE DATABASE permission denied in database 'master'.

Msg 3013, Level 16, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

RESTORE DATABASE is terminating abnormally.



when trying to create the database via restore, where should i change permissions? i did run the restore as admin.



and if I test´the database there is no database in place called "bw_dragonage_content". but the service is running.



i have verified the paths and I can bet it has something todo with win7 64bit permission restrictions.

#133
Eshme

Eshme
  • Members
  • 756 messages
Did you use the command line stuff that is on the wiki? Well i can see the problem. Its windows 7 mmh

#134
Eshme

Eshme
  • Members
  • 756 messages
Added something. See if that helps



http://social.biowar...#Error_Handling

#135
Razhathael

Razhathael
  • Members
  • 404 messages
Eshme, thank you so much. Finally got it to work!

#136
Eshme

Eshme
  • Members
  • 756 messages
tee welcome =)

#137
CID-78

CID-78
  • Members
  • 1 124 messages
okey i got a step further, I had to do the SQL server admin step for win7 aswell.

but now i get this: which is a bit odd , i Have checked the regestry and it says the correct path ie (x86) and so do my config.ini. Why does it look in the regular program file folder? where is the file that has those crappy settings?





+=================================================================+

+=================================================================+

Restore Batch File initated on 2010-02-03 at 22:54:11,95

using the following config.ini settings:

-------------------------------------------

Backup/Restore Config file

[SQL Server Name]

.\\BWDATOOLSET

[Database Name]

bw_dragonage_content

[Path to Directory to Save new Backup files to]

C:\\Program Files (x86)\\Dragon Age\\tools\\dbbak\\

[Name of New Backup File]

DABackup001.bak

[Path to Directory Containing Existing Backup Files]

C:\\Program Files (x86)\\Dragon Age\\tools\\dbbak\\

[Name of Existing Backup File to Restore]

bw_dragonage_content.bak

-------------------------------------------



Following command line being executed:

sqlcmd -S .\\BWDATOOLSET -E -Q "RESTORE DATABASE bw_dragonage_content FROM DISK = 'C:\\Program Files (x86)\\Dragon Age\\tools\\dbbak\\bw_dragonage_content.bak' WITH REPLACE"



Msg 5133, Level 16, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

Directory lookup for the file "C:\\Program Files\\DAODB\\Data\\bw_dragonage_content.mdf" failed with the operating system error 3(Det g†r inte att hitta s”kv„gen.).

Msg 3156, Level 16, State 3, Server HP-DATOR\\BWDATOOLSET, Line 1

File 'bw_dragonage_content' cannot be restored to 'C:\\Program Files\\DAODB\\Data\\bw_dragonage_content.mdf'. Use WITH MOVE to identify a valid location for the file.

Msg 5133, Level 16, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

Directory lookup for the file "C:\\Program Files\\DAODB\\Data\\bw_dragonage_content.ldf" failed with the operating system error 3(Det g†r inte att hitta s”kv„gen.).

Msg 3156, Level 16, State 3, Server HP-DATOR\\BWDATOOLSET, Line 1

File 'bw_dragonage_content_log' cannot be restored to 'C:\\Program Files\\DAODB\\Data\\bw_dragonage_content.ldf'. Use WITH MOVE to identify a valid location for the file.

Msg 3119, Level 16, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

Problems were identified while planning for the RESTORE statement. Previous messages provide details.

Msg 3013, Level 16, State 1, Server HP-DATOR\\BWDATOOLSET, Line 1

RESTORE DATABASE is terminating abnormally.



Restored from backup located at: C:\\Program Files (x86)\\Dragon Age\\tools\\dbbak\\bw_dragonage_content.bak



Batch File completed at 22:54:16,36

+=================================================================+

+=================================================================+


#138
Eshme

Eshme
  • Members
  • 756 messages
Well this seems easy.. But you used the wrong bat file. I need to do something first, then i explain.

#139
Eshme

Eshme
  • Members
  • 756 messages
You cant use the restore.bat file, which came with the Toolset. It doesnt work for you.



You need to create a bat file as posted on

http://social.biowar...er_Installation



Then follow the instructions and change the SOURCE and TARGET accordingly. You probably know that.

#140
CID-78

CID-78
  • Members
  • 1 124 messages
Okay the toolset is up and running now on my win7 laptop.

#141
Eshme

Eshme
  • Members
  • 756 messages
very well ^^

#142
Llionei

Llionei
  • Members
  • 14 messages
I had the same problem, but in my case it showed ...is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.

So if you have such problem just simply right-click on Data folder, select the advanced properties of the files & un-check -
compress contents to save disk.

Now it's working fine.

#143
TaHol

TaHol
  • Members
  • 412 messages
Win7, 32 bit here, and I want to cut my wrists. I shouldn't have problems with administrations, 'cos I don't use UAC. It is disabled, always. I have tried all other things here except the command-line, for that goes beyond my brains. I can't even find the data-folder. I can't make the freaking search to find hidden folders for me. Why SQL, why??? *cries and gives up...3rd time*








#144
CID-78

CID-78
  • Members
  • 1 124 messages
UAC isn't the only security in place so don't think you can ignore all admin stuff because you have disabled it. (which you don't need todo to run the toolset), so follow the step and don't skip anything.



and you might need to actually get dirty and use the console, write and edit a .bat file or interface with the database utility. some things are worth working hard for.

#145
TaHol

TaHol
  • Members
  • 412 messages
Eshme (or anyone who knows this), what is the SET TARGET location in Windows 7 ? I have no C:\\Program Files\\Dragon Age\\tools\\toolssql\\Data. So what I should put instead?


#146
CID-78

CID-78
  • Members
  • 1 124 messages

TaHol wrote...

Eshme (or anyone who knows this), what is the SET TARGET location in Windows 7 ? I have no C:\\\\Program Files\\\\Dragon Age\\\\tools\\\\toolssql\\\\Data. So what I should put instead?


C:\\Program Files (x86)\\DAODB\\Data for 64 bit windows

and

C:\\Program Files\\DAODB\\Data for 32 bit windows

#147
TaHol

TaHol
  • Members
  • 412 messages
Thank you, found it. Now I just have to make the crap work.

I can't believe it. It is working with Eshmes .bat-restore-thingy. I did it. I feel like winner here!

Modifié par TaHol, 24 avril 2010 - 01:44 .


#148
Nesitino

Nesitino
  • Members
  • 1 messages
I got the bw_dragonage_content files in my data folder, thx to your help, but the toolset still don't want to launch. Any idea ?

#149
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
http://social.biowar...er_Installation



worked for me! and thankfully an easy solution.



however, i had to use the option to change the TARGET to C:\\DB to get it to write. but now i can't move those files into the tools\\toolssql\\data directory. am i supposed to? the toolset is working, so i guess i shouldn't complain :X


#150
stoneharded

stoneharded
  • Members
  • 9 messages
hi just want to post something to help 2 worked for me when u install datoolset generally when u open sql server 2005 and connect to bwdatoolset u'll get the message that the databas is restoring "bw_dragonage_content(restoring)" use link http://social.biowar...kup_and_restore