Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8cc7761

Browse files
author
Randy Costner
committed
Added documentation comments
1 parent fd5e502 commit 8cc7761

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

‎Powershell/CopyDatabase.psm1

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,30 @@
55
.Description
66
Copies schema, structure (tables, views, etc.), to an empty SQL Server databaase. Also supports copying data via bcp.
77
8-
.Parameter ServerName - Database to copy from
9-
.Parameter DestinationServer - Database to copy to
10-
.Parameter SourceUser - Database User for the source database
11-
.Parameter SourcePassword - Password for the source database
12-
.Parameter DestinationUser - Database User for the destination database
13-
.Parameter DestinationPassword - Password for the destination database
14-
.Parameter SourceDatabase - name of the databse to copy too
15-
.Parameter DestinationDB - name of the destination database
16-
.Parameter CopyData = - flag to trigger bulk copy of data to destination database
17-
.Parameter fileName - Path to the Schema.sql file included in this repo ".\ExtractDB\Schema.sql"
18-
.Parameter tempPath - A temp directory on a drive with enough free space to save the bcp files during the export and import operations ".\BCP\"
19-
.Parameter logPath - directory to write error logs too ".\log\"
8+
.Parameter ServerName
9+
Database to copy from
10+
.Parameter DestinationServer
11+
Database to copy to
12+
.Parameter SourceUser
13+
Database User for the source database
14+
.Parameter SourcePassword -
15+
Password for the source database
16+
.Parameter DestinationUser
17+
Database User for the destination database
18+
.Parameter DestinationPassword
19+
Password for the destination database
20+
.Parameter SourceDatabase
21+
Name of the databse to copy too
22+
.Parameter DestinationDB
23+
Name of the destination database
24+
.Parameter CopyData
25+
Flag to trigger bulk copy of data to destination database
26+
.Parameter fileName
27+
Path to the Schema.sql file included in this repo ".\ExtractDB\Schema.sql"
28+
.Parameter tempPath
29+
A temp directory on a drive with enough free space to save the bcp files during the export and import operations ".\BCP\"
30+
.Parameter logPath
31+
Directory to write error logs too ".\log\"
2032
2133
2234
#>
@@ -32,7 +44,7 @@ function copy-database{
3244
$SourceDatabase,
3345
$DestinationDB ,
3446
$CopyData,
35-
$fileName,
47+
$fileName="..\ExtractDB\Schema.sql",
3648
$tempPath,
3749
$logPath
3850
)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /