1

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Due to computer problems the MS SQL provided with v 6.9.3 has become corrupted. I have since removed it, wishing to reinstall. Reinstall from disk has given me a version which is not tied in with RECORDER. The original Folder with Data File and Log are still there.

Is it possible to reinstate the SQL server retainning my original RECORDER setup and data.

Help anyone? :o

2

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

To fix this, yuo will need access to a database tool such as Enterprise Manager or SQL Server Management Studio. There are 2 things you need to do. The first is to attach the data file and log to the SQL Server. The second is to run the following SQL which will "patch up" the username and server login so that Recorder can use this database:
sp_change_users_login 'update_one', 'nbnuser','nbnuser'

If you post back here some information about which database management tool you have available then I'm sure we can sort out some more specific instructions.

John van Breda
Biodiverse IT

3

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

In case you didn't know, you can download SQL Server Management Studio Express (why does Microsoft insist on using such awfully prolix names?) for free from the Microsoft website:

http://www.microsoft.com/downloads/details.aspx?FamilyId=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en

Although it doesn't say so on that page, it does in fact let you manage MSDE and SQL Server 2000 in addition to SQL 2005.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

4

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Thanks John and Charles for your guidance. I will report back to let you know the outcome. Charles I would have been lost without you link to SQL Server Management Studio Express and Johns instructions.

5

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

John,

I have done as Charles has suggested, albeit slightly more difficult then expected due to my computer not having MS Framework v2 and subsequently not the most recent MS Installer program but we got there. So now you are aware of the Management tool that I have i.e Studio Express. Could please now give more direction, as suggested by yourself.

As an aside when I loaded the SQL server from the Recorder 6 disk it has only given me the one SQL Server. When originally loading Recorder without an SQL server in place it gave me one with a file name MSSQL an another MSSQL$RECORDER. The one which is running at present is loaded under the file MSSQL and appears to have adopted the full computer name. I am using a standalone version.

Many thanks for you time.

Peter

6

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hi Peter,

I have SQL Server Management Studio (not the Express edition) and I've just found out that I can't install the Express edition on the same machine. I'll give you the instructions according to my version, hopefully they will work but if not perhaps someone with SQL Server Management Studio Express can translate them?
Step 1 - attach the database file: Start Management Studio and connect to the SQL Server Instance you want the database to be attached to, using a login that has system administrator rights. If you are a local machine administrator then you ought to be able to just use the Windows Authentication option in the Authentication combo box.
Now, right click on the Databases folder and select Attach. In the following dialog, click the Add button and browse to your database's MDF file then click Ok.
In the Attach Databases screen, select 'sa' in the Owner column of the top grid listing the databases to attach, then click Ok to attach it.
Step 2 - fix the database user and server login. To do this, click New Query, select NBNData from the combo box in the toolbar, type in the following SQL and execute it:
EXEC sp_change_users_login 'update_one', 'nbnuser', 'nbnuser'

That's it - you should now be able to connect to the database using Recorder. Let us know if this isn't clear though,

Regards

John van Breda
Biodiverse IT

7

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

John,

Your instructions were clear and the process of attachment worked. There was an operator error though and the database is attached but the instruction on choosing 'sa' was missed due to being unfamiliar with Management Studio Express. The ownership of the database has been transferred to my machine. Hence your query failed. I disconnected and repeated the process but as you probably realise the database did not revert to the original owner. Tried to see if I could change this using a query but out of my league. The upside is I am beginning to understand the function of a SQL Server and what parts to backup.

Thanks for your support
Peter

8

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hi Peter,

You should be able to right-click on the NBNData database and detach it, then repeat the process this time being careful to select the owner as 'sa'. Is this what you meant when you said you disconnected and repeated the process?

John van Breda
Biodiverse IT

9

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hi John,

The detach (disconnect) and attach process is the one I was refrerring to. I have tried this several times but the owner column does not recognise another owner (i.e. 'sa') on re-attachment.

As a single user I feel I may be using up your valuable time.

Thanks,
Peter

10

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hi Peter,

There is another way of changing the owner, that is to run the following Query:

USE NBNData
EXEC sp_changedbowner 'sa'

However, the only thing I can think of that might cause 'sa' not to appear in the list of options when attaching the database is a permissions problem, so it may be that this script will also fail. If it does, let us know the error message.

I'm glad to help,

John van Breda
Biodiverse IT

11

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hello John,

Sorry for the delay but other things took priority. What you suggested worked with no problem. The original SQL  query: EXEC sp_change_users_login 'update_one', 'nbnuser', 'nbnuser' also worked with the modification 'NBNuser'.

Now the bad news, Recorder does not log on and throws up the following: An error occurred whilst starting the application.
EOleException[DBNETLIB] Connection Open (Connected)] SQL Server does not exist or access denied.

Any thoughts?

Thanks Peter

12

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Assuming that your SQL Server is definitely started, then the first place I would check is your registry to make sure that Recorder is pointing at the right server instance name. The registry setting you need can be found by running regedit and browsing to HKEY_LOCAL_MACHINE\SOFTWARE\Dorset Software\Recorder 6. In this key there is a value for Server Name which should be set to point to the name of the instance you have just setup the Recorder database on.  You should be able to get the correct value for this from the SQL Server Management Studio Express Connect to Server dialog (i.e. the login box) in the Server Name edit box.

Let us know how you get on,

Regards

John van Breda
Biodiverse IT

13

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hello John,

Completed above but Login failed for user 'NBNUser'. Reason :Not associated with a trusted SQL Server.

Thanks for your patience.

Peter

14

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

One more thing to check, if you installed the SQL Server instance directly from disk yourself rather than through the install kit you need to open SQL Server Management Studio express, right click on the server and select Properties. Under Security, please check that the option "SQL Server and Windows Authentication mode" is checked.

Regards

John

John van Breda
Biodiverse IT

15

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

John,

The Properties dialogue shows that the "SQL Server and Windows Authentication mode" is unchecked. Changing to this setting requires a password to be input BUT fails with the following:
Operation is not valid due to current state of object (Microsoft. Sq\Server.Express.Aq\Manager UI).

Help shows SQL Server and Windows Authentication mode
Uses mixed mode authentication to verify attempted connections, for backward compatibility with earlier versions of SQL Server. If the sa password is blank when the security mode is being changed, the user is prompted to enter an sa password.

Note: 
Changing the security configuration requires a restart of the service. When changing the Server Authentication to SQL Server and Windows Authentication mode the SA account is not automatically enabled. To use the SA account, execute ALTER LOGIN with the ENABLE option.

Hope this is useful.

Many Thanks
Peter

16

Re: Lost SQL Server for Recorder 6.9.3 updated 6.10 (Stand alone version)

Hi Peter,

Do you have a safe backup of the nbndata_data.mdf and nbndata_log.ldf files? If not, I suggest you create one and also back up your User Files folder from the Recorder installation, then uninstall Recorder and also uninstalled the MSDE instances you have (under Microsoft SQL Server Desktop Engine in the add/remove programs list). Now, reinstall Recorder from the CD and allow it to create an MSDE instance.

Once you have Recorder up and running, close Recorder then use Management Studio Express to detach the NBNData database. Copy your backed up mdf and ldf files into the C:\Program Files\Microsoft SQL Server\MSSQL\Data folder (presuming you used the default instance name). Now reattach these files, and finally run the script as described previously:

USE NBNData 
EXEC sp_changedbowner 'sa'

Finally, replace any files in your User Files directory if there are any you wanted to keep. Hopefully that's it.

Good luck

John

John van Breda
Biodiverse IT