Showing posts with label restored. Show all posts
Showing posts with label restored. Show all posts

Wednesday, March 21, 2012

Replication problem

Hi,
I have two different servers Server1 and Server2. I had a database DB1 on Server1 which I restored onto the server Server2 with the same name DB1. Then I deleted the database DB1 from the server Server1. Now when I try to establish snapshot replication of DB1 from Server2 onto the Server1, I'm getting the following error.

"A connection could not be established to Server1 - Cannot open default database '<ID>'. Using master database instead.
Please verify SQL server running and check your SQL server registration properties (by right-clicking on the Server1 node) and try again."
DB1 was the default database on Server1 which I deleted after restoring the same onto Server2.
Now I'm not even able to connect to server1.

I'm using the user SA.

Thanks in advance.
Regards,
P.C. VaidyanathanYou must remember that when you copy a database from one server to another while users UIDs may be copied across inside the databse, they have the same name in the database and on the new server .....BUT...... the user ids are a match in name ONLY!!

Each user ID has an SUID ( 24 bit hex value I think ) that is unique for each UID on the server and in the copied over database. So, to make the UIDs line up in the databse with UIDs already defined on the new server, you need to run a special stored procedure called sp_change_users_login ( see books on line (BOL)) to map the UIDs so at they match on the UIDs. This maps the SUIDs such that UID "testuser" on your server matches UID "testuser" in the copied over database.

I have done this serveral times with minimal hassles.

Try this first, & see how you go. Post back if problems.

Cheers

J.

Friday, March 9, 2012

Replication Objects are still there.....

I restored a db to a new server, executed the following;
exec sp_removedbreplication 'ADAGE'
go
exec sp_dboption 'ADAGE', 'published', 'FALSE'
go
exec sp_dboption 'ADAGE', 'merge publish', 'FALSE'
go
Yet, the ADAGE db still has views like sync%
Did I miss a step necessary to remove all traces of replication on this db?
Do I have to manually remove these objects?
I want to use this database to replicate to (New Publication / Subscription), but I first want to make sure all traces of previous replication are gone.
JLS
you missed the manual delete step. But you really don't have to do this. When you reinstall replication or recreate a publication it will whack the objects it doesn't need anymore or create new names.
Hilary Cotter
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
"JLS" <jlshoop@.hotmail.com> wrote in message news:%23DNr6Nk2FHA.2816@.tk2msftngp13.phx.gbl...
I restored a db to a new server, executed the following;
exec sp_removedbreplication 'ADAGE'
go
exec sp_dboption 'ADAGE', 'published', 'FALSE'
go
exec sp_dboption 'ADAGE', 'merge publish', 'FALSE'
go
Yet, the ADAGE db still has views like sync%
Did I miss a step necessary to remove all traces of replication on this db?
Do I have to manually remove these objects?
I want to use this database to replicate to (New Publication / Subscription), but I first want to make sure all traces of previous replication are gone.
JLS
|||Ok, great, Thanx!!!!
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message news:%234Jhehk2FHA.3416@.tk2msftngp13.phx.gbl...
you missed the manual delete step. But you really don't have to do this. When you reinstall replication or recreate a publication it will whack the objects it doesn't need anymore or create new names.
Hilary Cotter
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
"JLS" <jlshoop@.hotmail.com> wrote in message news:%23DNr6Nk2FHA.2816@.tk2msftngp13.phx.gbl...
I restored a db to a new server, executed the following;
exec sp_removedbreplication 'ADAGE'
go
exec sp_dboption 'ADAGE', 'published', 'FALSE'
go
exec sp_dboption 'ADAGE', 'merge publish', 'FALSE'
go
Yet, the ADAGE db still has views like sync%
Did I miss a step necessary to remove all traces of replication on this db?
Do I have to manually remove these objects?
I want to use this database to replicate to (New Publication / Subscription), but I first want to make sure all traces of previous replication are gone.
JLS

Wednesday, March 7, 2012

Replication Monitor error

Hi, There was trans-Rep setup on a server which was swap out with an new server. The database were backup and then restored. Replicaito was not working. I disable replication and then set the server up for a distribution. With out setting up any publi
shers there is a error on the replication monitor. I can't find where this error is. I did not set anything up yet. Is there a table I can check?
run this proc sp_MSload_replication_status
"Russ" <anonymous@.discussions.microsoft.com> wrote in message
news:8CBC3E88-E6FD-4E6B-B267-A3A5E5AC2F22@.microsoft.com...
> Hi, There was trans-Rep setup on a server which was swap out with an new
server. The database were backup and then restored. Replicaito was not
working. I disable replication and then set the server up for a
distribution. With out setting up any publishers there is a error on the
replication monitor. I can't find where this error is. I did not set
anything up yet. Is there a table I can check?
|||I cant find this stored procedure. Is this somthing that comes with SQL?
-- Hilary Cotter wrote: --
run this proc sp_MSload_replication_status
"Russ" <anonymous@.discussions.microsoft.com> wrote in message
news:8CBC3E88-E6FD-4E6B-B267-A3A5E5AC2F22@.microsoft.com...
> Hi, There was trans-Rep setup on a server which was swap out with an new
server. The database were backup and then restored. Replicaito was not
working. I disable replication and then set the server up for a
distribution. With out setting up any publishers there is a error on the
replication monitor. I can't find where this error is. I did not set
anything up yet. Is there a table I can check?
|||yes, it should be in the master db.
what version of SQL Server r u running.
"Russ" <anonymous@.discussions.microsoft.com> wrote in message
news:374639C1-95A1-48E9-90AC-CCA6C44F8D07@.microsoft.com...
> I cant find this stored procedure. Is this somthing that comes with SQL?
> -- Hilary Cotter wrote: --
> run this proc sp_MSload_replication_status
>
> "Russ" <anonymous@.discussions.microsoft.com> wrote in message
> news:8CBC3E88-E6FD-4E6B-B267-A3A5E5AC2F22@.microsoft.com...
an new
> server. The database were backup and then restored. Replicaito was
not
> working. I disable replication and then set the server up for a
> distribution. With out setting up any publishers there is a error on
the
> replication monitor. I can't find where this error is. I did not
set
> anything up yet. Is there a table I can check?
>
>