Aerospike : LDT error in cross datacenter replication - aerospike

I ran into an error while inserting LDT bins recently.
I saw that normal bins were able to replicate well intra-cluster as well as cross datacenter.
But when I inserted LDT bins, they were not being replicated .
I used AMC (Aerospike Management Console) to check these statistics.
So is there an issue in statistics measurement in AMC in case of LDT ? or Is there an issue in cross datacenter replication for LDT ?
P.S : I now know the reason and posted this question so that it may help others.

Cross Datacenter replication for LDT is not a supported feature yet.
Refer : https://discuss.aerospike.com/t/ldt-object-count-statistics-in-amc/991

Related

Undo tablespace is growing after oracle version updated from 11.2.0.1 to 11.2.0.4

I have recently upgraded the oracle database from 11.2.0.1 to 11.2.0.4 in RAC environment. Installation was successful and i checked logs on both instances. Services were fine untill Ora 30036 resulted due to undotablespace. I got following in spfile
*undo_retention =108000
node11.undo_tablespace='UNDOTBS1'
node12.undo_tablespace='UNDOTBS2'
I have following long running queries
1. EMD_MAINTENANCE.EXECUTE_EM_DBMS_JOB_PROCS()
2. #This query is for AWR auto workload repository
select result_key_value from mgmt_policy_assoc_eval_details........
( select column_value from table cast ...........)
Undotablespace 2 is growing at the rate of 1700MB / hours. I am afraid that I'll ran short of space. I have following questions in my mind:-
Q1. What could be maximum undotablespace for an oracle 11.2.0.4 running in RAC?
Q2. Why retention period is specified for 30hours?
Q3. Why the tablespace2 is growing too fast?
Q4. What could be possible workaround?
It is important to highlight that we have resumed services after few days due to planned upgrade. I have stopped Enterprise manager console as well as its eating a lot of space. SysAux is at 99%.
Q1. What could be maximum undotablespace for an oracle 11.2.0.4 running in RAC?
please refer to https://docs.oracle.com/cloud/latest/db112/REFRN/limits002.htm#REFRN0042 for details.
Q2. Why retention period is specified for 30hours?
is before upgrade, the pramater value never changed? it is configured by manual.
Q3. Why the tablespace2 is growing too fast?
please check if there is long running transaction from gv$transaction or x$ktuxe which consume too many undo blocks. if not, maybe the undo rentention need reduce.
Q4. What could be possible workaround?
advice that do not set the undo datafile autoextend is on avoid the disk space oom. and refer to Q3. i think the buiness is also changed after upgrade.

Identity Management in a Pull Merge Replication at Subscriber

I am facing SQL Server Replication issue
(Identity Management in a Pull Merge Replication at Subscriber).
Replication situation:
Distributor and the Publisher are in one server running Windows Server 2012 Std and SQL Server 2012 Std
One Subscriber PC running Windows 7 Professional and SQL Server 2012 Express Edition
Both are connected through the internet using VPN
The Problem:
Subscriber has an article (Table) [DocumentItems] where its Identity field [DocumentItemsID] is managed by Replication and was assigned the following range:
([DocumentItemsID]>(280649) AND [DocumentItemsID]<=(290649) OR [DocumentItemsID]>(290649) AND DocumentItemsID]<=(300649)
The server was disconnected from electricity several times.
Every time the Subscriber PC is up, The [DocumentItemsID] field will pick an identity out of its range like 330035 when inserting new rows.
The issue happened 3 times.
I fixed the problem by a manual reseed:
DBCC CHECKIDENT('DocumentItems' , RESEED, xxxx)
Where xxxx is the MAX existing value for [DocumentItemsID] + 1
Once the electricity is disconnected again, the same problem occurs.
Does anybody have any idea what is happening?
And why the [DocumentItemsID] field was assigned values out of its range?
Thanks
OK, finally I knew what was going on.
It is an issue happening only in SQL Server 2012. when SQL Server instance is restarted, then table's Identity value is jumped (int will jump 1000, where big int will jump 10000).
To stop this increment, Register -t272 to SQL Server Startup Parameter.
This solved the problem.
Thanks to Code Project article by S. M. Ahasan Habib, I was totally in the dark when I read it.
For details on how to register the startup parameter, read the article. It shows how to reproduce the issue and provide 2 solutions.

SQL Server 2008 transactional replication 'Missing end comment mark '*/''

I'm trying to set up transactional replication on a Dynamics NAV database on SQL Server 2008 R2 SP1.
Using the same servers I have been able to set up replication successfully on a different DB.
I'm able to create the publication, subscription and the snapshot, but when I look in the event log I see the following error:
Replication-Replication Distribution Subsystem: agent [agent name] failed. Missing end comment mark '/'.*
Replication isn't working, and the replication monitor effectively hangs when interrogating this DB.
A Google search returns this page: MS Connect But I'm struggling to find where the system-generated stored procedure they refer to resides. I've tried hunting it down in the Profiler app with various filters, but not having much joy locating it.
Any help would be greatly appreciated!
I notice that Martin's comment (also the most upvoted) solves the problem, as acknowledged by Loic. All credits due to Martin.
From the connect item it looks as though the failure occurs when you
have a stored procedure with GO inside a comment. I guess you can find
it with SELECT * FROM sys.sql_modules where definition LIKE
'%/%GO%/%' then change the comment. – Martin Smith Dec 13 '12 at
15:11
Thanks, Martin. This seems to have done the trick! – Loic Dec 20 '12
at 8:56

Detect when duplicate queries are running in sql

I have an app that lets users search across many millions of records at once. When the search does not return in a timely fashion, the users exit the app, log back in, and re-submit the search.
SQL server has no idea the user logged out and that it should not still be running the search, so I end up with many of the same query executing at the same time. Right now I just run a script that shows me what has been running for 5min or longer (mind you these searches are intense and can run for hours), how can i detect when duplicate queries are running?
Thanks,
Phillip
You can run this bit of SQL and check the text value:
SELECT sqltext.TEXT,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time
FROM sys.dm_exec_requests req
CROSS APPLY sys.dm_exec_sql_text(sql_handle) AS sqltext
Credit to Sql Authority
as #kell mentioned, with that query you can find longest running query,although it has some issues but if you read this information you can also fix the known issues .
Btw, i think why dont you left this job for sql-server. Sql server has inner capabilities to find query duplication , optimization and caching .. And it will be much better if you cached the result of the same sql query . Microsoft has published best practice paper of sql-server-2008 caching . Read it .

JDBC SQL Server Out of Memory Exception

I am writing a small utility that index's a SQL Server 2005 table data to LUCENE data store. i am using a JDBC SQL Server driver for connectivity. The result set returned from the server has around 2 million rows. This always throws a Out of Memory Exception. I have increased the Heap size for the client machine to around 1.6 GB, but to no avail. How can i fetch such large data sets, using JDBC giving limited memory .
Kind Regards
Have you looked at LIMIT and TOP in SQL? Also, try Googling for phrases like 'SQL query pagination'.