How to truncate logs for SQL Server 2012 cleanup logs

MEDIA Database nameALTER DATABASE Media set RECOVERY easy with No_waitalter database media set RECOVERY simple--simplified mode DBCC SHRINKFILE (N ' Media_log ', one, truncateonly) --11 is size 11MALTER database MEDIA SET RECOVERY full with

SQL group fetch up-to-date data SQL Server skillfully uses row_number and partition by to group top data

After SQL Server 2005, the Row_number () function was introduced, and the grouping ordering of the Row_number () function made the operation very simpleGrouping top data is a common query in T-SQL, such as the Student information management system

SQL Server Transaction Log Truncate && Shrink

CatalogueWhat is a transaction logComposition of the transaction logTransaction log Size Maintenance methodsTruncateShrinkIndex fragmentationSummarizeWhat is a transaction log  Transaction Log is a record of a series of actions performed on a

loop traversal in SQL Server (normal loop and cursor loop)

SQL often uses loops, and here's a look at common loops and cursor loops1, first need a test table data student2. Normal circulation1) Cycle 5 times to modify student table information--Looping through modification records--DECLARE @i intSet

SQL Server Temp Table

Use of temporary tablesWhat is a temp tableTemporary tables are divided into two types: local and global temporary tables. Local temporary tables are visible only in the current session, and global temporary tables are visible in all sessions.The

SQL Server Tuning Series-Index Operations summary

ObjectivePrevious articles we introduced how to view the query plan, the introduction of common operators, the way of parallel operations, interested can click to view.This article will analyze in SQL Server, how to use the first indexed items for

SQL Server 2012 does not fully use the CPU's logical core number problem

Recently encountered in the work, SQL Server 2012 can not put the core of the CPU all the problem, believe that many people have encountered this problem, so today this section first to say how this problem arises.First introduce the environment of

SQL Server Custom Aggregate functions

Description: This article is based on the network reprint collation, because of the time relationship, wherein the principle is not in-depth study, just to tidy up the backup to leave a record.Objective: To customize the aggregate function in SQL

SQL Server R2 open allow remote connections

Method/Step 1Log in to SQL Server (Windows authentication), right-click after login, and select "Properties". 2Select Security on the left, and select SQL Server and Windows authentication mode on the right to enable hybrid login mode.

Windows 2012 configuration failover (for SQL Server, AlwaysOn)

SQL Server AlwaysOn technology relies on the Windows WSFC feature, the Failover Clustering feature. Both Liunx corosync+pacemaker and Oracle Grid Infrastructure need to complete the control of cluster resources and resource isolation. WSFC transfers

How can I list all foreign keys referencing a given table in SQL Server?

1. EXEC sp_fkeys ' TableName '2. SELECT Obj.name as Fk_name,Sch.name as [schema_name],Tab1.name as [table],Col1.name as [column],Tab2.name as [referenced_table],Col2.name as [Referenced_column]From Sys.foreign_key_columns FKCINNER JOIN sys.objects

Interaction between date time in Java and datetime in SQL Server 2005

PrefaceEnvironment:Platform:windows XPLanguage:java 1.5Ide:myeclipse 6.0.1Database:sql Server 2005 Enterprise enIntroductionThis article focuses on how date time in Java interacts with datetime in SQL Server 2005. The date type involved hasJava.util.

SQL Server R2 Configuration Management tool Service displays remote procedure call failure: 0X800706BE

Today in other computers configured SQl server R2, after the installation is complete, Discovery opens the Configuration management Tools service: Show Remote Procedure call failed: 0x800706be such an error messageBefore this problem was encountered,

SQL Server Master-slave database configuration

The size of the site to a certain extent, the points are also divided, the optimization has also been optimized, but still can not meet the performance requirements of the business, we can consider the use of master-slave library. Master-Slave

The similarities and differences between database triggers DB2 and SQL Server

db2

The basic syntax for most database statements is the same, but specific to each database, there are some differences, such as triggers, DB2 and SQL Server two are very different.For example, a trigger for DB2:CREATE TRIGGER eas.trname NO CASCADE

Data conversion for SQL SERVER with Access, Excel

SQL Server with Access, Excel Data transformation The database administrator who is familiar with SQL Server 2000 knows that its DTS can import and export data, in fact, we can also use Transact-SQL statements for import and export operations. In

Automatically delete SQL Server backup files for a specified date using Task Scheduler

Automatically delete SQL Server backup files for a specified date using Task SchedulerCommandforfiles [/P pathname] [/M searchmask] [/S][/C command] [/d [+ |-] {YYYY-MM-DD | dd}]Method 1:Description: You can delete a log file with a suffix of 7 days

SQL Server data table field custom Custom Data Format method, SQL Server

SQL Server data table field custom Custom Data Format method, SQL Server This document describes how to customize the Custom Data Format of SQL Server data table fields. We will share this with you for your reference. The details are as follows: --

The SQL SERVER database table records are retained for only N days.

The SQL SERVER database table records are retained for only N days. This article shows you how to keep the SQL SERVER database table records for only N days. For detailed steps, see the following: Step 1: first set the SQL Server proxy service to

Explain basic SQL syntax and SQL syntax

Explain basic SQL syntax and SQL syntax 1. Create a database Create database Name 2. delete a database Drop database name 3. Back up SQL server The device that creates the backup data Use master Exec sp_addumpdevice 'name', 'new name', 'path' Start

Total Pages: 923 1 .... 150 151 152 153 154 .... 923 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.