Difference between revisions of "User:Allan Smith/sandbox"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(Created page with 'Working on some tweaks to the Cannot connect page == "Unable to connect to the database" == If you receive the "unable to connect to the database" error message there are a num...')
 
("Unable to connect to the database": time to save my work)
Line 4: Line 4:
  
 
If you receive the "unable to connect to the database" error message there are a number of possibilities to explain and correct it:
 
If you receive the "unable to connect to the database" error message there are a number of possibilities to explain and correct it:
 +
==Starting new content here==
  
 +
This error is accurate, the toolset is unable to connect to the database. This indicates that there was some kind of problem when SQL Server Express 2005 was installed. Unfortunately, this is common, but unpredictable. The toolset itself cannot diagnose what the problem is. This is kind of like the "Service Engine" light on your vehicle.  When it starts flashing, it means something is wrong, but it is a pretty general warning that does not give you much information on what is wrong, just that something is wrong.  The cause of it could be anything from a loose gas cap to a failed spark plug to some bad sensor.
 +
 +
When it comes to the cannot connect error, it can range from the long file path issue to interference from UAC, to permissions issues, to a conflict with an existing installation of SQL Server, to registry entries, to the location of the installation file on your computer. The list is long. Here is a troubleshooting guide to try and help you diagnose what particular problem is vexing you and how to repair it.
 +
 +
==Diagnosing the Problem==
 +
===Did SQL Server Install?===
 +
Check your Start menu and see if it installed at all.  Go to Start>>Program Files>>Microsoft SQL Server 2005.  If nothing exists here then there are two basic explanations:
 +
# When you ran the installer, you may have unchecked the option to Install MSSQL Express 2005 SP3.  If this is the case.  Try running the toolset installer a second time, make sure that you leave that option checked so that the installer will attempt to install SQL Server 2005.
 +
# Something went wrong with the SQL Server installation and it failed to install at all.  You can try installing the toolset again.  If this is unsuccessful, you can try downloading and installing it [[Manual database installation|manually]].
 +
 +
===Did the database get restored?===
 +
 +
===Are the Registry keys correct===
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
==Here is the old content==
 
* You can try setting up your database separately from the toolset installer. See [[Manual database installation]] for the steps needed to install MSSQL Express 2005 and configure it for use with the toolset manually.  Users have been successful by setting up the toolset this way.
 
* You can try setting up your database separately from the toolset installer. See [[Manual database installation]] for the steps needed to install MSSQL Express 2005 and configure it for use with the toolset manually.  Users have been successful by setting up the toolset this way.
  

Revision as of 19:33, 2 December 2009

Working on some tweaks to the Cannot connect page

"Unable to connect to the database"

If you receive the "unable to connect to the database" error message there are a number of possibilities to explain and correct it:

Starting new content here

This error is accurate, the toolset is unable to connect to the database. This indicates that there was some kind of problem when SQL Server Express 2005 was installed. Unfortunately, this is common, but unpredictable. The toolset itself cannot diagnose what the problem is. This is kind of like the "Service Engine" light on your vehicle. When it starts flashing, it means something is wrong, but it is a pretty general warning that does not give you much information on what is wrong, just that something is wrong. The cause of it could be anything from a loose gas cap to a failed spark plug to some bad sensor.

When it comes to the cannot connect error, it can range from the long file path issue to interference from UAC, to permissions issues, to a conflict with an existing installation of SQL Server, to registry entries, to the location of the installation file on your computer. The list is long. Here is a troubleshooting guide to try and help you diagnose what particular problem is vexing you and how to repair it.

Diagnosing the Problem

Did SQL Server Install?

Check your Start menu and see if it installed at all. Go to Start>>Program Files>>Microsoft SQL Server 2005. If nothing exists here then there are two basic explanations:

  1. When you ran the installer, you may have unchecked the option to Install MSSQL Express 2005 SP3. If this is the case. Try running the toolset installer a second time, make sure that you leave that option checked so that the installer will attempt to install SQL Server 2005.
  2. Something went wrong with the SQL Server installation and it failed to install at all. You can try installing the toolset again. If this is unsuccessful, you can try downloading and installing it manually.

Did the database get restored?

Are the Registry keys correct

Here is the old content

  • You can try setting up your database separately from the toolset installer. See Manual database installation for the steps needed to install MSSQL Express 2005 and configure it for use with the toolset manually. Users have been successful by setting up the toolset this way.
  • Ensure SQL Server (BWDATOOLSET): Open the SQL Server Configuration Manager (by default Start | Microsoft SQL Server 2005 | Configuration Tools | SQL Server Configuration Manager) and in the object tree in the left hand panel click on the SQL Server 2005 Services entry. Ensure entry for SQL Server (BWDATOOLSET) appearing in the right hand panel has a State of Running. If not select it and start it (either using the button on the toolbar or the option in the context menu).
  • One User has reported that this sequence of events works:
  • Uninstall SQL server and the Toolset from PC.
  • Delete C:\Program Files\Microsoft SQL Server
  • In Regedit, delete the following:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSSQLServer
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server
  • Reboot
  • Install Toolset with the SQL.
  • Sometimes disabling UAC (User Account Control) and reinstalling the toolset will allow the database to install properly.
  • SQL Server needs permission to read from the directory that the you have put the installation files, if it does not have permissions, it may be unable to import resources into the database. To correct this change the administrative privileges for the directory you're installing the toolset from.
  • If you already have MSSQLServer Express installed as part of a different program, the toolset may not get the correct configuration to use it. Run the toolset configuration program (configuretoolset.exe, in the same directory as the toolset itself) and then click "next" through the configuration wizard until you get to the "Content Database" field. It should read: "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bw_dragonage_content;Data Source=MSSQLDEV"
  • On Vista systems the toolset may need administrator privileges to read the database where it's installed but fail to prompt you for them. Try right-clicking the toolset's shortcut and selecting "Run as Administrator" from the dropdown menu.
  • Some users report that the installer fails to create the SQL database (e.g. your Dragon Age\toolssql\data folder is empty). You can enter the following command to try restoring the database manually (Change the paths to bw_dragonage_content.bak and your Dragon Age folder as appropriate): "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\"sqlcmd -S .\BWDATOOLSET -E -Q "RESTORE DATABASE bw_dragonage_content FROM DISK = 'C:\Program Files\Dragon Age\tools\dbbak\bw_dragonage_content.bak' WITH MOVE 'bw_dragonage_content' TO 'C:\Program Files\Dragon Age\tools\toolssql\Data\bw_dragonage_content.mdf', MOVE 'bw_dragonage_content_Log' TO 'C:\Program Files\Dragon Age\tools\toolssql\Data\bw_dragonage_content.ldf'"

You need to allow Users to Modify the DATA folder, before you can execute this command.

  • Some users have been successful simply installing from a more direct path (ie extract rars to a new folder C:\DAInstall and then run the exe file from that location rather than from a MSFT created My Documents path).
  • Its been observed that for some builds that the Toolset is not looking at the correct registry keys perhaps due to permission restrictions.
    1. First use the ConfigureToolset to set the correct string.
      If you don't use the default settings you can copy the string from from the ConfigureToolset tool otherwise use one of the following command line queries to get the connection string.
      Win32: reg query "HKLM\SOFTWARE\BioWare\Dragon Age\Toolset\Environment" /v DefaultDatabaseConnection
      Win64: reg query "HKLM\SOFTWARE\Wow6432Node\BioWare\Dragon Age\Toolset\Environment" /v DefaultDatabaseConnection
    2. Now run the following command line (substituting your connection string for the final value)
      reg add "HKCU\Software\BioWare\Dragon Age\Toolset\Environment" /v DefaultDatabaseConnection /t REG_SZ /d "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bw_dragonage_content;Data Source=.\BWDATOOLSET"
Double check your entry, a single incorrect character will cause the same "Unable to Connect" error.