-- Requirement Description:/* ID Col ---------- ab00001 aab00002 B -- when data is inserted, the ID is automatically changed to ab00003 */-- 1. evaluate the maximum value method (not applicable in high concurrency, but an introduction) -- test data
SMO is short for objecmanagement objects. It is a management object provided by sql2005. It is a logical evolution version of SQL-DMO. Its main function is C: microsoft under/program files/Microsoft SQL Server/90/SDK/assemblies. sqlserver. SMO. DLL
SQL Server contains several extended stored procedures that can access the system registry. However, these extended stored procedures are not made public,
These stored procedures are available in SQL Server 7.0 and are retained in SQL Server 2000
It is difficult to back up data on the server through regular automatic backup of SQL Server databases through job scheduling. It is very painful to manually back up data on a daily or regular basis. Here we introduce a method for creating automatic
Exec sp_msforeachtable@ Precommand = N'Create Table ##(Table Name sysname,Number of records int,Reserved space nvarchar (10 ),Use space varchar (10 ),Index space varchar (10 ),Unused space varchar (10 ))',@ Command1 = n' insert # exec sp_spaceused ''
Check whether the IP address of the ping server can be pinged.
This is to see whether the physical connection to the remote SQL Server 2000 Server exists. If not, check the network and check the configuration. Make sure that the IP address of the
Partial transaction rollback in SQL Server
1. Save point: a partial rollback method. You can name a storage point so that you can roll back to the storage point in subsequent transactions. 2. Implementation Code. Begin transaction transaction_name
Because I recently used C to connect to SQL Server, but I found that there is not much information on the Internet, so I collected the information and experiences I found over the past two days and kept it for myself.
Use the C language to connect
In this example, we will review it again because we have already learned it at the beginning of ado.net.
Master the connection string.
The process is:
1. Reference System. Data. sqlclient. Access references system. Data. oledb, which is different.
2
Here, the version I refer to refers to the differences between 2008, and, rather than the Enterprise Edition AND THE DEVELOPMENT edition. from the official statement, SQL Server allows the database to be restored from the lower version to the higher
1. Open another data volume
1.
Open another data table in SQL Server
(1). Select * From OpenRowSet ('sqloledb', 'sprogram '; 'develop'; '123', 'select * From kind ')
(2). Select * From OpenRowSet ('sqloledb', '192. 1.1.247'; 'develop'; '123',
Use the data adapter sqldataadapter
Sqldataadapter ad = new sqldataadapter (); // create the connection object sqlconnection conn = new sqlconnection (); Conn. connectionstring = "Data Source =. \ sqlexpress; initial catalog = database; user id =
Declare flag cursor scroll dynamic/* scroll indicates that the cursor pointer can be moved freely (otherwise, the cursor can only be moved forward), and dynamic indicates that the cursor can be read and written (otherwise, the cursor is read-only )
When Microsoft SQL Server or SQL Server Agent is restarted, the Service may fail to be started and the following error message is displayed:
Error 1069: the service cannot be started due to logon failure.
Cause
This problem occurs because the
This article from http://www.saike.org/blogs/vbasic/archive/2008/07/17/sql-server-select-set.aspx
SQL Server assigns values to Defined variables in two ways: Set and select.The difference between the two methods has been described in detail in
Database creation and Deletion
First, start the Service Manager:
Next, open the Enterprise Manager:
Right-click the "Database" folder and select "New Database". The dialog box is displayed as follows:
Enter the name of the database you want to
Transaction log file is a file used to record database updates with the extension LDF.In SQL Server 7.0 and SQL Server 2000, if the automatic growth function is set, the transaction log file is automatically expanded.Generally, when the maximum
SQL-server and MySQLNo big differenceBoth databases can run normally under. Net or J2EE, and raid can also be used. The difference is that some control code names are different, but the functions are mostly the same.
SQL Server
Use VB to send SQL statementsYou can use the data binding control to enter data and use SQL statements to enter data in the server database.
1. Use the data binding control to input data
Using the data binding control to input data can run less
)*********/
-- Eg.-- Use the trace account (performancetest) to track SQL Server events.-- Create a trace Logon account (performancetest) and grant it the alter trace and view server state permissions.Use masterCreate login performancetest with
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.