Jump to content

Cannot change Repository to SQL Server


gardnerbp

Recommended Posts

I have installed the Community Edition with the default Firebird database on my Windows XP laptop. Everything works fine - client and server. I then followed the instructions on How to configure Plastic SCM with MS SQL Server as follows...

- created a new db.conf file in the server directory with server info on a remote SQL Server 2005 Enterprise named instance.

- stopped and restarted Plastic server

Then I created a new Workspace and added items to source control.

The problem is that the workspace and items got put into the Firebird database, not SQL Server! How can I get the server to use SQL Server? 8-[

Link to comment
Share on other sites

Ok, let's get our hands dirty then.

It seems Plastic SCM is NOT using the db.conf file you provided, for some reason.

I understand you're NOT interested in the .fdb (Firebird) files on your server's directory, right? If so, let's delete them.

1- Stop the Plastic SCM service

2- Delete the *.fdb files (NOTE: ONLY IF YOU DON'T have anything important on them... do not blame me later! :P)

3- Open a command line window

4- Go to your server's directory (tipically c:\program files\PlasticSCM\server)

5- run plasticd.exe --console (you'll start the server in console mode, great for debugging)

6- Wait a few secs and the server will print something like:

>plasticd --console

Creating ServerSink

Plastic SCM daemon up. 4.0.198.0 1825 ms startup time

(Ok, in your case instead of 4.0.198 will be something like 3.0.187.23 or so)

7- Press ENTER - you'll stop the program

8- Check if the *.fdb files are there again... if so... you're still using Firebird!! (triple check your db.conf)

9- If the *.fdb files are not there... then we've trouble connecting to SQL Server

10- Edit loader.log.conf. At the end of the file, make sure it looks like:

<root>

<level value="DEBUG" />

<appender-ref ref="ConsoleAppender" />

</root>

11- Run plasticd --console again and let's see why the conn against SQL Server is not happening (it will tell you why it is failing).

Hope it helps!

pablo

Link to comment
Share on other sites

OK, Here's what happened. Following the instructions showed that the .fdb files got recreated after I deleted them! So, the plasticd is ignoring my db.conf file.

Well, that's a fine kettle of fish! I changed my db.conf file slightly so that the <ProviderName> tag occupies 1 line instead of 3, i.e. <ProviderName>sqlserver</ProviderName>. This allowed plasticd to recognize sqlserver as the provider and it no longer created .fdb files.

Now the logs indicate that my login is failing to the remote SQL Server. No way that can be right! I am a sysadmin on the sqlserver box and administer many, many databases from my laptop. Here is the entire contents of my db.conf file:

<DbConfig>

<ProviderName>sqlserver</ProviderName>

<ConnectionString>SERVER=MSPM1BAPPD63\QUAL;trusted_connection=yes;DATABASE={0};</ConnectionString>

</DbConfig>

What could be wrong with how plasticd is trying to login? I'm assuming that it does some impersonation of my account, but its obviously not working right. Any more suggestions? [-o<

Link to comment
Share on other sites

Hi there!

Yes, yes, the values must go on a single line! Didn't we highlight it on the docu?? It is formatted differently to fit on the blog but we remark it must go in a single line.

That being said, let's go to the login issue: is it failing now with plasticd --console? It should run with your account, so no impersonation. If it fails as a service is because th SYSTEM account is not correctly authenticated by SQL Server.

Link to comment
Share on other sites

By the way, I do appreciate your help. o:)

Reading through the instructions on How to configure Plastic SCM with MS SQL Server, I still didn't see any warning about keeping the XML tags on one line in the db.conf file.

After reading through Plastic SCM Distributed, I realized that Plastic SCM is not meant to "reach out and touch" a remote SQL Server machine that has not had the SCM server components installed on it ??? So, architecturally, if I want to setup a centralized master "source of truth", I must install on my client laptop, AND install on the remote server, and then "point" the client to access the respository on [remoteserver]:8084 (for example) ?

Hopefully, I'm thinking correctly about this - I'm new to distributed SCM systems. I've spent all my time with VSS :-& Perhaps you can comment on setting up client and remote server as I've described.

P.S. Setting the db.conf file to point to my laptop's SQLEXPRESS instance works as expected. I now have Plastic SCM using SQL Server.

Link to comment
Share on other sites

> By the way, I do appreciate your help.

> Reading through the instructions on

> How to configure Plastic SCM with

> MS SQL Server, I still didn't see

> any warning about keeping the XML

> tags on one line in the db.conf file.

I just found it on the "oracle" instructions: "Note: remember ConnectionString and AdminConnectionString must go on one line". We MUST add it on all the articles!!

Miller, can you handle it? (BTW, just realized there's a format issue on the oracle entry...some format broken).

> After reading through Plastic SCM

> Distributed, I realized that

> Plastic SCM is not meant to

> "reach out and touch" a remote

> SQL Server machine that has not

> had the SCM server components

> installed on it ???

Uhm... no. Actually "distributed" has nothing to do with the database backend you use.

You can use SQL Server, MySQL, SQLite, Oracle... and be distributed. It has nothing to do with it.

And yes, you can access a remote SQL Server, but it doesn't mean your environment is distributed, they're totally different things.

So, to try to make it clear in the shortest possible way:

* Being distributed means you've several plastic scm servers collaborating with each other. Sample: one plastic scm server at each developer laptop.

* Storage: where the plastic data lives: it can be a Firebird database, a SQL Server one... a wide range of choices.

> So, architecturally, if I want

> to setup a centralized master

> "source of truth", I must install

> on my client laptop, AND install

> on the remote server, and then

> "point" the client to access

> the respository on

> [remoteserver]:8084 (for example) ?

You need to have a central server, and then you can decide whether

you want another one at your laptop (which is great to work disconnected)

or not (and directly work against the central server).

In case you install a server on your laptop, then SQL Server is probably

not the best choice (fine for the server, maybe too much overhead for the laptop),

although, as you already tried, it is perfectly doable.

In order to "work in a distributed way" maybe lighter things like Firebird or SQLite are better... up to you.

> Hopefully, I'm thinking correctly

> about this - I'm new to distributed

> SCM systems. I've spent all my time

> with VSS Perhaps you can comment

> on setting up client and remote

> server as I've described.

Hope it is clearer now with my answers above.

> P.S. Setting the db.conf file

> to point to my laptop's

> SQLEXPRESS instance works as

> expected. I now have Plastic

> SCM using SQL Server.

pablo

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...