Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Navicat Import Database script File error Collection

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Environment:

The data is exported by the user test1, and the corresponding table space is test1

The user test2 is imported, and the corresponding tablespace is test2

Action:

When importing, if there is a test1 table space in the target environment, it will be imported into the test1 table space.

If the target environment does not have a test1 tablespace, the default tablespace of the test2 user will be imported

Default tablespace view method: select username,default_tablespace from dba_users where username = 'SCOTT'

[Err] 1064-You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default

-- Table structure for tasking supplier'at line 1

[Err] INSERT INTO t_contractmoney VALUES ('ff8080816c854db2016c88b838db0455', NULL,' ff8080816c854db2016c8896b2c00375', 'ff8080816c000b87016c0302634904cb', NULL, 1125.00, 0,2019,' 0,2019, 'ff8080816b094713016b0bbe0a3e0076',' Ordos Culture and Tourism Bureau, '2019-08-13 10 10 rime 04rig,' ff8080816b094713016b0bbe0a3e0076', 'Ordos Culture and Tourism Bureau', '2019-08-13 10 purge 04vv 30, NULL)

[Msg] Finished-Unsuccessfully

Solution: statement error, check the syntax of the error location

1. Usually the reason for the format, such as',;, etc.

two。 It may be that the data between oracle and mysql are derived from each other, resulting in unsupported field types.

/-= =

[Err] 1171-All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead

[Err] INSERT INTO t_contractsupplier VALUES ('ff8080816c4fd3c5016c65c064c6506d',' ff8080816c4fd3c5016c65c014c35061', NULL, 'Ordos Zhida Electronics Co., Ltd.', 'Ordos Bank Co., Ltd. Dongsheng Branch', '047701012000012706')

INSERT INTO t_contractsupplier VALU

[Msg] Finished-Unsuccessfully

Solution: different users of import and export, resulting in an error in function call

1. The reason for this error is that the impassable versions import data files into each other.

/-- =

[Err] 1217-Cannot delete or update a parent row: a foreign key constraint fails

[Err] INSERT INTO t_contractmoney VALUES

-- ('ff8080816c4fd3c5016c60f902d91a35', NULL,' ff8080816c4fd3c5016c60f8e1821a2d', 'ff8080816c4b766e016c4c64f44a5938', NULL, 49750.00, 0, 2019, NULL,' ff8080816ac9ec56016b031357010243', 'Office of the standing Committee of the Ordos Municipal people's Congress,' 2019-08-05 16-50-50 ff8080816ac9ec56016b031357010243', 2019-08-05, Office of the standing Committee of the Ordos Municipal people's Congress, 2019-08-05 16-05 16-50 140 28, 2019-05)

[Msg] Finished-Unsuccessfully

Scenario: foreign key constraints make it impossible to delete data

1. The first line of the script file

SET FOREIGN_KEY_CHECKS = 0

[Err] 1062-Duplicate entry 'ff8080816b8acbdf016b91b8dbae1b9e' for key' PRIMARY' [Err] INSERT INTO t_contractmoney VALUES ('ff8080816b8acbdf016b91b8dbae1b9e')

[Msg] Finished-Unsuccessfully--==

/--

[Err] 1227-Access denied; you need (at least one of) the SUPER privilege (s) for this operation

[Err] INSERT INTO t_userpost VALUES ('12, 'wsd_gly')

Scenario: access denied, changed to exported user

Error importing database times:

[ERR] 1071-Specified key was too long; max key length is 767bytes

The solution is:

Show variables like'% innodb_large_prefix%'

Show variables like'% innodb_file_format%'

Set global innodb_large_prefix=on

Set global innodb_file_format=Barracuda

/-=

[ERR] 1349-View's SELECT contains a subquery in the FROM clause

This error is reported in the version of mysql5.6, and there is no such error in mysql5.0 and above.

You can consider upgrading the version, there is no good solution, if there is, please let me know thank you

Error 3167 while using script to automatically back up the database

Mysql database uses mysqldump to report error 3167

The database to be backed up is named: information_schema

Mysqldump: Couldn't execute 'SELECT /! 40001 SQL_NO_CACHE / FROM GLOBAL_STATUS': The' INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for 'show_compatibility_56' (3167)

The database to be backed up is named: performance_schema

Select from information_schema.global_status

3167-The 'INFORMATION_SCHEMA.GLOBAL_STATUS' feature is disabled; see the documentation for' show_compatibility_56'

Solution:

You need to set the enabled status:

Use the administrator to execute the following command:

Set global show_compatibility_56=on

Check to see if it is on:

Show variables like'% show_compatibility_56%'

Check again:

Select * from information_schema.global_status limit 3

ORA begins with an error in the oracle database

-= =

[Err] ORA-00942: table or view does not exist

[Err] DROP TABLE "PC_CORE". "B_FB_E_BLOCK_RECORD"

[Msg] Finished-Unsuccessfully

In the absence of a judgment statement, an error will be reported if the table does not exist.

Replace DROP TABLE with DROP TABLE IF EXISTS

[Err] ORA-00955: name is already used by an existing object

The statement table is already available.

More related content:

How Navicat imports sql script files

How to solve the problem of errors in importing sql files into navicat

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report