all groups > sql server replication > june 2006 >
You're in the

sql server replication

group:

How to Replicate an SQL Server 2000 Database


Re: How to Replicate an SQL Server 2000 Database Hilary Cotter
6/21/2006 12:00:00 AM
sql server replication:
Go to a command prompt and type hostname. This is your computer name

Then in QA do the following

EXEC sp_dropserver '(local)
GO
EXEC sp_addserver 'Name Returned from hostname', 'local'
GO

And then stop and start SQL Server. Try again.

Your users will be able to connect as before only they will be disconnected
as you restart.

Note further that you should be using transactional replication (assuming
all of your tables have primary keys).

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

How to Replicate an SQL Server 2000 Database Bondwireless
6/21/2006 5:12:01 AM
Hi, i am new to this so really need some helpfull and easy to follow
information so that i can successfully replicate my SQL Server Database.

Here is my dilema. I have a working SQL Server 2000 Database which has an IP
address and alias so can be connected to by the outside world. However on the
machine it is running on, it is called (local).

Now when i went to use the replication wizard it won't let me with my
database being called (local) and i can't seem to rename it without
re-registering it. Would this entail creating a new Database and copying all
the tables across? How would this effect my users connecting to my Database
(since there will be an introduction of a name for my database as apposed to
the one called (local))

Once this is all done, what are my options? Can i simply replicate my entire
database to another hard drive? Can i replicate it to another server running
SQL Server 2000 with no database configured? Or would i have to have a copy
of the DB already on the other server?

Once replication is done is there a way of keeping the databases
synchronised so that in the case of a failure on the first Server, i could
switch over to the backup Server? Would synchronisation be automatic or would
i have to do it manually?

Your answers would be greatly appreciated.

--
Regards
Glen Pankhurst
Re: How to Replicate an SQL Server 2000 Database Bondwireless
6/21/2006 5:32:02 AM
Hi Hilary,

I am assuming QA means Query Analyser?

If i do this in Query Analyser should i have the DB closed? As well as the
Apache Tomcat Windows which accept input from Clients and relay from DB?

Are you 100% sure this will not effect any of my coding or clients?
And do i just restart SQL or the Server?

Now regarding Replication, i am brand new to this... is there a way of just
replicating the database (mdl) files to another Hard Drive somewhere? Or do i
need to set up another machine with SQL Server and start replicating to this?

Thanks for your quick response.

--
Regards
Glen Pankhurst
Research & Development Manager


[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database Hilary Cotter
6/21/2006 10:08:23 AM
Hi Blondwireless.

I do mean Query Analyzer.

Your clients will be affected as you restart SQL Server;) but other than
that there will be some locking as the snapshot is generated and some
performance degradation (although slight 5-10% tops) as you are replicating.

For replication you will need a second machine with SQL Server running on
it. You could replicated to another database on the same server if you wish.

Exactly what are you trying to accomplish and why? This will help us with
further advice.

--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.

This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com



[quoted text, click to view]

Re: How to Replicate an SQL Server 2000 Database Bondwireless
6/21/2006 5:54:01 PM
Hi Hilary,

thank you for your advice.

Basically what i am trying to do is have a redundant and possibly faster
performing database that is scalable.

Replication as i understand it allows only 1 server to be active while the
other is replicated to.

I am weighing up Clustering vs Replication but i am not 100% sure what the
implications are. In either respect i gather we need a second server running
pretty much identical hardware, OS and software.
And with replication the hard drive inside the second server would be used
for the backup.
What about with clustering? I heard of a hard drive array. Could the hard
drives in the respective machines be configured to act as an array or do i
actually need to get some sort of external storage device that both can
access so that they can cluster to? If this is the case is any of the
database stored on the local servers or just on the cluster hard drive
sitting externally to both.

Will having a cluster array in an active active situation actually boost
performance as both servers respond to queries?
We are also currently using SQL Server 2000 and i heard clustering works but
is very slow with it. So, when i decide on a plan of attack i want to upgrade
to SQL 2005 anyway. (will this fix the the slow speed of clustering
apparently experience in SQL 2000)
--
Regards
Glen Pankhurst
Research & Development Manager


[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database Bondwireless
6/22/2006 7:10:02 AM
Hi again Hilary,

i had two problems trying your suggestion of renaming the SQL Database from
local to the computer name.

i logged into sql query analyser first as windows authentication and this is
what is got:

"Server: Msg 15015, Level 16, State 1, Procedure sp_dropserver, Line 28
The server '(local)' does not exist. Use sp_helpserver to show available
servers.
Server: Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 14
The server 'COMPUTERNAME' already exists."


Then i logged in as i do to administer the Database remotely and got this:

"Server: Msg 15247, Level 16, State 1, Procedure sp_dropserver, Line 18
User does not have permission to perform this action.
Server: Msg 15028, Level 16, State 1, Procedure sp_addserver, Line 14
The server 'COMPUTERNAME' already exists."
--
Regards
Glen Pankhurst
Research & Development Manager


[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database Bondwireless
6/22/2006 7:27:02 AM
Okay i tried what one of the error messages said to do, use "sp_helpserver"
which returned the name of the computer that i am trying to change local to.
So is it already called that?

But when i load Enterprise Manager and connect to the database the DB Name
under Edit SQL Server Registration Properties, Registered SQL Server
Properties, the server name is greyed out and says local.

When i try to replicate i get this message "SQL Server replication does not
support nicknames, such as "." or "(local)", as server names. Delete the SQL
Server registration for this server and register it using the actual server
name."

Do i really have to take the database plus applications offline. Register a
new database with the correct computer name and import the database files?
What will the implications be?
Will usernames and passwords be intact?
What would i have to recreate?
Is there anyway around this avenue?
--
Regards
Glen Pankhurst
Research & Development Manager


[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database MADNESS
6/26/2006 1:00:01 PM
Hi Bondwireless,

Delete the local ENT Manager registration on the server and add a new
registration using the SERVERNAME. You should then be able to setup
replication using this registration. Alternatively connect to the server from
your pc using the COMPUTERNAME as the registration and that should work also.

[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database mcoste66
9/25/2007 10:08:01 AM
I would like to butt in if I may...that still doesn't answer the main
question; will deleting the 'local' registration and creating a new
registration using the actual server name delete or otherwise mess with my
existing data in any way? (I would be using wizards to do this, not command
lines)

[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database Hilary Cotter
9/27/2007 12:00:00 AM
No, it won't you will have to recreate it yourself.

--
RelevantNoise.com - dedicated to mining blogs for business intelligence.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database mcoste66
9/27/2007 9:39:01 AM
What about any interfaces or connections of any kind that access the 'local'
database? If I delete that registration, then create a new one (using the
actual server name) enterprise manager should associate the database with the
new registration, correct? What about any and all connections like ODBC, etc?

[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database Hilary Cotter
9/28/2007 8:02:07 AM
They will be fine. Think of . or local as an alias of the NetBIOS name.
Replication needs the NetBIOS name for it to work, other application will
still be able to use the . and local aliases.

--
RelevantNoise.com - dedicated to mining blogs for business intelligence.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]
Re: How to Replicate an SQL Server 2000 Database mcoste66
9/28/2007 1:50:06 PM
Cool, thx...I'll try that.

[quoted text, click to view]
AddThis Social Bookmark Button