Not sure if this question makes sense, but is it necessary to purge old data in msdb tables used by the db mirroring monitor job?
I'm just wondering if an insert into the data table every minute of the day would still be needed a month from now. I'm thinking this data would be useful for the purpose of "alerts" and to have access to its recent history, but other than that, is it recommended (or necessary)? Would these records keep accumulating until manually purged?
I've some trouble with monitoring a database mirroring session. I am testing a lot configuration possiblities, and i use the database mirroring monitor to view the mirroring states.
But in some (most) of my configurations, i only get following informations in the database mirroring monitor:
Oldest unsend transaction, Unrestored Log, Current Restore rate and the Witness Adress. I am working in High safety mode with automatic failover.
Question 1: What are the reasons that all the other indicators (Unsend log, Current send rate, Mirror commit overhead) are not shown?
Question 2: In the moment, i am using certificates for the mirroring communication. I think, my client (who the database mirroring monitor is running) connects with the usual windows authentication to the server and only selects from sys.database_mirroring or something else. So there is no need to create inbound certificates on the partners for the client who is connecting with the mirroring monitor?
So I successfully got the mirroring to run and now I'd like to see what's going on between the two servers ( i'm not using a witness). I launch the Database Mirroring Monitor and its showing the two servers but when I go to the history column I'm not seeing any data movement. I've done a an update on a db with 1500 rows so I was expecting to see this show up.
Also, is there anyway to query the database thats acting as the mirrored db?
We have recently set up two SQL Server 2005 Standard Edition serverswith database mirroring. The mirrors function and fail over without aproblem, but the Database Mirroring Monitor Job fails every time withthe following error message:Incorrect syntax near '.'. [SQLSTATE 42000] (Error 102) Incorrectsyntax near the keyword 'with'. If this statement is a common tableexpression or an xmlnamespaces clause, the previous statement must beterminated with a semicolon. [SQLSTATE 42000] (Error 319). The stepfailed.Both SQL Servers are running SP2 with the latest patches.Can anyone help with the resolutionto this this issue?Thank you!Bosko
We have staging table in which data is dumped from files . The staging table is truncated for every load . In order to retain data from staging table we are creating staging_purge table which hold the staging data. what is the fastest way to copy data from staging to purge table without impacting the load process.
I have a database that I am setting up in SQL Server 2005. Initially, I am doing very large imports of data. Every time I run an import, I am having the increase the size of my transaction logs, and now they are approaching 2 GB. Should these be purging themselves? I have to keep increasing the max size of the log so that I can get my data in. While this will work for now, it is not a long term solution, because I can see the log size growing quite large and the amount of space on the server obviously isn't infinite. Is there a setting that I can change so they will automatically purge? If not, how do I purge this information myself?
I've got a large MS Sql Server 2000 database that has 15 indexes, with roughly 180 million rows representing 240 GB worth of data. Due to the massive size of the database we are trying to purge it down to a smaller dataset, about 40 million rows, in order to speed up the query performance and to be able to defrag the indexes (which are 30-50% fragmented). To complicate the matter, this table is also a publisher in a transactional replication setup, with one subscriber. Also, the system needs to be up constantly so I'm only allowed about a 3-5 hour period to take an outage a week.
So far I've tested several methods of delete following all best practices (batch deletes, using indexes in delete's where clause), and have come up with deleting/commiting 500 rows at a time. The problem is that it still takes 3-4 seconds to delete this many rows, on a 8 GB RAM, 4 processor machine that is not currently used or replicated.
I'm at a loss on a way to pare down the data with a delete as the current purge script will take 7 hours a day for about 3 months. Another option I'm considering is to do a truncate and copy the data back over from the replicated database, but again this has its own set of problems, i.e. network latency and slow inset times. Yet another option would be to create a replica of the table on the production db, copy the data to it, then rename the table.
Any one have experience with purging such a massive amount of data? Any help would be greatly appreciated.
I set up a new mirror server. Everything is good except that the Database Mirroring Monitor is not working for one of the databases. In the monitor the principal data is showing up as blank
If I look at dbm_monitor_data on the principal most of the data columns (e.g. Send_queue_size) are null where as they have data for the other databases.
Both servers are SQL Server 9.0.2047 Enterprise Edition.
If I'm on a remote machine, meaning a computer not in the WSFC cluster, and I open SSMS 2014, point it to a SQL Instance, and open activity monitor:
1. I get all the panes and charts except % Processor Time.
2. Then, if I authenticate to the cluster's domain by mapping a drive with valid domain credentials, I'm free to put performance counters in the Perfmon - - - but SQL Activity Monitor shuts down with“The Activity Monitor is unable to execute queries against server SQL-V01INSTANCE1..Activity monitor for this instance will be placed into a paused state.Use the context menu in the overview pane to resume the activity monitor.
Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))(Mscorlib)”
3. Of course, the Activity monitor can't be resumed via the context menu. Removing counters and closing the perfmon do not work. I dropped the mapped drive and rebooted the machine. That brought back 95% of the information in the Activity monitor.
4. Further experimentation showed that any mapping of drive shares present on the SQL Server to the computer running SSMS cut off functionality of the 'overview' pane in the remote machine's SQL Activity monitor -- the monitor that had been trying to watch the server offering the shares.
we need to report on what changes were made to one particular column of a table. We need to report the old value, the new value and the date and userid (these are also fields in the table). I assume we use an update trigger with a query to capture the old and new values in a temp table? Does anyone have any sample syntax for such a situation?
Hiya!I've combed the SQL Server 2000 online help but I don't see anythingakin to Sybase ASE's 'montor' views - equivalent to Oracle's V$views. The views are performance views which contain per sessioninformation such as:- SPID- number of logical read/write and physical read I/Os accumulatedthus far- CPU accumulated- Memoryetc.Does anyone know if I can snarf that data from SQL Server 2000?Thx!--Pablo Sanchez, Blueoak Database Engineeringhttp://www.blueoakdb.com
We have a database on the live server which powers a website. Then our client has a copy of the database at their office. Their is Merge replication set up between the two running every half a hour.
Now they want to be able to look at the merge replication history. With my little knowledge, I believe that the place to get this data from is the distribution database on the publishing machine which is the live server. Now for obvious reasons we cannot replicate the distrubution database to their side so we need to come up with some way of giving them the data. They also want a history of replication. So the way I was thinking of fixing it was to have a job that copies some of the last days data from the distrubution database onto the main database and add that table to the replication so they got it every day. Also writing a ASP page so they can look at the last days data straight from the distrubution database.
Here are my questions:
Question 1: How long does the replication store history for?
Question 2: Is thier any simpler way of allowing them to see the replication history?
Question 3: Are their any other things I should be worried about?
Once our company encoutered database disk full issue, so we cannot insert any more data. So is there way I can monitor the data file size? or is there a monitor tool to sending out alert?
for example, It can show me how many percentage of data file has been used e.g. 90%. so I know it's critical and I need to increase more space for database or disk drive.
i have a big database and for each table i have Active field (N/Y) and i wanna delete all record the active N. how i can do that without delete from each tables and looking to details tables before. our database have a complex relations. please any solution.
All, I records that have two columns, date col and time col.
I am trying to write a SQL statement to extract the rows that fall within a range of time. Eg current date/time + 10 hours and current date/time - 10 hours.
I'm assuming that the .ldf file houses all the transaction logs, well mine is getting quite large (like 6 times the size of my .mdf) and I'm wondering if there is a way to purge logs back to a specific date. Can anyone give me some direction? Thanks
Hi all I have table with about 67 million records that are marked for deletion.
I know that I can
DELETE from table WHERE ToBeDeleted='t'
But this may be too big a task for the server considering the amount of data to delete at once. And if it runs out of resources and errors then nothing gets deleted....
Is there a way to segmant or loop so i can delete like 100k records at a time?
A client of mine just asked about Archiving and Purging their data (based on different time constraints). For isntance, certain data would get archived after 3 years over to a different database, others purged all together. My thoughts off the bat are store procedures run on a job schedule.
Due to all kinds of the history reasons, we had "Dump transaction with no_log" and "backup Tempdb with no_log" inside our product code, the command will be called every 30mins. Since most of our clients are small to medium size, we set up the maintenance plan to do a full backup everyday. No one has ever bothered to reconsider it.
Now we are trying to help customer set up a standby server by using data mirroring, should we remove all "dump transaction" statement from the code even we choose synchronous Data Mirroring? If we don't remove dump transaction statement, is there a way to help customer set up a standby server by using data mirroring or any other replication?
Greetings, I have a SQL Server 2005 database which is populated with test data. I need to copy this database to a new instance and then purge the copied database of it's contents for the next round of testing. I know there exists a Copy Database Wizard w/in the SQL Server Management Studio; I'm assuming I need to perform this first, then purge the existing data w/in the copy. The Copy operation looks pretty straight forward, but I haven't a clue on how to perform the purge. Can someone help? Regards, Loopsludge
Suppose I am appending to my transaction log dump device every half hour,thus adding 48 log dumps per day. How can I purge my transaction dump device to only keep the last 1 week's worth of these logs. I do not wanted to issue an INIT in the command, because this will wipe it completely. I noticed an EXPIREDATE and RETAINDAYS parameter for the DUMP command. Can I use these to selectively purge the backup device or will these allow the device to be wiped clean also?
Anyone have anything hints on getting the option of DELBKUP to work. I have a maintenance job that backs up the database. Also set to delete backups older than 1 day. This doesn't seem to be working.
We are running SQL Server 2000 and making full database backups using a maintenance plan. The transaction logs are being backed up via a separate plan.
However, the transaction log backups aren't purging but the database ones are. They are both run under the same id and both write to the same directory. Old text reports also get purged fine. I've got 'Delete older than 1 week' ticked for everything.
Can anyone think of anything else to check ? Thanks
I have setup transactional replication everything on one box. later(two or three weeks later), Replication monitor is show red X Under my publishers (publications is disconnected). this is SQL2005.
greets all, ive got a table with batches of records. each group of records has a batch id as part of the PK in the form BTCXXXX where XXXX is an auto-incremented number. so lets say i have 100 batches of 20k records per batch in the table. so the distinct batch ids are BTC0200 (oldest batch) through BTC0300 (newest batch). i only want to keep the 90 most recent batches in the table at any given time. is it ok to just subtract 90 from the last batch id and do something like:
DECLARE @batch_id char(10) SET @batch_id = 'BTC' + batch_num-90
DELETE FROM ITEM_BATCH WHERE BATCH_ID < @batch_id
i want to cover if the table has more than 90 batches and if the table has less then 90 batches. is this a feasible approach?
Can anybody tell me the differences, advantages and disadvantages between these three solutions? When do I may use one or another? Could you recommend me any documentation?
I hope someone can help me with a big problem... I'm using Citrix Resource Management Services with a SQL 2000 database. Their are 15 citrix servers which are all reporting to the SQL database.
The database is expanding very quickly and is becoming slower and slower.
My question is: I want to schedule a purge of old records on a friday afternoon, like this: