search
HomeDatabaseMysql TutorialSQLSERVER2005清空日志出现的问题,数据库同步

前几天DHL客户那边需要有个 问题 解决,他们的DHL空运系统中库中 日志 文件(DOMNorth.ldf)已经到达13G了, 数据库 文件(DOMNorth.Mmdf)也只有2G,所以他们急需要解决把 日志 清空掉,所以到网上查了查关于清空 日志 的文章,于是用下面语句处理: --清空

前几天DHL客户那边需要有个问题解决,他们的DHL空运系统中库中日志文件(DOMNorth.ldf)已经到达13G了,数据库文件(DOMNorth.Mmdf)也只有2G,所以他们急需要解决把日志清空掉,所以到网上查了查关于清空日志的文章,于是用下面语句处理:

于是出现下面的错误信息:

DBCC SHRINKDATABASE: File ID 1 of database ID 7 was skipped because the file does not have enough free space to reclaim.
Cannot shrink log file 2 (DOMNorth_log) because all logical log files are in use.

发现日志正在使用,于是查了一下数据库,原来数据库中有发布(Publications)和订阅(Subscriptions),开始想怎样才能不删除掉发布和订阅而把日志清空掉,后来想尽办法还是不行,只能把这个发布删除掉重新创建,因为这个发布是以前同事创建的。在创建发布的时候也碰到一些问题,主要是设置同步时间,选择需要同步的表和试图,然后还要重新登陆一下发布的数据库,而且登陆数据库时不能用IP地址登陆,需要用SQL SERVER的别名登陆,然后创建订阅时有两种方式,是推模式和拉模式,推模式是在发布服务器中指定订阅的服务器,拉模式是在需要订阅的服务器中创建订阅(Subscriptions)。而且创建完最后一步可以选择立即执行一便,可以立即去测试同步是否成功,或者在SQL SERVER代理里面作业找到同步时相对应创建的作业,选择作业开始作业也可以去执行一次同步操作。

2009-03-30

上星期五去DHL跟客户一起弄版本升级,发现同步还是有点问题,(因为我在发布的时候选择了一个定时同步时间每天早上2点,而订阅的时候却选择了实时(continue)订阅)虽然数据是都同步到订阅服务器上了,但是我们不要求是实时同步,而且在订阅中有个作业是定时执行存储过程,由于是同步实时而造成执行存储过程超慢,以至于造成执行失败。

2009-04-05

最后总结:同步的时候选择一个时间计划如:1AM,订阅的时候也去选择一个时间但要和同步时间相差少于15分钟如:1.15AM,不然好象会出错。

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
When should you use a composite index versus multiple single-column indexes?When should you use a composite index versus multiple single-column indexes?Apr 11, 2025 am 12:06 AM

In database optimization, indexing strategies should be selected according to query requirements: 1. When the query involves multiple columns and the order of conditions is fixed, use composite indexes; 2. When the query involves multiple columns but the order of conditions is not fixed, use multiple single-column indexes. Composite indexes are suitable for optimizing multi-column queries, while single-column indexes are suitable for single-column queries.

How to identify and optimize slow queries in MySQL? (slow query log, performance_schema)How to identify and optimize slow queries in MySQL? (slow query log, performance_schema)Apr 10, 2025 am 09:36 AM

To optimize MySQL slow query, slowquerylog and performance_schema need to be used: 1. Enable slowquerylog and set thresholds to record slow query; 2. Use performance_schema to analyze query execution details, find out performance bottlenecks and optimize.

MySQL and SQL: Essential Skills for DevelopersMySQL and SQL: Essential Skills for DevelopersApr 10, 2025 am 09:30 AM

MySQL and SQL are essential skills for developers. 1.MySQL is an open source relational database management system, and SQL is the standard language used to manage and operate databases. 2.MySQL supports multiple storage engines through efficient data storage and retrieval functions, and SQL completes complex data operations through simple statements. 3. Examples of usage include basic queries and advanced queries, such as filtering and sorting by condition. 4. Common errors include syntax errors and performance issues, which can be optimized by checking SQL statements and using EXPLAIN commands. 5. Performance optimization techniques include using indexes, avoiding full table scanning, optimizing JOIN operations and improving code readability.

Describe MySQL asynchronous master-slave replication process.Describe MySQL asynchronous master-slave replication process.Apr 10, 2025 am 09:30 AM

MySQL asynchronous master-slave replication enables data synchronization through binlog, improving read performance and high availability. 1) The master server record changes to binlog; 2) The slave server reads binlog through I/O threads; 3) The server SQL thread applies binlog to synchronize data.

MySQL: Simple Concepts for Easy LearningMySQL: Simple Concepts for Easy LearningApr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL: A User-Friendly Introduction to DatabasesMySQL: A User-Friendly Introduction to DatabasesApr 10, 2025 am 09:27 AM

The installation and basic operations of MySQL include: 1. Download and install MySQL, set the root user password; 2. Use SQL commands to create databases and tables, such as CREATEDATABASE and CREATETABLE; 3. Execute CRUD operations, use INSERT, SELECT, UPDATE, DELETE commands; 4. Create indexes and stored procedures to optimize performance and implement complex logic. With these steps, you can build and manage MySQL databases from scratch.

How does the InnoDB Buffer Pool work and why is it crucial for performance?How does the InnoDB Buffer Pool work and why is it crucial for performance?Apr 09, 2025 am 12:12 AM

InnoDBBufferPool improves the performance of MySQL databases by loading data and index pages into memory. 1) The data page is loaded into the BufferPool to reduce disk I/O. 2) Dirty pages are marked and refreshed to disk regularly. 3) LRU algorithm management data page elimination. 4) The read-out mechanism loads the possible data pages in advance.

MySQL: The Ease of Data Management for BeginnersMySQL: The Ease of Data Management for BeginnersApr 09, 2025 am 12:07 AM

MySQL is suitable for beginners because it is simple to install, powerful and easy to manage data. 1. Simple installation and configuration, suitable for a variety of operating systems. 2. Support basic operations such as creating databases and tables, inserting, querying, updating and deleting data. 3. Provide advanced functions such as JOIN operations and subqueries. 4. Performance can be improved through indexing, query optimization and table partitioning. 5. Support backup, recovery and security measures to ensure data security and consistency.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)