-
Do you have SQL Server 2000 installed on your computer? If you install it, use the query analyzer, open the file in the interface, press f5 to execute, and the result will be generated, but the language must have a corresponding database file. Comments are made with *
Additive, not in the way of --.
-
I have a large SQL file to play back and need to do it immediately, but I am afraid of crushing the business, what should I do?
Let's start by building a test library
Stuff some data into:
Take a look at the results of our populating data:
Use mysqldump to export a copy of the data:
Now let's say we want to put this dump file back into a database, and now the database is taking on a lot of business, and we don't want the business to be affected too much.
Let's take a look at what happens if you play back the dump file directly.
We see that the MySQL CPU will blush, <> we play back dump:
Take a look at CPU stress:
You can see that the CPU is already very calm and processing the data slowly.
Tip: The PV tool can be used both to display the progress of a file stream and to limit the rate of a file stream. In this experiment, we use PV to limit the speed of sending SQL files to MySQL Client, so as to limit the playback speed of SQL files without affecting other services.
-
You can use batch processing to call isql to executesql file.
3. Run the batch processing to execute, and the SQL statement in it.
-
You can store all the sql files in a folder, use the script to read each file in a loop, you just run the script and you're good to go, here's the import data**.
mysql -u username -p database_name < storage location.
mysqljump -u root -p test < c:/
-
Go statement function: as the end of a batch process.
1. The SQL statement between the two GO goes is processed as a batch.
2. One or more transact-sql statements can be included in a batch to become a statement group.
3. The statement group is sent from the application to the SQL Server server for execution at one time.
4. The SQL Server compiles the batch into an executable unit, which is called the execution plan.
Not every statement is followed by go, but there are some places where it must be used, such as: in create database database name; and use databasename; The reason is that you must first execute the build database command before you can open that database.
-
Merge these files into one large file and run them all at once.
-
SQL Server Management Studio connects to the database and opens File in the menu File *sql, toolbar point execution.
1. Open the sqlyog software, open a database connection, and display the created database after the connection. >>>More
select * from (select top size * from (select top size*page a.*,from table1 as a join table2 as b on = where = 1 order by order by desc) order by >>>More
Right-click the compressed file and select Add to Compressed File >>>More
Step 1: Select the compressed file.
Press Win+E to start the "Explorer", then select the file or folder you want to compress (you can use the Ctrl and Shift keys to multi-select), right-click, and select Winrar "Add to Package" command, then Winrar will open the "Package Name and Parameters" window. >>>More
I often hear others say that someone's pattern is too small, so what is the pattern? The author thinks that the pattern is actually a person's attitude towards others and things, to put it bluntly, it is the amount of bearing and tolerance, and people with a big pattern have a large atmosphere, the so-called prime minister can support the boat in his belly, and the general's forehead can run a horse! The so-called small pattern is a small plan, often because of trivial things, contradictions and frictions with others, in the long run, it will discourage others, and finally become a lonely person. >>>More