Unable to open the physical file “d:\***.mdf”. Operating system error 5: “5(Access is denied.)”.
Is to set the SQL Server related account access to the file
Let Management Studio run as an administrator
This error is caused by the account being unable to open the default database
Change the default open database for this account.
If, unfortunately, your SA account and Windows authentication are both open to the same database by default, logging in either way is equally useless
If you have an account that you can log in to, just right click on the security – login username property and change the default database to master.
If you cannot log in either way, modify the default database for the SA by following the command below
If you’re unlucky enough to forget your SA password and you can only log in with Windows authentication, and you don’t happen to know the Windows login name,
Ga can only try to find out what the Windows identity login name is
The combination is probably the computer name \Administrator. Run the following command with CMD to change the default open database for an account, sql2005 version below, and change SQLCMD to ISQL
sqlcmd -E -d”master” -Q”exec sp_defaultdb N’sa’, N’master'”
Reproduced in: https://www.cnblogs.com/Jerseyblog/p/4971227.html
ORA-00257: archiver error. Connect internal only, until freed
The main reason for this error is that there are too many archived logs, which leads to insufficient disk space. It can be solved by deleting logs or increasing space. The specific operation is as follows :(this error is solved by deleting logs here)
1. First log in to Oracle at the terminal using the following command
sqlplus /nolog
connect /as sysdba
2. Execute the following statement and check the use of Flash Recovery Area. Archivelog is already very large, close to 100.
select * from V$FLASH_RECOVERY_AREA_USAGE;
3. Use the following command to query the storage directory of Archivelog and backup it if necessary.
show parameter recover;
4. Delete the log files in the corresponding directory
5. After the log document is deleted, the control file must be maintained using RMAN, otherwise the space will still not be released. The terminal enters RMAN maintenance with the following command:
rman target sys/pass
Check for useless Archivelog:
crosscheck archivelog all;
Delete all Archivelog as of the previous day:
delete archivelog until time 'sysdate-1';
6. Query the use of Flash Recovery Area again, and you will find that a lot of space is released. At this point, the error has been resolved
Node with MongoDB is configured to appear when access is completed
Error: reach econnunion 127.0.0.0.1 :27017, return Error
The reason is that your MongoDB database is not open,
The solution under Node can be turned on by Mongod
Here are the links I found:
https://cnodejs.org/topic/5646b746c5dcc06702210adf
https://stackoverflow.com/questions/36400233/connect-econnrefused-127-0-0-127017
Reproduced in: https://www.cnblogs.com/herewego/p/9278904.html
hint: the database has changed.
Use the last two steps in the “database has changed” loop until alter Database Open. No more error, “Database has changed”.
Up to this point, I will follow the original blogger’s operation. Now I need to close the command line and click computer — > Management – & gt; After the service, find the Oracle-related service and stop it, and then restart it. Oracle services are closed and started in a certain order, specific query can be online.
You can also refer to the following website content for setting, I did not try, roughly the same.
http://www.linuxidc.com/Linux/2016-04/130111.htm
Node. js server mysql database connection timeout problem
Sometimes connection timeouts occur while the Node server is connecting to the database. This Error is Error: Connect ETIMEDOUT. The error position in the code is line 421 to 433 of mysql’s Connection.js file:
Connection.prototype._handleConnectTimeout = function() {
if (this._socket) {
this._socket.setTimeout(0);
this._socket.destroy();
}
var err = new Error('connect ETIMEDOUT');
err.errorno = 'ETIMEDOUT';
err.code = 'ETIMEDOUT';
err.syscall = 'connect';
this._handleNetworkError(err);
};
This error is literally a connection timeout, and then my error is due to the database connection problem, when creating the database should carefully compare the parameters of the problem, like me:
when creating the database connection pool:
pool = mysql.createPool({
host: "127.0.0.1",
user: "user",
password: "",
database: "nodejs",
port: 3306,
});
The header information in the database is:
Source Server : localhost
Source Server Version : 50624
Source Host : localhost:3306
Source Database : nodejs
Target Server Type : MYSQL
Target Server Version : 50624
File Encoding : 65001
It can be seen that there is a problem with the connection address of the server, so the connection was successful after changing to localhost
CREATE USER dumper@'localhost' IDENTIFIED BY 'dumper';
GRANT select ON test.* TO dumper@localhost;
GRANT show view ON test.* TO dumper@localhost;
GRANT trigger ON test.* TO dumper@localhost;
GRANT lock tables ON test.* TO dumper@localhost;
Dumper is set to back up the Test library, can log in to the database normally, and still cannot access mySQldump
I began to add parameters to mySQldump gradually, and finally found that the access was successful after adding port -P3307
mysqldump -udumper -pdumper -hlocalhost -P3307 test>test.sql
According to the configuration file, the port of mysql has been modified to 3307, but mySQldump defaults to 3306. After that, the root account can also be normally backed up
after querying the current thread, it was found that multiple threads were running at the same time…
to view all currently running transactions:
SELECT * FROM information_schema.INNODB_TRX;
you can find three transactions all running at the same time… So you can find the direct cause of the error reported by the shopkeeper here is:
before the stored procedure (which opened the transaction) ran for half a day, MySQL was manually closed without any response… Didn’t make it commit… And the subsequent deletion of data in the same transaction creates a transaction lock…
The fundamental reason is that MySQL USES the Innodb engine by default, and the default parameter of Innodb: innodb_lock_wait_timeout, which sets the maximum time for transactions to wait for acquiring resources (default 50s). Once the maximum time is exceeded, it will report errors such as questions without obtaining resources.
Well, now that the cause of the error has been identified, there are three solutions:
Find the thread of the current transaction, kill the thread; Enlarge this parameter: innodb_lock_wait_TIMEOUT wait time; Optimize stored procedures.
Here the shopkeeper takes the first approach, killing the redundant threads and then checking all the currently running transactions again:
find something strange?The killed thread Number 10 is still working??Its current state is “ROLLING BACK,” which means that the transaction that was killed a while ago has been in a rollback state. So the shopkeeper continued to look up materials and found that such a situation occurred because although the kill command was triggered, it took a long time to terminate the kill logic, and it was also affected by IO resources. Therefore, rollback occurred even though the kill was executed.
Solutions:
One is to wait for it to roll back; Another is to restart the MySQL, but restart MySQL, the transaction will roll back, so in general is actually etc. It can be rolled back end 😂!
waited for about seven or eight minutes before everything was cleared, and all transactions were over:
and then delete again:
I encountered the following error when Connecting db today:
SQL SERVER — FIX: Error 945 Database cannot be opened to capacity files or disk space. See the SQL SERVER Error log for details
The first intuition is the DBF permission issue, a check sure enough…
Due to lack of space
Also moved the DBF file below
and attached the
SQL template as follows:
CREATE DATABASE [ALS_LFE] ON PRIMARY
( NAME = N’DXXXXXXXXXXXXXXXXX’, FILENAME = N’DXXXXXXXXXXXXXXXXX.mdf’ , MAXSIZE = XXXXKB, FILEGROWTH = XXXXKB )
LOG ON
( NAME = N’DXXXXXXXXXXXXXXXXX_log’, FILENAME = N’DXXXXXXXXXXXXXXXXX.ldf’ ,MAXSIZE = UNLIMITED , FILEGROWTH = 10%)
FOR ATTACH
GO[@more@]
From “ITPUB blog” link: http://blog.itpub.net/8337095/viewspace-1033527/, if you want to reprint, please indicate the source, otherwise will be investigated for legal responsibility.
Reproduced in: http://blog.itpub.net/8337095/viewspace-1033527/