benchmarkdataload.cmd

来自「基于微软的 ASP.NET+C#开发的PETSHOP(网上宠物店)项目,在性能及」· CMD 代码 · 共 86 行

CMD
86
字号
@Echo Off

REM ***************************************************************************
REM **        File: _BenchmarkDataLoad.cmd
REM **        Name: BenchmarkDataLoad
REM **        Desc: Load data for Benchmark.
REM **
REM **        Date: 11/6/2001
REM **
REM **************************************************************************/

REM Use the following section to set the server and sa password
REM of the SQL Server on which you want to create the database.
setlocal
REM set SERVER=%1
REM set LOGIN=%2
REM set PWD=%3

set SERVER=localhost
set LOGIN=sa
set PWD=
set DBNAME=petshop

@Echo.
@Echo *******************************************************************************
@Echo * Microsoft.NET PetShop Blueprint Application - Benchmark Database Setup      *
@Echo *                                                                             *
@Echo * BENCHMARK DATA LOAD                                                         *
@Echo *   50,000 rows will be inserted into the Items table                         *
@Echo *   50,000 rows will be inserted into the Inventory table                     *
@Echo *    1,000 rows will be inserted into the Products table                      *
@Echo *                                                                             *
@Echo * DATABASE CHANGES                                                            *
@Echo *   Search results are limited to the top 25 results.                         *
@Echo *   Get Item results are limited to the top 25 results.                       *
@Echo *   Get Product results are limited to the top 50 results.                    *
@Echo *                                                                             *
@Echo * This script will load the database with data for the Benchmark              *
@Echo * If you wish to cancel, press [CTRL]-C and terminate the batch job.          *
@Echo *                                                                             *
@Echo *******************************************************************************
@Echo. 
pause

@Echo.
@Echo.
@Echo *******************************************************************************
@Echo * Delete original Data...                                                     *
@Echo *******************************************************************************
@Echo. 
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i TruncateTables.sql

@Echo.
@Echo.
@Echo *******************************************************************************
@Echo * Inserting the Benchmark Data...                                             *
@Echo *******************************************************************************
@Echo. 
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "Create 1,000 Products.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "Create 50,000 Items.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "Create 50,000 Inventory.sql"

@Echo.
@Echo.
@Echo *******************************************************************************
@Echo * Updating the Stored Procedures...                                           *
@Echo *******************************************************************************
@Echo. 
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upItemGetList_ListByPage_Benchmark.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upProductGetList_ListByPage_Benchmark.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upProductSearch_ListByPage_Benchmark.sql"

osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upItemGetList_Benchmark.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upProductGetList_Benchmark.sql"
osql -S %SERVER% -U %LOGIN% -P %PWD% -d %DBNAME% -i "upProductSearch_Benchmark.sql"


@Echo.
@Echo *******************************************************************************
@Echo *                                                                             *
@Echo * Benchmark Database Setup Script Complete                                    *
@Echo *                                                                             *
@Echo *******************************************************************************
@Echo. 
pause

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?