database server;4. The above is the backup and restore of the data, if it is to involve the database structure of the backup, such as table structure, stored procedures ..... Backup, there are two ways: a "Attach" MDF file, which of course will come with all the information, including data, but in the case of MDF, such as the
SQL server calculates the value of a field in the database, removes duplicate data, and SQL server
Sometimes, some duplicate data exists in the database, but we want to calculate the value of a field, and we need to remove the dup
query, the query time is proportional to the total length of the field value, so the char type cannot be used, but varchar. Create a full-text index for a long field value. 9. database server and Application Server are separated. OLTP and OLAP are separated. 10. The distributed partition view can be used to implement Databas
1. view the database version
Select @ version
2. view the operating system parameters of the machine where the database is locatedExec master .. xp_msver
3. view database startup parametersSp_configure
4. view the database startup timeSelect convert (varchar (30), login_time, 120) from Master .. sysprocesses where spi
This article is reproduced from the busy CuckooHow do I connect to a database using connection objects?For the different. NET data provider, ADO. NET uses different connection objects to connect to the database. These connection objects shield us from specific implementation details and provide a unified approach to implementation.There are four types of connection: Sqlconnection,oledbconnection,odbcconnect
procedure in the database.
Column Name
Data Type
Description
Name
sysname
The name of the column name or procedure parameter.
Id
Int
The object ID of the table to which this column belongs, or the ID of the stored procedure associated with this parameter.
Xtype
tinyint
The physical storage type in the sys.types .
Typestat
tinyint
Identification is fo
Tags: Manage user name picture data source link Server Studio List C # databaseWhen involved in the old project data migration, the database structure has changed completely, and the old data needs to be treated with special fields, and the data is large, using Navicat to export a single table, a table data about more than 1 million, the direct export of SQL exec
SQL Server authentication)
If you need to modify the authentication mode later, you can modify and save the corresponding value and restart the SQL Server service.
4 SQL Server 2000 data
;pwd=sa "; String constr = "Data source=.; Initial Catalog=myschool;uid=sa;pwd=sa "; about integrated Security=sspi/ture/false in SQL connection statements
Workaround:
namely: Security Support Provider Interface
When the integrated security is set to True, the UserID in front of the connection statement, PW, is not working, that is, the Windows Authentication mode.
Only set to False or omit the item
, modify, delete) to stored procedures. Dealing with SQL with transactions
Statement writing stored procedures can be used to package and standardize your data access, and stored procedures are actually stored in the database. Stored Procedures
Can be either with parameters or without parameters, either by database programs or manually by
Detach the database as follows:use master go sp_detach_db ‘mydb‘ go
Then, copy the data and log files from the current location (D:\Mssql7\Data) to the new location (E:\Sqldata).
Reattach the databases that point to the files in the new location as follows:use master go sp_attach_db ‘mydb‘,‘E:\Sqldata\mydbdata.mdf‘,‘E:\Sqldata\mydblog.ldf‘ goUse sp_helpfile to confirm file location changes:use mydb go sp_helpfile go
How to move
Tags: table name head mod using method ROM SQL Server replace IntermediateNormal spacesBefore and after spaces, use LTrim and RTrim, for example: LTrim (RTrim (Name))Middle space, replace with replace function, for example: replace (Name, ' ', ')If it is an ordinary space, it is easy to replace, but sometimes encounter some special spaces, it is more troublesome, it looks like the ordinary space, but it is
Author: liigo
Date: 2010/8/25
Original: http://blog.csdn.net/liigo/archive/2010/08/24/5834450.aspx
Reprinted please indicate the source: http://blog.csdn.net/liigo
Microsoft SQL Server database stored procedures, according to their input and output data, can be divided into the following general situations or their combination: no input, one or more input parame
Because the old American does not support Chinese SQL statementsFirst: Change the field type to Nvarchar,ntextSecond: Forced conversions NUPDATE dbo. Role set rolename=n ' Normal user 'UPDATE dbo. Type set typetitle=n ' popular herd ', descrption=n ' popular herd 'where typeid=6Insert into Type (typetitle,descrption, Createtime, State, Parenttypeid) VALUES (n ' {0} ', n ' {1} ', n ' {2} ', {3},{4} If you u
Tags: style blog http io color ar os using SP PrefaceThis article is mainly a supplement to the previous article, we introduced the SQL Server service startup process encountered some problems and solutions, you can click to view, we mainly describe the SQL Server startup process about the user
Overview
Database mirroring is a software-based solution for high availability of databases. It maintains two identical copies of a database, each of which is placed in separate instances of the SQL Server database. It is recommended that you use two servers in different lo
Tags: technology sharing and adding a database synchronization management type simple to solve REMOverview Database mirroring is a software-based solution for database high availability. It maintains two identical copies of a database, each of which is placed in a different instance of the
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.