In the SQL Server 2008 database. In order to prevent the loss of data we need to back up the database on time. If you want to back up every day, the manual backup will be very troublesome, automatic backup of the words do not need to be so
Objective: This article as long as the record, the process of the birth of the tool, the role of the technology is too simple to say that there is no technology ~ mainly exercise the ability to write articles!Body:In the development of projects,
Change the collation of the database, SQL hint 5030 error, the error message is as follows:The database could not being exclusively locked to perform the operation.Workaround:1. Set the ristrict Access for the database to Single_user.2. Execute the
A Program execution unit (unit) that accesses and may update various data items in a database consists of multiple SQL statements that must be executed as a wholeThese SQL statements are submitted to the system as a whole, either executed or not
Any pages that are modified in the buffer are marked as dirty pages. Writing this dirty page to the data disk is the work of checkpoint or lazy writer. In front of the general said a bit about checkpoint, this will be a simple understanding of this
Method One:
Use [master]
GO
ALTER DATABASE dnname SET RECOVERY simple with no_wait
GO
ALTER DATABASE dnname SET RECOVERY Simple--Easy mode
GO
Use Dnname
GO
DBCC shrinkfile (N ' Dnname_log ', one, truncateonly)
GO
Use [master]
Recently, the development system used SqlServer2008 R2, but due to the increase of the system data pressure, ready to add a database synchronized with the official databases, used for the interface and reports to use, so began to the SQL Server in
A tool curl must be prepared in advance to place it on the C drive. Then, install 7z on the server where the database resides. Finally, the 2 stored procedures are executed, and a new job is created in the agent of SQL Server to implement the backup
1, Calculate absolute value ABSThe ABS function calculates an absolute value (except for the bit data type) for a numeric expression result, which returns an integer.Syntax structure:ABS (numeric expression)Return value: Data that is consistent
How to obtain primary foreign key relationships in SQL Server 2008:Transferred from: http://www.cnblogs.com/ke10/archive/2012/06/11/2544655.htmlSELECT object_name (con.constid) ' Relationship name ',object_name (Sf.fkeyid) ' primary key table ',Fcol.
1. QuestionsOnce encountered a strange problem: usingsp_helptext XXXThe name of the function definition queried is different from the name of the functor,sp_helptextThe actual querySys.all_sql_modulesof this system view. Query this view
1. Delete Log
2. Clear the Log
3. Shrinking database files
4. truncating the transaction log
The performance of the database is the DBA need to focus on, the increase of log files seriously affect the performance of the database,
Perform a SQL Server database backup with Windows batch commandsSet up Mybackup.bat, enter the following to run the script directly, you can start to automatically back up the database or add the script to the Windows task plan to execute.-----------
--distinct (remove duplicate data)Select distinct time from highttable--betweenSELECT * from Highttable where ID between 1 and 2--orSELECT * from highttable where id=1 or id=2--and and OR combinationSELECT * from highttable where (id=1 or ID =2) and
A recent requirement is to synchronize data across libraries, where two databases are distributed over two physical computers, and automatic periodic synchronization can be done through SQL Server Agent jobs, but only if a stored procedure is
SELECT * fromtable_aGO SELECT * fromTable_bGO --Internal Connection SELECTA.*B.* fromTable_a AJOINTable_b B ona.ID=b.idSELECTA.*B.* fromTable_a AINNER JOINTable_b B ona.ID=b.idGO --the form of an internal connection equivalent direct multiple
Http://www.cnblogs.com/CareySon/archive/2012/03/07/2383690.htmlIntroductionThe merge keyword is a magical DML keyword. It was introduced in SQL Server 2008, it can be insert,update,delete simple and as a sentence. MSDN's interpretation of the merge
SQL Server 2016 query storage performance optimization summary, 2016 Performance Optimization
As a DBA, troubleshooting SQL Server problems is one of our responsibilities. Every month, many people bring us various performance problems that cannot be
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.