Hot answers tagged errors
6
You can cycle the error log by calling sp_cycle_errorlog and then that will close the current error log and cycle the log extensions. Basically, it'll create a new error log file that SQL Server will be hitting. Then the archived error log(s) can be treated accordingly (delete/move with caution). This will not technically "truncate" the log, it'll just ...
5
State codes and their meaning.
1 'Account is locked out'
2 'User id is not valid'
3-4 'Undocumented'
5 'User id is not valid'
6 'Undocumented'
7 'The login being used is disabled'
8 'Incorrect password'
9 'Invalid password'
10 'Related to a SQL login being bound to Windows domain password policy enforcement.
...
3
Based on a_horse_with_no_name's comment, I started searching around psql and found the solution:
\set VERBOSITY verbose
SELECT * FROM tgvbn();
ERROR: 42883: function vfjkb() does not exist
...
Now that goes into .psqlrc. Details and further options can be found in the psql documentation.
3
From the Connection.setAutoCommit docs:
NOTE: If this method is called during a transaction and the auto-commit mode is changed, the transaction is committed. If setAutoCommit is called and the auto-commit mode is not changed, the call is a no-op.
But I don't think it's very readable/obvious in your code. You should probably simply commit before ...
2
I have found the problem:
Somehow, MySQL decided to create mysql.sock in /private/tmp rather than in /var/mysql.
So, my solution was to create a symlink:
cd /var
sudo mkdir mysql
sudo ln -s /private/tmp/mysql.sock mysql.sock
Now everything works fine.
2
MySQL does not have CTEs. You can (and should) rewrite the query using either a temporary table or a nested subquery (derived table):
SET @rank:=0;
SELECT CASE WHEN row_id <= 375
THEN 'Training'
ELSE 'Test'
END AS SomeAlias,
t.*
FROM
( SELECT @rank := @rank + 1 AS row_id, UUID() as random_value, d.*
FROM ...
2
I'm sure there are dba.se and StackOverflow duplicates, but it was far faster for me to post this link:
http://connect.microsoft.com/SQLServer/feedback/details/537419/sql-server-should-not-raise-illogical-errors
In short, the Query Optimizer is really free to rewrite the plan as it sees best. Sometimes, it means a column is transformed (CAST -> int) close ...
2
I think the permissions are correct because otherwise you wouldn't have gotten here.
My guess is that a modification you have made has caused the problem. This is particularly the case given that it is a segmentation fault. What you really need to do is look at the call stack at the time the core was dumped and see if you can isolate where in the code ...
1
initdb and the server process itself must be run as the same OS user which owns the data directory. Don't forget to set permissions for that directory to only allow that user access (chmod 700).
Regarding the segmentation fault -- can you cause it with an unmodified version of PostgreSQL, or is this perhaps a result of bug in some customization you've ...
1
Since you did this changes to the MySQL side, your only other option is to downgrade PHP.
Other links support this:
StackOverflow : MySQL PHP incompatibility
ServerFault : mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in
Another Blog : ...
1
The Check Database Integrity Task provided in the maintenance plan issue DBCC CHECKDB WITH NO_INFOMSGS on the database selected. You can view its command by clicking the view-SQL in the task setup. If you doubt the generated SQL command, you can use SQL profiler to see its SQL command. If corruption was found, the agent job with this maintenance task will ...
1
It really depends which constraints are violated. You neglected to disclose that in your question.
To disable triggers (including foreign key constraints):
ALTER TABLE tbl DISABLE TRIGGER ALL;
Be sure to revert it afterwards:
ALTER TABLE tbl ENABLE TRIGGER ALL;
More in the manual.
However, this does not disable Check, Not-Null, Unique, Primary Key or ...
1
I think the problem is that you are almost certainly missing a declaration and function prototype for the function. It looks to me like you trying to hack the PostgreSQL source to provide the execution of a function you have coded at a certain point, but you aren't able to compile the back-end because the function prototype is not found. This means you ...
1
SQL Server does not support FOR EACH ROW clause in trigger.
So, I think that query in a trigger falls down with an error like this
Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
Maybe replacement of "=" by "IN" will help.
1
The solution of the problem is that table MCOUNTRY did not have the primary key. It was only configured with unique constraint that was called is the same way that primary keys. Even when the unique column was used in query Oracle could not provide expected result.
Something obvious but still lesson to learn, unique constraint is not the same as primary ...
1
According to IBM SQL3227W states:
"Record token token1 refers to user record number token2.
Explanation
An error or warning was encountered during LOAD, IMPORT or EXPORT of a
table. CPU parallelism was greater than 1 at the time the problem was
encountered, and an SQL message was written which identified the user
record with a special ...
1
What do you consider to be high-traffic?
Turn off Named Pipes and turn on TCPIP
It's lighter in it's communication. In my SQL installations, I never use Named Pipes except if the Application is on the same machine as the SQL service, and that's really ... never ... I always separate the application and SQL Server because monitoring and performance measures ...
Only top voted, non community-wiki answers of a minimum length are eligible
