Can't Delete Database That Has Been Part Of Replication
Feb 7, 2007
I had a publication (merge) setup for a database. Deleted the publication and tried to delete the database. Sql server says it can't be deleted because it's has replication setup. Bug??
View 1 Replies
ADVERTISEMENT
Feb 7, 2007
I setup replication (merge) for a test db with 11 tables. Deleted the publication and want to delete the database itself. Sql server says it can't be deleted becuase it's has replication setup! Bug??
View 1 Replies
View Related
Mar 4, 2007
I am about to apply DBCC DBREINDEX to a large database that is part of transactional replication and synchronised every 3 minutes. What are the likely implication and what precautions I must take.
Thanks in advance
Regards
R Suresh
View 1 Replies
View Related
Oct 31, 2014
i have a column name remarks and i want to retrieve data like by deleting some of the leading charaters and some last characters and show the middle one.
like remarks has CALLTRANSFER_OVER_SIP:XfrTime=86.05599975585938_en and i want to show only "XfrTime=86.05599975585938" this much
View 3 Replies
View Related
Jun 19, 2008
Thanks everyone for being helpful. I am new to SQL Server and don't have many coworkers so I am relying heavily on this forum's help.
It seems the previous poster on this issue was able to work it out but I am still not able to get it to work.
I have tried using the server URL, the server machine name, the ipaddress with alias, but still cannot connect with the replication over vpn. Any ideas?
Also, how can I set the subscriber from the server? How do I refer to the subscriber machine? Let's say it is my pc that I want to make changes in and have them replicate to the server? When I specify a pull subscription I am not show how to refer to my computer.
View 4 Replies
View Related
Jul 13, 2007
SQL2000 used to send a 2 part update using sp_msdel followed by sp_msins instead of just calling sp_msupd. I thought this used to happen on tables with compostie primary keys. Does any know know if this still occurs in SQL2005 and maybe why?
View 1 Replies
View Related
Feb 9, 2015
SQL 2012 Ent SP2
Database is in simple recovery mode, and published with transaction replication push subscription, just one subscriber but the database is huge. I don't want to overwrite the schema at the subscriber either.
I had to run an alter database command on a published database, it created so many logs that an extra drive had to be added along with an extra log file to accommodate all the logs.
The problem I have is I'd like to know clear the file of logs so I can drop the temporary log file, and give the drive back, but I cannot.
I have tried dbcc shrinkfile with the emptyfile option but it never clears, I have also tried it with notruncate and truncateonly options (mainly out of desperation).
I do not need to worry about point in time restore as a full backup is taken before and after the operation. After which the database will be put back into Full recovery mode.
I have looked at log_reuse_wait_desc and the file says 'Replication', so I am now thinking the file cannot empty because replication is keeping one of the VLFs active. I tried dropping and recreating the subscription hoping it might free something up and I could get somewhere, but it made no difference.
Do I have to remove replication completely to get round this? Surely not.
I have also tried putting the database back into full recovery mode, doing a full DB backup, and a transaction log backup, but its made no difference, which is also what makes me think a portion of the log is still active because of replication, and perhaps the transactions have not gone through to the subscriber, which raises another question, why not?
I have not tried restarting SQL server, as I'd like to know a way out of this without having to do that, plus I do not think it would make any difference anyway.
View 1 Replies
View Related
May 17, 2007
Hi there,
We're going to use replication on our database. There are tables without any primary key.
Is a primary key necessary for replication?
I have also antoher question: We want to replicate the whole OLTP database (size 30 GB).
Is snapshot replication a suitable mechanisme for this? I thougt snapshot replication overwrites all of the data, not only changed data. Or should we use another replication method?
Thanks in advance,
Patrick de Jong
View 8 Replies
View Related
May 19, 2012
I am using Master Data Service for couple of months now. I can load, update, merge and soft delete data in MDS. Occasionally we even have to hard delete data from MDS. If we keep on soft deleting records in a MDS table eventually there will be huge number of soft deleted records. Is there an easy way to hard delete all the soft deleted records from all MDS tables in a specific Model.
View 18 Replies
View Related
Mar 26, 2008
Hi!
I have an original database that I want to copy once to another database. Then I want to update the data weekly with the data of the original database. I don€™t change any tables or columns in that part of the database. Just some tables more in the €˜new€™ database (than the tables from the original database) with some references to the tables that have to be updated weekly.
How can I do this? (if you know what I mean... it's a sort of a datawarehouse where different sources come together.. that part that represents the original database is just a part of the datawarehouse. That part is exactly the same structure as the original database.)
Thanks,
Sandra
View 1 Replies
View Related
Oct 29, 2007
I have SSRS 2005 SP2 configured to work in Sharepoint integration. Everything works fine except that I am not able to programmatically change any property of report viewer web part (instance) that I have added on on home page of my sharepoint site.
I can do same thing via sharepoint UI but not through program. When my programs runs it fetches all web parts been added on home page, then I need to iterate through each one and find report viewer web part.
While iterating, as soon as I arrive to report viewer web part it is named as "Error web part" with error message as
"Windows SharePoint Services cannot deserialize the Web Part. Check the format of the properties and try again"
If someone has a solution, please respond at your earlist.
Thanks
Shankar
View 1 Replies
View Related
Jul 23, 2005
I am looking into work-arounds for what seems to be a flaw, or"undocumented feature" of SQL Server replication and Instead of Deletetriggers not playing together. It seems that if you want to usereplication then you cannot use Instead Of triggers as it prohibits thereplication triggers from firing. My delima is that I need to cascadedelete, but first have the record and all child records inserted intoassociated delete tables (<tablename>_del). This worked well usingInstead of delete triggers, but now we are moving to a replicationenvironment and it does not synchronize deletes to the publisher orsubscriber.The options I am looking into and the stumbling points they introduceare:1. Not using Instead Of triggers, but using After to insert thedeleted record into a <tablename>_del table (where of course<tablename> is the actual table name). The triggers are designed tocascade delete all related child records. The problem with thisoption is that there are relationship constraints that cause thedelete to raise an error complaining about these constraints. Ofcourse the child records need to be deleted first, but since thisruns after the delete I cannot perform this cascade delete viatrigger (or can I?).2. Same as above only using SQL Server 2k's "Cascade Delete"option. My question on this is, will the cascade delete execute theAfter Delete triggers for each child table in the relationship? Ifnot, is there a way to move these deleted records into<tablename>_del before they are deleted, keeping in mind that itmust be compatible with merge replication.3. Not yet found any information on this, but is it possible tomanually include information to be replicated after the "Instead Of"triggers so that the changes are included in the replication?I really appreciate the advice.
View 3 Replies
View Related
Dec 7, 2007
I have a table with a column named measurement decimal(18,1). If the value is 2.0, I want the stored proc to return 2 but if the value is 2.5 I want the stored proc to return 2.5. So if the value after the decimal point is 0, I only want the stored proc to return the integer portion. Is there a sql function that I can use to determine what the fraction part of the decimal value is? In c#, I can use
dr["measurement "].ToString().Split(".".ToCharArray())[1] to see what the value after the decimal is.
View 3 Replies
View Related
Jan 28, 2015
I have made the following Scalar-valued function:
CREATE FUNCTION [dbo].[TimeCalc]
(
@OriginalTime AS INTEGER
, @TenthsOrHundredths AS INTEGER -- code 2: 1/10, code 4: 1/100
)
RETURNS NVARCHAR(8)
[Code] ....
What it does is convert numbers to times
E.g.: 81230 gets divided by 10 (times in seconds: 8123). This 1 1 full minute, and the remainder = 2123 making it 1.21.23 mins)
So far so good (function works perfectly)
My question: sometimes times are in 1/100 (like above sample), sometimes in 1/10.
This means that, e.g. with a time like 3.23.40 the last zero must be deleted.
My thoughts are to use the results from the Return Case part, and as the code = 4: leave it as it is,
is the code 2 the use LEFT(... result Return Case ..., Len(..result Return Case.. - 1))
There are 5 codes: 0 1 2 3 and 4
View 9 Replies
View Related
Aug 31, 2001
We use a SQL Server 2000 Publisher and 2 pull subscribers.
Unfortunately we have some data loss from time to time. Some
records are deleted during the replicaton process. Actually
there shouldn't be any conflicts because of the permissions
of the application, so we use standard conflict resolving that
is selected when a publication is created, no extra options.
Any Ideas about that? Is it possible to dissallow deletes for
replication?
Any help would be greatly appreciated!!!
View 1 Replies
View Related
Sep 6, 2006
When I try to drop the publication in this order:
exec sp_dropsubscription @publication = @publicName, @subscriber = @servName, @article = N'all'
exec sp_droppublication @publication = @publicName
I am getting the following error after dropping the publication
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Could anyone give me a suggestion about how to avoid this error?
Thanks!
View 5 Replies
View Related
Feb 9, 2007
Hi All.
I have the folling replication issue:
BD1 ------------------------> BD0
Replicate with filter
BD2 ------------------------> BD0
Replicate with filter
BD3
Four data bases BD0,BD1,BD2,BD3
In BD1 y BD2 there are two merged publications subscribed continuous in BD0.
The publications are defined as insert only and allow changes in the subscriber. Everything works perfectly. The records replicate immediately. In BD0 you can insert and modify records, however when I attemept to delete a record I get the following message:
error:
You can't insert a row with a duplicate key in the object 'dbo.MSmerge_tombstone' with unique index 'uc1MSmerge_tombstone'
Note: This is a translation of the original error message in Spanish below.
No se puede insertar una fila de clave duplicada en el objeto
'dbo.MSmerge_tombstone' con Ãndice único 'uc1MSmerge_tombstone'
Cheers,
View 1 Replies
View Related
Mar 15, 2007
I tried to drop a merge replication publication and it is giving me an invalid object name dbo.ms_mergeagents message. I tried to drop using:
SSMS
sp_dropmergepublication
sp_replicationdboption
I got the last two from Microsoft KB article 324401. The subscription was never created because it gave another error invalid object_name msmerge_subscriptions. I can create new publications but not drop the existing ones.
Please assist...
View 1 Replies
View Related
Aug 22, 2007
Hi,
I created and scheduled a test snapshot publication and a push subscription using the sql server replication wizard. Tested it and it worked all fine as the data was regularly replicated to the destination server correctly.
After I was satisfied with the test I deleted the replication and subscription without any problem. But I noticed that the jobs created by the replication wizard had not been deleted. I was disappointed as I had also expected these to be deleted because there are no more any local publication or replication on the server.
I, then, tried to delete the job by right click - and then delete. But I am unable to delete the pubilcation and subscription jobs at all. When I try to delete the sql server 2005 the following error message appears:
--start--------------------------------------------------------------------
"Attempt to retrieve data failed for object for server <MYSERVER>" (Microsoft.SqlServer.Smo
)
Addional Information
The job <jobname> does not exist on the server. (Microsoft.SqlServer.Smo)
--End--------------------------------------------------------------------
Can anyone help me on how to delete all replication jobs.
View 1 Replies
View Related
Oct 2, 2007
Hi everybody,
when I look into the replication monitor of our sql 2005 server I see a lot of subscriptions that are no longer used.
I wrote a program for a smartphone using the sql compact edition (sql ce db). Just in case there are some problems i do not want to mentioned here, i use an preconfigured sql ce db, reinitialize it and afterwards synchronize it. Then the old subscription is no longer used.
The problem is that up to now I did find a way to delete this unused subscriptions at the publisher database. As a hint: there is no way to get access to the old sql ce db for removement issues. The dbs are gone.
So, is there a way to solve my problem?
We are using sql 2005 server as publisher and are using merge replication.
Thanks for help in advanced
Garfield
View 10 Replies
View Related
Jul 19, 2006
I am beginning design for a project to maintain an on-line archive of historical data for a production database, and then truncate old, rarely-used data from the production database. I am considering a method whereby we (A) replicate data changes from the production database to an archive database and (B) truncate old data from the production database according to predetermined business rules.
I am trying to determine whether SQL Server merge or transactional replication can be used to accomplish the replication portion of this requirement.
Given this scenario, there are two types of modifications that are made to the production database: (1) application inserts, deletes and updates which should be replicated, and (2) truncation deletes (as described in "B", above) which should not be replicated.
My question is: Will I be able to control the replication process such that application deletes are replicated, but "truncation" deletes are not? Could static row filters somehow be used to accomplish this?
View 6 Replies
View Related
Feb 15, 2007
In SQL Server 2005 SP1 we have a Transactional Replication with only this property in the articles:
Action: Delete data...
Ant this property in the publication:
Don't send schema changes
We have in the foreign keys NOT FOR REPLICATION = NO (Exigir para replicacion = "Si" in Spanish).
We have one problem and one doubt:
The problem is that when the sincronization goes wrong the table in the suscriptor is empty !!!!!. It seems that goes wrong because the foreign keys. The question is = Is necessary that NOT FOR REPLICATION = YES in all the tables?, we don't want any check in the sincronization.
Why the destiny tables appears empty?. Is very dangerous.
Thanks.
View 2 Replies
View Related
Feb 14, 2001
Hi,
Any updates on tables at publisher are being converted to Delete/Insert pair
at subscriber end with transactional replication. Our business requirement is not to delete data from few tables and also to get rid of Foreing Key
Constraint error.
How to avoid this Deletes during Update? Any ideas about writing custom stored procs?
Thanks
View 1 Replies
View Related
Mar 28, 2008
I have a tabe in my sql server 2005 database which contains a long description and I want to display the first 100 charactors on my web page but not sure how to do this I can only display the whole description. I'm not sure if I need to write the query to the database so it only brings the first 100 charactors back or query the whole description and then take the first 100 charactors in asp.net and display that can any one help
View 3 Replies
View Related
Apr 16, 2007
Hi all,
i am a student doing my final year project and i have the duty to develop a automated part-archiving for our MsSql Server 2000 Database, but its not so simple :eek: .
the environment:
- MsSql Server 2000
- Suns App-Server Glasfish
- Java (J2EE)
- Hibernate
the requirements:
1.)
Some tables should be synchronized and redundant (the same data in both databases)
2.)
If the maindatabase is changing the schema the archivedatabse must do the same changes.
3.)
The datas in some tables (the ones that aren't synchronized) which are older then 2 Years should be moving (copy, paste) to the archivedatabase every 24 hours.
4.)
If there are is a access for a data which are not in the maindatabase, it is necassary to get it from the archivedatabase.
I don't find a way to realise this ...
can some one give me a hint?
... Sorry for my bad english, i hope i explained my problem good enough.
Thanks for ur answers
View 10 Replies
View Related
May 26, 2008
I'm trying to write a script can be run in two iterations on a system, based on the existence of a database. The first iteration will create the database if it doesn't exist, the second will create tables and content. However I'm unable to script this properly as 'create database' seems to break any loop I add it into since it apparently can not run in a transaction. I'm obviously missing something really fundamental here, does anyone have any idea how to make this work?
USE [MASTER]
IF NOT EXISTS(select 1 from [master]..[sysdatabases] where name='testdatabase')
BEGIN
CREATE DATABASE [testdatabase]
END
ELSE
BEGIN
CREATE TABLE [testdatabase].[dbo].[testtable](
[Id] [int] NOT NULL
)
END
View 2 Replies
View Related
Aug 27, 2006
Hello,I want to connect to an SQL Server Database called MyDBTest, through an asp.net web form, select particular columns from particular tables, and then export these tables (with the selected columns only) to another SQL Server database called MyDBTest1 Is it possible?Thank you in advance! :)
View 7 Replies
View Related
Sep 14, 2015
We have an AG scenario where we are using WFC on a 2 node cluster. We are then using AG for mirroring the databases to both nodes and have a listener.
What I want to do next is to establish another copy of the database at a remote location. But I don't want to add the 3rd system to the WFC. I am not a big fan of WFC and I have seen it causes many more problems. The 3rd system will be in a remote location and the network not 100% reliable. I have seen in the past that it causes the entire cluster to hang and causing my production to crash which I don't want.
I there a way to add a 3rd node to the mirror configuration. I don't know if I can add a 3rd node to the AG unless it is part of the same cluster.
I know I can configure log shipping, I am fine with it but in the source, I have no control of which node the DB will be. I am not sure if a log shipping scenario can be configured using the listener instead of the physical host.
View 3 Replies
View Related
May 12, 2008
Using
- SQL Server 2005
- Management Studio Express.
Here's the SQL statement
Code Snippet
SELECT TOP 1000
[test].[CatalogStudioId],
[test].[CollectionId],
[test].[unique],
[test].[att1]
FROM CatalogStudioEntity.dbo.[test]
WHERE [test].[att1] LIKE '%1%'
Now, before you respond, allow me to say that I know using the table name to qualify the columns is redundant, and I know there are other options (such as aliasing the table). Don't respond to tell me this. However -- as far as I know -- this is a valid T-SQL statement and I should be able to get this query to run.
The interesting part is that if management studio is connected to the CatalogStudioEntity database, this query runs fine. If connected to the master database, I get the "multi-part identifier [x] could not be bound" error. The error is listed for every column.
My issue with this is that the table in the FROM clause is qualified with the database name, so whether I'm connected to that database or to "master" should not matter.
I have an application that generates select statements like the one above, and all of the machines so far that we've developed, beta tested and deployed this application on all don't have this problem. It's this one specific installation of SQL Server 2005 on this new machine where this problem arises.
Before I go back and retool the application to output whatever arbitrary syntax this specific machine seems to want, I want to try and troubleshoot and understand why it's acting like this.
Any ideas or thoughts would be greatly appreciated.
View 3 Replies
View Related
Sep 30, 2005
Hi all, How to package sql server database as part of our custom application (VB application) using install shield or any software. That setup should detect the presence of sql server. If sql server is not present in the client machine, then our set up should install the sql server and deploy our database. If sql server is present in the client machine, then our set up should install our database alone. How to do that. Please help me. Regards, S.Sevugan.
View 1 Replies
View Related
Sep 13, 2007
Hi,I have transactional replication set up on on of our MS SQL 2000 (SP4)Std Edition database serverBecause of an unfortunate scenario, I had to restore one of thepublication databases. I scripted the replication module and droppedthe publication first. Then did a full restore.When I try to set up the replication thru the script, it created thepublication with the following error messageServer: Msg 2714, Level 16, State 5, Procedure SYNC_FCR ToGPRPTS_GL00100, Line 1There is already an object named 'SYNC_FCR To GPRPTS_GL00100' in thedatabase.It seems the previous replication has set up these system viewsSYNC_FCR To GPRPTS_GL00100. And I have tried dropping the replicationmodule again to see if it drops the views but it didn't.The replication fails with some wired error & complains about thisviews when I try to run the synch..I even tried running the sp_removedbreplication to drop thereplication module, but the views do not seem to disappear.My question is how do I remove these system views or how do I make thereplication work without using these views or create new views.. Whyis this creating those system views in the first place?I would appreciate if anyone can help me fix this issue. Please feelfree to let me know if any additional information or scripts needed.Thanks in advance..Regards,Aravin Rajendra.
View 2 Replies
View Related
Jan 17, 2002
Hi,
In my production box is running on SQL7.0 with Merge replication and i want add one more table and i want add one more column existing replication table. Any body guide me how to add .This is very urgent
Regards
Don
View 1 Replies
View Related
Apr 8, 2015
My company is migrating all their servers to a new data center and I get to specify what we need for the db servers.
We've got a 22 prod servers (mainly physical) with a couple of TB of data on sql 2000 to 2012.
We expect to move to sql2014, and consolidate and virtualise where ever possible.
But I'd like start with specifying an overall architecture for this: some Best Practices to guide the build at a server and an installation level
View 1 Replies
View Related