Showing posts with label operating. Show all posts
Showing posts with label operating. Show all posts

Wednesday, March 28, 2012

How to remove replication?

i used to the sql built to remove replication,but after i remove all replication,operating table of the database still report having replication conflit.why and how to remove all replication clearly?
thanks.
If the database is no longer involved in replication as a publisher or a
subscriber then you can use sp_removedbreplication.
HTH,
Paul Ibison
|||Hello all,
I think we have the same or similar problem.
We have removed the replication by using the Enterprise Manager, but we are still not able to alter tables.
We also tried to use sp_removedbreplication, but received the same error message after trying to alter the table.
Is there any way to remove old replication information from the DB?
Regards,
Marc
/*
Tuesday, May 11, 2004 9:55:10 AM
User:
Server: XXXXXX
Database: meas
Application: MS SQLEM - Data Tools
*/
'tTestNode' table
- Unable to rename column from 'Name' to 'qName'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot rename the table because it is published for replication.
|||There is a stored procedure to do this called sp_MSunmarkreplinfo which
takes a tablename as a parameter. Alternatively, setting replinfo to 0 in
sysobjects for the particular table should do it.
Regards,
Paul Ibison
|||you can safely issue a drop table statement to remove these tables. I normally do this
select 'drop table '+name from sysobjects where type='u' and name like '_onflict%' and status<0
the in the results portion I will have the drop table statements to drop these objects. I paste this into qa and run them.
Do this only if you have no active merge, queued or immediate updating publications in the database.

Monday, March 19, 2012

How to recreate/restore the database from the data and log files

My development system hard disk crashed and I have lost the Operating
system and the SQL executables and the system cannot be salvaged.
However at the time of the crash the server was not running and the
log files and the data files of the database were on another hard
disk. I have managed to successfully recover the data and log files of
the database.
I would greatly appreciate if you could kindly show me the
procedure/process to restore the data and log files and bring the
database to life on a new SQL instance.
Please give me the command sequence to resurrect the database.
Thanks
KarenKaren,
1) Reinstall SQL Server and place the data files in the same directory
structure as before.
2) Apply the same service pack level that you had before
3) Stop the MSSQLServer service
4) Copy your old data files into your current DIR structure
5) Start the MSSQLServer service
It should all work beautifully.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Karen Middleton wrote:
> My development system hard disk crashed and I have lost the Operating
> system and the SQL executables and the system cannot be salvaged.
> However at the time of the crash the server was not running and the
> log files and the data files of the database were on another hard
> disk. I have managed to successfully recover the data and log files of
> the database.
> I would greatly appreciate if you could kindly show me the
> procedure/process to restore the data and log files and bring the
> database to life on a new SQL instance.
> Please give me the command sequence to resurrect the database.
> Thanks
> Karen