1 • Services to control the database
Run cmdIn the Control Panel, enter net start MSSQLserver (Start database service)In Control Panel, enter net stop MSSQLserver (Shutdown database service)Enter net continue MSSQLserver (continue database
Use DatabaseNameDeclare @tblname char (100)Declare @sql char (5000)Declare table_cursor cursor for select name from sysobjects where name like ' tb_card[_]% ' and name<> ' Tb_card_regi St ' and Name<> ' Tb_card_item ' and name<> ' tb_card_discrule '
SQL Server data full synchronization [Finalize]Copyright, reproduced Please specify the source, thank you! after two days of simultaneous writing and testing, the first release version was made:1. This function only supports one-way synchronization,
Use of SQL Server temporary tables
DROP table #Tmp--Delete temporary table #tmpCREATE TABLE #Tmp--Creating a temporary table #tmp(ID int IDENTITY (FIRST) NOT null--creates the column ID and adds 1 each time a new record is addedWokno
Background:Cursors control the behavior of server-side cursors, with the associated T-SQL as follows:Declare, open, Fetch, close, deallocate.1.Cursor_close_on_commit{on | off};If set to on closes the open cursor when the transaction commits or rolls
A valid method is to execute the following script: (Bigdata is the database name) use database name; go alter database database name set RECOVERY Simple; -- Set the simple recovery model go DBCC Shrinkfile (database name _log, 1 go
Ø Index1. What is an indexAn index is a list of data in a data table and a corresponding storage location that can be used to increase the speed of finding data in a table or view.2. Index classificationthe indexes in the database are divided into
Anatomy of SQL Server eighth Orcamdf now supports multi-data file database (translation)http://improve.dk/orcamdf-now-supports-databases-with-multiple-data-files/Orcamdf one of the newest features is a database that supports multiple data files.
In SQL Server performance tuning, there is an unmatched problem: how do you work with temporary datasets in code that takes a long time or is frequently called? Table variables and temporary tables are two choices. Remember that a large number of
Following the last SQL Server spatial task,The author also received a new task:When the Database property field changes, the spatial data is automatically updated without changing the business code.The first solution that comes to mind is the
Looking for a half day, did not find there can modify the code. Back again on the Internet search solutions, the answer is few, foggy.Later on the CSDN search on a piece of Crystal report garbled solution, a try, the same can be solved.In fact, it
The current index structure for SQL Server is as follows:This is the storage form of the clustered index:Nonclustered indexes are in the following ways:They are stored in the data structure of a B + tree.I believe we have seen similar graphs, but
One, trigger definition and creation:A trigger (trigger) is a special stored procedure whose execution is not invoked by the program or manually, but is triggered by an event, such as when an operation on a table (insert,delete,update) activates it
Method 1, sys.databases;--------------------------------------------------------------------------------------------------------------- -------------------------------------------Log file Growth reason:1, the database recovery is not simple, but for
Most of the time, when we plan the space for a SQL Server database, or space for storage, we need to estimate the size of the required database space, and the simplest way to estimate the future is to look at past trends, which is often the most
Original: SQL Server bulk log file processingOptimized processing for SqlServer2000, SqlServer2005, SqlServer2008, SqlServer2012, and SqlServer2014 library log files, reducing disk space.Processing method:The following columns are
1. Environment Preparation
confirm that two machines have a stable intranet environment with enough bandwidth to have the same version of Windows and SQL Server.
Verify that the SQL Server ports for the two machines are open in the firewall
Description--PRIMARY KEY constraint (Primary key constraint): The data of the primary key column is required to be unique and is not allowed to be empty.--Unique Constraint: Requires the column to be unique, allowed to be empty, but only one null
Today, when doing data analysis report, encountered a problem like this.The table structure is as follows.Department code, department name, department personnel ID (separated by commas)I want to check out a new dataset by linking to the people table
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.