As long as interaction is involved, it will certainly deal with data. Maybe there is not much such content on the Internet, no matter how many, each summary is experience-based, and is carefully prepared, it may be for your future use without being forgotten, or for sharing resources, learning together, and making progress together. The following is a summary of the query statements used to extract 10 data records from common databases such as
Enable AD Hoc distributed Queries: ' Show advanced Options ', 1
Reconfigure
' Ad Hoc distributed Queries ', 1
Reconfigure
When you are finished using, close ad Hoc distributed Queries:' Ad Hoc distributed Queries ', 0
Reconfigure
' Show advanced Options ', 0
Reconfigure
Operation:
' SQLOLEDB ' ' SQL Server name ' ' User name ' ' Password '
' SQLOLEDB ' ' S
The SQL statement obtains the names of all databases on the database server. Generally, it is okay for the author.
The SQL statement obtains the names of all databases on the database server. Generally, it is okay for the author.
As a student of Mathematics Major, we took the SQLserver2005 course in our sophomore year. Throughout the course, I have introduced some Insert, Delete, Update, and Select statements about SQL Server databases. Now, when I am studying computer science, I will re-access this course and get to know it again. Let's take a look at some of the tips: SQLserver
/************************************ **************************************** ******
* * Function Description: backs up and recovers SQL Server databases * Author: Liu gongxun; * version: v0.1 (C #2.0 ); time: 2007-1-1 * when using SQL Server, reference sqldmo in the
-school_web_db" dialog box that appears, select "Source Device", and then click on the "..." button later, (7):Figure (7)3. In the "Specify Backup" dialog box that appears, click the "Add" button, (8):Figure (8)4, find the path of the database backup, select the database you want to restore "dsideal_school_db" (Note: File type Select all files), and then " two times " click the "OK" button, (9):Figure (9)5. In the "Restore Database-dsideal_school_db" dialog box that appears, tick the check box b
Other options, locate restrict access. Select "Single_user" and click "OK" button, such as:3, follow the normal restore database steps, restore the database.2, attach, separate is the databaseSeparation:1) Right-click on "Task"-"detach" in a database that you want to detach2) Eject the Detach Database window and click OK.3) Move the detached data elsewhere (as long as it is not in the original disk database folder)Additional:1) Back to the database management platform, right-click on "Database"
msdn, sys. in the sysprocesses table, there is a field blocked, and all the deadlock process data greater than 0 is the database. Then, run KILL + SPID (process ID) to KILL the deadlock process, this is the main idea.
2. regularly Killing the database deadlock Process
For the process of regularly Killing database deadlocks, pay attention to the following two points:
1. The execution sequence. Now the master database creates the stored procedure and then creates the job.
2. the Execution Code of
enterprise rules are put into the database server for centralized control.
Stored procedures can be divided into system stored procedures, extended stored procedures, and user-defined stored procedures
System stored Procedures
Let's take a look at the system stored procedures, the system stored procedures are defined by the system, mainly in the master database, the name begins with "SP" or begins with "XP". Although these system stored procedures
=null;ResultSet Rs=null;try {1. Load DriverClass.forName ("Com.microsoft.sqlserver.jdbc.SQLServerDriver");String url= "Jdbc:sqlserver://localhost:1433;databasename=test1";String user= "sa";//sa Super AdminString password= "123456";//Password2. ConnectCt=drivermanager.getconnection (Url,user,password);3. Create the Send side pstmt = Conn.preparestatement ("INSERT into the staff (name, age) VALUES (?,?)"); Set the specific value of the insert by using the Set method in the PreparedStatement objec
Topics: Listing code for all libraries on SQL Server
First: dbo permissions list all databases on the server
Copy Code code as follows:
Dim SRV
Dim Objdb
Set srv = Server.CreateObject ("SQLDMO.") SQL Server ")
Srv. Lo
("SQLDMO. DBFile ")
With Odbfiledata
. Name = sdatabasename "_data"
. PhysicalName = Sdatapath "\" Sdatabasename "_data.mdf"
. Primaryfile = True
. FileGrowthType = SQLDMOGROWTH_MB
. FILEGROWTH = 1
End With
To create a log file object
Set ologfile = Server.CreateObject ("SQLDMO. LogFile ")
With Ologfile
. Name = sdatabasename "_log"
. PhysicalName = Sdatapath "\" Sdatabasename "_log.ldf"
End With
To add DB file objects and log file objects to a database object
Odatabase.filegroups ("P
"Source Device", and then click on the "..." button later, (7):Figure (7)3. In the "Specify Backup" dialog box that appears, click the "Add" button, (8):Figure (8)4, find the path of the database backup, select the database you want to restore "dsideal_school_db" (Note: File type Select all files), and then " two times " click the "OK" button, (9):Figure (9)5. In the "Restore Database-dsideal_school_db" dialog box that appears, tick the check box before "Select the database under user restored
I have done such a thing some time ago, and moved all the databases (except SQL server system files) originally on drive C to drive D, it is mainly used to facilitate subsequent management and reduce disk I/O blocking (C and D are two independent disks ).
The script is very simple. It is recorded here to avoid future forgetting and reuse convenience:
This scr
Tags: style blog http color using AR strong data SPWe know that the datetime type in this SQL Server database is a data type that is often used in database application development, and the C # language also has a DateTime type, although both are used to describe time, but their default values are different, which must be noted in the development process , it is a waste of time to deal with the relationship
the
+ while(Myread. Read)'not empty then read all the time
A
theMyread. GetValues (MYSTR)'performs a read action, storing a row of data in the MYSTR array
+MyTable. Rows.Add (MYSTR)'add array data as a row to the table
- End while
$
$ 'bind a table to a real-world control
-Datagridview1.datamember ="mytable"
-Datagridview1.datasource =mytable the
-Myread. Close ()'Turn off Read
WuyiMyconnect. Close ()'Close Connection
the
- End Sub
Wu
-
About
dataset getdataset (string query){Oracleconnection con = new oracleconnection (configurationsettings. etettings ["oracle"]);Oracledataadapter da = new oracledataadapter (query, con );Dataset DS = new dataset ();Da. Fill (DS );Return Ds;}
# Endregion}}
Save, close this file, and create another class file sqlhelper. CS to access the SQL-Server database. This class also implements the idal interface. The samp
Label:zyl910I. DescriptionThis tool is suitable for use in the following situations-* Quickly view data and table structure information in the database.* Test the wording of the connection string under ADO.* Help analyze the ADO database operation.Second, usageRun this program.Select the data provider factory in the Provider drop-down box. (if not, try adding the data provider factory configuration to the Zdbviewcs.exe.config).Fill in the connection string in the "ConnectionString" text box.Clic
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.