Tag Info

Hot answers tagged

9

You created the table in the SYS schema (which you should never, ever do. Really, never). When you log in as teacher1 any statement looks for objects in that schema. But there is no TEACHER1.INSTRUCTORS table, because the real name is SYS.INSTRUCTORS (did I mention what a bad idea it is to create objects in the SYS schema?). You need to run select * from ...


8

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. ...


8

No. This hard-coded restriction exists for good reasons related to possible excessive query plan compilation time. You can workaround it by listing the VALUES clauses in a CTE, then INSERTing from the CTE, but I do not recommend it. Break the INSERT statement up into VALUES clauses of <= 1,000 lines each as a workaround, or use an alternative data ...


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

You generally don't want to rely on implicit conversions of strings to dates. That only leads to pain and suffering since different users will have different date formats. Either use ANSI date literals or use the to_date function with an explicit format mask UPDATE bb_product SET salestart = date '2012-06-01', saleend = date '2012-06-15', ...


4

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.


4

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 ...


4

Life has many great mysteries. For the MySQL DBA, one of life's greatest mysteries is your question. It's been this way going on 12 years. In fact, I found a bug report that was resolved when the disappearance of mysql.sock was caused by trying to start mysqld with mysqld already running (a.k.a. Shooting mysqld in the Foot). I have personally addressed ...


4

"MSSQL.1" is not the directory for a SQL Server 2008 R2 instance. You should verify the directory you are trying to place the database in. The default data path for a normal installation is: "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLServer\MSSQL\Data". Edit If this is indeed the path of the databases for your SQL Server 2008 R2 instance ...


4

Best and most reliable way is to use backup / restore If your database is big and you are on sql server 2008 R2 and up, standard edition also has compression feature to allow you to compress your backups. Dont forget to sync up users after the restore :-)


3

Try like below, it will help you... CREATE TABLE `read` (`order` MEDIUMINT NOT NULL AUTO_INCREMENT, `title` VARCHAR(50) NOT NULL, `url` VARCHAR(50) NOT NULL, PRIMARY KEY(`order`) )DEFAULT CHARSET=UTF8;


3

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 ...


3

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 ...


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 ...


3

I hope you are using LOAD DATA INFILE. Try to use LOAD DATA LOCAL INFILE instead of LOAD DATA INFILE. Other issue might be this, please visit the following links : MySQL LOAD DATA. When you login in MySQL do like below, abdul@xmpp3:~/Desktop/Jiva$ mysql -uroot -p --local-infile Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. ...


3

A relational sub-select is logically processed in the following sequence: FROM clause WHERE clause GROUP BY clause HAVING clause SELECT clause ORDER BY clause LIMIT...OFFSET clause or the equivalent Subsequently, the column labels defined in the SELECT clause are not yet known when the FROM clause, containing the joins in your example, is dealt ...


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

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 ...


2

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 ...


2

$ /usr/local/mysql/bin/perror 12 OS error code 12: Cannot allocate memory Sure, you have memory now but MySQL isn't running now. Remove those multi-gigabyte configuration entries and verify that you can start the server without them. I suspect read_buffer_size may be the one that's getting you but they are all unnecessarily large for a new server. The ...


2

Note you say this is in the server log and there are no known problems with clients. Consequently, I don't think that it is libpq per se. Additionally on doing some additional searches, it looks like this is a standard Windows "connection refused" message, which suggests that PostgreSQL is trying to connect to something and being refused. If you are ...


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 setup a SQL Server 2008 R2 instance and have the following databases: AdventureWorks2008R2 DemoFatalCorruption1 zzOtherDatabase I setup a Maintenance Plan with the Check Database Integrity Task in it. After running the plan it did fail: After reviewing the log it showed that it will continue checking additional databases after hitting one that ...


2

Below will work, as you had syntax error : USE master GO RESTORE DATABASE client_a_database1 FROM DISK = 'G:\database1\***.bak_1', DISK = 'G:\database1\***.bak_2', DISK = 'G:\database1\***.bak_3' WITH MOVE 'database1_data' TO 'G:\database1\***.mdf' MOVE 'database1_log' TO 'G:\database1\***.ldf', REPLACE, Password = 'password' GO ...


2

My suspicion would be that you are either using external_locking or you have character set issues. It might center around the following bugs Error 11 - can't unlock file when using external_locking Inconsistent use of column alias In ORDER BY clause that specified collation I would suggest upgrading to MySQL 5.6 as this situation is consistent with ...


2

There are 3 methods that MySQL can use to write to the binary logs: STATEMENT This means that every SQL statement on the master is recorded in the log, and executed on the slave. This can cause problems if the SQL statement contains statements such as "NOW()", "RAND()" and anything non-deterministic. This also requires support from the storage engine in ...


2

I'm not sure what authentication method you are using, but I've seen issues when using Windows Authentication when the DC (Domain Controller) is being overwhelmed with requests you can see issues. Usually it is a timeout issue though. If you are using Windows Auth, try switching to SQL Auth to rule that out. Sorry I tried to add a comment but it wouldnt ...


2

By reading some forums, the variables that avoids this issue are: MaxBufferedEpochs TimeBetweenEpochsTimeout This must be configured in MGMT Node /var/lib/mysql-cluster/config.ini As we can see in MySQL Documentation, the default for MaxBufferedEpochs is 100, the default for TimeBetweenEpochsTimeout is 4000, change this for the needed value.


2

First of all I think you should be installing Developer Edition as Windows 7 is not a server-OS. Make sure you have admin rights on your machine. It may also be worth trying the different install media? However it looks like there is an open connect item for this error and further discussion here As a workaround, you could use some of your Azure credits ...


2

Suggested solutions: Execute the following command REPAIR TABLE table_name; If that (step one) doesn't help try to change the temp directory in the cnf file to new location with bigger space; If step one and two did not help you need to restore the database to previous stage.



Only top voted, non community-wiki answers of a minimum length are eligible