MDX injection is one of the most threats for application written for Web. Big data is the ability of providing exponential growth and availability of data. Since the data in here are unstructured and therefore normal query language prevention techniques are not enough for preventing MDX injection attack. Here the author proposed a new technique that can address the issue efficiently using ASCII based string matching algorithm. In this technique detect spiteful character, constraint validation, query length validation and text based key generator are the four types of filtration technique used to detect and prevent the injection attacks from accessing the database.