If you’re getting an error telling you that access is denied for the root
user in MariaDB, this article may help.
Tag: errors
Fix “longitude/latitude is out of bounds” in MongoDB when Creating a 2dsphere Index
If you’re getting a “longitude/latitude is out of bounds” error when trying to create a 2dsphere index in MongoDB, it could be due to your longitude and latitude coordinates being in the wrong order.
Continue readingOPENROWSET does not accept variables for its arguments (SQL Server)
If you’re trying to use OPENROWSET
to run an ad hoc distributed query in SQL Server, but you keep getting an “incorrect syntax” error, and you just can’t see anything wrong with your syntax, it could be that you’re trying to use a variable for one of the arguments.
As mentioned in the title of this post, OPENROWSET
does not accept variables for its arguments.
If you’re using variables as arguments, try changing these to string literals.
Continue readingHow to fix “Server is not configured for RPC” Msg 7411 using T-SQL
If you’ve encountered error Msg 7411, Level 16 in SQL Server, it’s because you need to enable “RPC out” on the linked server that you’re trying to execute code on.
Continue readingHow to Fix “The configuration option ‘Agent XPs’ does not exist” in SQL Server (T-SQL)
If you encounter error Msg 15123, Level 16, reading “The configuration option ‘Agent XPs’ does not exist“, you were probably trying to execute EXEC SP_CONFIGURE 'Agent XPs'
while advanced options are hidden.
This error is easily fixed.
Continue readingHow to Fix “Procedure expects parameter ‘@statement’ of type ‘ntext/nchar/nvarchar’.” Error in SQL Server
It’s quite easy to encounter error Msg 214, Level 16 when executing stored procedures such as sp_executesql
or sp_describe_first_result_set
.
Fortunately it’s easy to fix too!
The most common reason for getting this error is that you forgot to prefix your string with N
.
Therefore, to fix this issue, try prefixing your string with N
.
Fix “index name must be a string” when Dropping Multiple Indexes in MongoDB
If you encounter the “index name must be a string” error when dropping multiple indexes in MongoDB, it’s probably because you’re passing the specifications document instead of the name.
When you use the dropIndexes()
method or the dropIndexes
command to drop multiple indexes, you need to pass the index names (not the specifications documents) in an array.
ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator (SQL Server)
If you’re running a query in SQL Server, and you get the following error…
Msg 104, Level 16, State 1, Line 8
ORDER BY items must appear in the select list if the statement contains a UNION, INTERSECT or EXCEPT operator.
…you should check your SQL statement – you’ve probably omitted a column from your SELECT
list.
As the error message implies, you’ll probably only see this error if you’re running a query that contains a UNION
, INTERSECT
or EXCEPT
operator.
Simply adding the column to your SELECT
list should fix the problem.
How to Fix “The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION” in SQL Server
If you’re receiving error Msg 3902, Level 16, which reads “The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION”, it’s probably because you’ve got a stray COMMIT
statement.
You could be getting this due to implementing error handling, and forgetting that you’ve already committed or rolled back the transaction elsewhere in your code.
Continue readingFix “SQL Server blocked access to STATEMENT ‘OpenRowset/OpenDatasource’ of component ‘Ad Hoc Distributed Queries'”
If you get error Msg 15281, Level 16 in SQL Server, chances are you’re trying to run an ad hoc distributed query, but you haven’t enabled ad hoc distributed queries.
This can be fixed easily by enabling ad hoc distributed queries.
Continue reading