home | login | register | DMCA | contacts | help |      
mobile | donate | ВЕСЕЛКА

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
А Б В Г Д Е Ж З И Й К Л М Н О П Р С Т У Ф Х Ц Ч Ш Щ Э Ю Я


my bookshelf | genres | recommend | rating of books | rating of authors | reviews | new | форум | collections | читалки | авторам | add
fantasy
space fantasy
fantasy is horrors
heroic
prose
  military
  child
  russian
detective
  action
  child
  ironical
  historical
  political
western
adventure
adventure (child)
child's stories
love
religion
antique
Scientific literature
biography
business
home pets
animals
art
history
computers
linguistics
mathematics
religion
home_garden
sport
technique
publicism
philosophy
chemistry
close

реклама - advertisement





ЛИСТИНГ 8.1. Содержимое командного файла Create Scripts.cmd

@echo off

REM: Command File Created by Microsoft Visual Database Tools

REM: Date Generated: 8/29/2002

REM: Authentication type: Windows NT

REM: Usage: CommandFilename [Server] [Database]

if '%1' == '' goto usage

if '%2' == '' goto usage

if '%1' == '/?' goto usage

if '%1' == '-?' goto usage

if '%1' == '?' goto usage

if '%1' == '/help' goto usage

osql -S %1 -d Master -E -b -i "JACKIE-TECRA.Novelty.DBS"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d Master -E -b -i "Novelty.DBS"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblCustomer.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblCustomer" in "dbo.tblCustomer.dat" -S %1 -T -k -n – q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 %2 E -b -i "dbo.tblDepartment.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblDepartment" in "dbo.tblDepartment.dat" -S %1 – Т -k – n – q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 – d %2 – E -b -i "dbo.tblEmployee.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblEmployee" in "dbo.tblEmployee.dat" – S %1 – Т -k – n -q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblInventory.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblInventory" in "dbo.tblInventory.dat" -S %1 -Т -k

if %ERRORLEVEL% NEQ 0 goto errors

osql – S %1 – d %2 – E – b -i "dbo.tblOrder.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblOrder" in "dbo.tblOrder.dat" -S %1 -T -k -n -q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrderItem.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblOrderItem" in "dbo.tblOrderItem.dat" -S %1 -T -k -n -q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblRegion.tab"

if %ERRORLEVEL% NEQ 0 goto errors

bcp "%2.dbo.tblRegion" in "dbo.tblRegion.dat" -S %1 -T -k -n -q

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblCustomer.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblDepartment.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblEmployee.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tbllnventory.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrder.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrderItem.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblRegion.kci"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblCustomer.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblDepartment.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblEmployee.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblInventory.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrder.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrderItem.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblRegion.fky"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblCustomer.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblDepartment.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblEmployee.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblInventory.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrder.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblOrderItem.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.tblRegion.ext"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.EmployeeDepartment_view.viw"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.qryEmployee_view.viw"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.DeleteEmployee.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.GetCustomerFromID.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.InsertEmployee.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.LastNameLookup.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.procEmployeesSorted.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.SelectEmployees.prc"

if %ERRORLEVEL% NEQ 0 goto errors

osql -S %1 -d %2 -E -b -i "dbo.UpdateEmployee.prc"

if %ERRORLEVEL% NEQ 0 goto errors

goto finish

REM: How to use screen

:usage

echo.

echo Usage: MyScript Server Database

echo Server: the name of the target SQL Server

echo Database: the name of the target database

echo.

echo Example: MyScript.cmd MainServer MainDatabase

echo.

echo.

goto done

REM: error handler

:errors

echo.

echo WARNING! Error(s) were detected!

echo____________________

echo Please evaluate the situation and, if needed,

echo restart this command file. You may need to

echo supply command parameters when executing

echo this command file.

echo.

pause

goto done

REM: finished execution

:finish

echo.

echo Script execution is complete!

:done

@echo on


НА ЗАМЕТКУ | Обработка баз данных на Visual Basic®.NET | НА ЗАМЕТКУ