100% found this document useful (1 vote)
7 views

Pro Oracle SQL Development: Best Practices for Writing Advanced Queries 2nd Edition Jon Heller instant download

Pro Oracle SQL Development: Best Practices for Writing Advanced Queries, 2nd Edition by Jon Heller provides comprehensive guidance on writing efficient and advanced SQL queries. The book covers essential topics such as relational databases, efficient development processes, testing, and advanced SQL features. It serves as a valuable resource for developers looking to enhance their SQL skills and optimize database interactions.

Uploaded by

megetekir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
7 views

Pro Oracle SQL Development: Best Practices for Writing Advanced Queries 2nd Edition Jon Heller instant download

Pro Oracle SQL Development: Best Practices for Writing Advanced Queries, 2nd Edition by Jon Heller provides comprehensive guidance on writing efficient and advanced SQL queries. The book covers essential topics such as relational databases, efficient development processes, testing, and advanced SQL features. It serves as a valuable resource for developers looking to enhance their SQL skills and optimize database interactions.

Uploaded by

megetekir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Pro Oracle SQL Development: Best Practices for

Writing Advanced Queries 2nd Edition Jon Heller


download

https://ebookmeta.com/product/pro-oracle-sql-development-best-
practices-for-writing-advanced-queries-2nd-edition-jon-heller/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Pro T-SQL 2022 2nd Edition Elizabeth Noble

https://ebookmeta.com/product/pro-t-sql-2022-2nd-edition-
elizabeth-noble/

Pro Python Best Practices: Debugging, Testing and


Maintenance 1st Edition Kristian Rother

https://ebookmeta.com/product/pro-python-best-practices-
debugging-testing-and-maintenance-1st-edition-kristian-rother/

Clean C++20: Sustainable Software Development Patterns


and Best Practices 2nd Edition Stephan Roth

https://ebookmeta.com/product/clean-c20-sustainable-software-
development-patterns-and-best-practices-2nd-edition-stephan-roth/

The Church And The Slums The Victorian Anglican Church


And Its Mission To Liverpool s Poor 1st Edition Wilcox

https://ebookmeta.com/product/the-church-and-the-slums-the-
victorian-anglican-church-and-its-mission-to-liverpool-s-
poor-1st-edition-wilcox/
Emotion in the Digital Age : Technologies, Data and
Psychosocial Life 1st Edition Darren Ellis

https://ebookmeta.com/product/emotion-in-the-digital-age-
technologies-data-and-psychosocial-life-1st-edition-darren-ellis/

Psycho Oncology 2021 William Breitbart Editor Phyllis


Butow Editor Paul Jacobsen Editor Wendy Lam Editor Mark
Lazenby Editor Matthew Loscalzo Editor

https://ebookmeta.com/product/psycho-oncology-2021-william-
breitbart-editor-phyllis-butow-editor-paul-jacobsen-editor-wendy-
lam-editor-mark-lazenby-editor-matthew-loscalzo-editor/

At Midnight In Venice Charles Dickens and


Superintendent Jones investigate 5 1st Edition J C
Briggs

https://ebookmeta.com/product/at-midnight-in-venice-charles-
dickens-and-superintendent-jones-investigate-5-1st-edition-j-c-
briggs/

Surgical Instrumentation An Interactive Approach 3rd


Edition Renee Nemitz

https://ebookmeta.com/product/surgical-instrumentation-an-
interactive-approach-3rd-edition-renee-nemitz/

Black Light Entranced Black Light Series Book 33 1st


Edition Rose C Carole

https://ebookmeta.com/product/black-light-entranced-black-light-
series-book-33-1st-edition-rose-c-carole/
The Authoritarian Century China s Rise and the Demise
of the Liberal International Order 1st Edition Ogden
Chris

https://ebookmeta.com/product/the-authoritarian-century-china-s-
rise-and-the-demise-of-the-liberal-international-order-1st-
edition-ogden-chris/
Pro Oracle SQL
Development
Best Practices for Writing Advanced
Queries
Second Edition

Jon Heller
Pro Oracle SQL Development: Best Practices for Writing Advanced Queries
Jon Heller
Clive, IA, USA

ISBN-13 (pbk): 978-1-4842-8866-5 ISBN-13 (electronic): 978-1-4842-8867-2


https://doi.org/10.1007/978-1-4842-8867-2

Copyright © 2023 by Jon Heller


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Jonathan Gennick
Development Editor: Laura Berendson
Coordinating Editor: Jill Balzano
Cover Photo by Avinash Kumar on Unsplash
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole
member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc
is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (https://github.com/Apress). For more detailed information, please visit http://www.
apress.com/source-code.
Printed on acid-free paper
I dedicate this book to my wonderful wife, Lisa, and to my awesome
children, Elliott and Oliver.
Table of Contents
About the Author�����������������������������������������������������������������������������������������������������xv

About the Technical Reviewer�������������������������������������������������������������������������������xvii


Acknowledgments��������������������������������������������������������������������������������������������������xix

Introduction������������������������������������������������������������������������������������������������������������xxi

Part I: Learn How to Learn������������������������������������������������������������������������������ 1


Chapter 1: Understand Relational Databases����������������������������������������������������������� 3
History of Relational Databases���������������������������������������������������������������������������������������������������� 3
Relational Model and Why It Matters�������������������������������������������������������������������������������������������� 6
Relational Model and Why It Doesn’t Matter��������������������������������������������������������������������������������� 9
SQL Programming Language������������������������������������������������������������������������������������������������������ 12
Different Database Types������������������������������������������������������������������������������������������������������������ 16
Key Concepts������������������������������������������������������������������������������������������������������������������������������ 19
Summary������������������������������������������������������������������������������������������������������������������������������������ 28

Chapter 2: Create an Efficient Database Development Process����������������������������� 29


Shared Database vs. Private Database��������������������������������������������������������������������������������������� 29
Create an Infinite Number of Databases������������������������������������������������������������������������������������� 30
Rapidly Drop and Recreate Schemas������������������������������������������������������������������������������������������ 37
Control Schemas with Version-Controlled Text Files������������������������������������������������������������������� 43
Empower Everyone��������������������������������������������������������������������������������������������������������������������� 47
Summary������������������������������������������������������������������������������������������������������������������������������������ 49

v
Table of Contents

Chapter 3: Increase Confidence and Knowledge with Testing�������������������������������� 51


Build Confidence with Automated Tests�������������������������������������������������������������������������������������� 51
Build Knowledge with Minimal, Complete, and Verifiable Examples������������������������������������������� 59
Oracle Detective Kit�������������������������������������������������������������������������������������������������������������������� 67
Summary������������������������������������������������������������������������������������������������������������������������������������ 75

Chapter 4: Find Reliable Sources���������������������������������������������������������������������������� 77


Places to Go�������������������������������������������������������������������������������������������������������������������������������� 78
People to See������������������������������������������������������������������������������������������������������������������������������ 85
Summary������������������������������������������������������������������������������������������������������������������������������������ 86

Chapter 5: Master the Entire Stack������������������������������������������������������������������������ 87


Not Just Faster���������������������������������������������������������������������������������������������������������������������������� 87
Typing������������������������������������������������������������������������������������������������������������������������������������������ 89
Operating Systems and Supporting Programs���������������������������������������������������������������������������� 90
SQL and PL/SQL�������������������������������������������������������������������������������������������������������������������������� 93
SQL*Plus������������������������������������������������������������������������������������������������������������������������������������� 94
Integrated Development Environment���������������������������������������������������������������������������������������� 96
Worksheets, Notebooks, Snippets, Scripts, and Gists����������������������������������������������������������������� 99
Summary���������������������������������������������������������������������������������������������������������������������������������� 103

Part II: Write Powerful SQL with Sets and Advanced Features������������������� 105
Chapter 6: Build Sets with Inline Views and ANSI Join Syntax���������������������������� 107
Spaghetti Code from Nonstandard Syntax�������������������������������������������������������������������������������� 107
Too Much Context��������������������������������������������������������������������������������������������������������������������� 112
Sets, Chunking, and Functional Programming to the Rescue��������������������������������������������������� 115
Inline Views������������������������������������������������������������������������������������������������������������������������������� 119
ANSI Joins��������������������������������������������������������������������������������������������������������������������������������� 123
Example������������������������������������������������������������������������������������������������������������������������������������ 123
Summary���������������������������������������������������������������������������������������������������������������������������������� 126

vi
Table of Contents

Chapter 7: Query the Database with Advanced SELECT Features������������������������� 127


Operators, Functions, Expressions, and Conditions������������������������������������������������������������������ 128
CASE and DECODE�������������������������������������������������������������������������������������������������������������������� 131
Joins����������������������������������������������������������������������������������������������������������������������������������������� 133
Sorting�������������������������������������������������������������������������������������������������������������������������������������� 140
Set Operators���������������������������������������������������������������������������������������������������������������������������� 142
Advanced Grouping������������������������������������������������������������������������������������������������������������������� 146
Analytic Functions��������������������������������������������������������������������������������������������������������������������� 151
Regular Expressions����������������������������������������������������������������������������������������������������������������� 155
Row Limiting����������������������������������������������������������������������������������������������������������������������������� 160
Pivoting and Unpivoting������������������������������������������������������������������������������������������������������������ 163
Table References���������������������������������������������������������������������������������������������������������������������� 169
Common Table Expressions������������������������������������������������������������������������������������������������������ 171
Recursive Queries��������������������������������������������������������������������������������������������������������������������� 175
XML������������������������������������������������������������������������������������������������������������������������������������������� 179
JSON����������������������������������������������������������������������������������������������������������������������������������������� 183
National Language Support������������������������������������������������������������������������������������������������������ 188
Summary���������������������������������������������������������������������������������������������������������������������������������� 193

Chapter 8: Modify Data with Advanced DML�������������������������������������������������������� 195


INSERT�������������������������������������������������������������������������������������������������������������������������������������� 196
UPDATE������������������������������������������������������������������������������������������������������������������������������������� 197
DELETE�������������������������������������������������������������������������������������������������������������������������������������� 198
MERGE�������������������������������������������������������������������������������������������������������������������������������������� 200
Updatable Views����������������������������������������������������������������������������������������������������������������������� 202
DML Hints���������������������������������������������������������������������������������������������������������������������������������� 203
Error Logging���������������������������������������������������������������������������������������������������������������������������� 205
Returning���������������������������������������������������������������������������������������������������������������������������������� 207
TRUNCATE��������������������������������������������������������������������������������������������������������������������������������� 208
COMMIT, ROLLBACK, and SAVEPOINT��������������������������������������������������������������������������������������� 211
ALTER SYSTEM�������������������������������������������������������������������������������������������������������������������������� 213

vii
Table of Contents

ALTER SESSION������������������������������������������������������������������������������������������������������������������������� 215


Input and Output����������������������������������������������������������������������������������������������������������������������� 216
Useful PL/SQL Packages����������������������������������������������������������������������������������������������������������� 219
Summary���������������������������������������������������������������������������������������������������������������������������������� 222

Chapter 9: Improve the Database with Advanced Schema Objects���������������������� 223


ALTER���������������������������������������������������������������������������������������������������������������������������������������� 223
Tables���������������������������������������������������������������������������������������������������������������������������������������� 225
Constraints�������������������������������������������������������������������������������������������������������������������������������� 237
Indexes�������������������������������������������������������������������������������������������������������������������������������������� 242
Partitioning�������������������������������������������������������������������������������������������������������������������������������� 248
Views���������������������������������������������������������������������������������������������������������������������������������������� 254
Users����������������������������������������������������������������������������������������������������������������������������������������� 256
Sequences�������������������������������������������������������������������������������������������������������������������������������� 258
Synonyms��������������������������������������������������������������������������������������������������������������������������������� 260
Materialized Views�������������������������������������������������������������������������������������������������������������������� 261
Database Links������������������������������������������������������������������������������������������������������������������������� 264
PL/SQL Objects������������������������������������������������������������������������������������������������������������������������� 265
Other Schema Objects�������������������������������������������������������������������������������������������������������������� 266
Global Objects��������������������������������������������������������������������������������������������������������������������������� 267
GRANT and REVOKE������������������������������������������������������������������������������������������������������������������ 268
Summary���������������������������������������������������������������������������������������������������������������������������������� 269

Chapter 10: Optimize the Database with Oracle Architecture������������������������������ 271


Storage Structures�������������������������������������������������������������������������������������������������������������������� 271
Redo������������������������������������������������������������������������������������������������������������������������������������������ 281
Undo and Multiversion Read Consistency��������������������������������������������������������������������������������� 284
Temporary Tablespace�������������������������������������������������������������������������������������������������������������� 288
Memory������������������������������������������������������������������������������������������������������������������������������������� 289
Caches�������������������������������������������������������������������������������������������������������������������������������������� 290
Multitenant�������������������������������������������������������������������������������������������������������������������������������� 293

viii
Table of Contents

Database Types������������������������������������������������������������������������������������������������������������������������� 294


Summary���������������������������������������������������������������������������������������������������������������������������������� 297

Part III: Write Elegant SQL with Patterns and Styles���������������������������������� 299
Chapter 11: Stop Coding and Start Writing���������������������������������������������������������� 301
The Hypocrisy of Examples������������������������������������������������������������������������������������������������������� 302
Comments��������������������������������������������������������������������������������������������������������������������������������� 303
Choose Good Names����������������������������������������������������������������������������������������������������������������� 307
Whitespace������������������������������������������������������������������������������������������������������������������������������� 309
Make Bugs Obvious������������������������������������������������������������������������������������������������������������������ 311
The Path to Writing Good SQL��������������������������������������������������������������������������������������������������� 315
Summary���������������������������������������������������������������������������������������������������������������������������������� 316

Chapter 12: Write Large SQL Statements������������������������������������������������������������� 317


Imperative Programming Size Limits Do Not Apply������������������������������������������������������������������ 317
One Large SQL Statement vs. Multiple Small SQL Statements������������������������������������������������� 318
Performance Risks of Large SQL Statements��������������������������������������������������������������������������� 320
Performance Benefits of Large SQL Statements����������������������������������������������������������������������� 324
Reading and Debugging Large SQL Statements����������������������������������������������������������������������� 329
Summary���������������������������������������������������������������������������������������������������������������������������������� 333

Chapter 13: Write Beautiful SQL Statements�������������������������������������������������������� 335


How to Measure Code Complexity�������������������������������������������������������������������������������������������� 336
Avoid Unnecessary Aliases������������������������������������������������������������������������������������������������������� 337
Prefixes and Suffixes���������������������������������������������������������������������������������������������������������������� 338
Avoid Abbreviations������������������������������������������������������������������������������������������������������������������� 341
Use Tabs for Left Alignment������������������������������������������������������������������������������������������������������ 342
Avoid Code Formatters�������������������������������������������������������������������������������������������������������������� 345
Lowercase��������������������������������������������������������������������������������������������������������������������������������� 346
Summary���������������������������������������������������������������������������������������������������������������������������������� 347

ix
Table of Contents

Chapter 14: Use SQL More Often with Basic Dynamic SQL����������������������������������� 349
When to Use Dynamic SQL�������������������������������������������������������������������������������������������������������� 349
Basic Features�������������������������������������������������������������������������������������������������������������������������� 354
Bind Variables for Performance and Security��������������������������������������������������������������������������� 355
How to Simplify String Concatenation�������������������������������������������������������������������������������������� 357
Code Generation, Not Generic Code������������������������������������������������������������������������������������������ 361
Summary���������������������������������������������������������������������������������������������������������������������������������� 362

Chapter 15: Avoid Anti-patterns��������������������������������������������������������������������������� 363


Avoid the Second System Syndrome and Rewriting from Scratch������������������������������������������� 363
Avoid the Stringly Typed Entity–Attribute–Value Model������������������������������������������������������������ 365
Avoid Soft Coding���������������������������������������������������������������������������������������������������������������������� 370
Avoid Object-Relational Tables�������������������������������������������������������������������������������������������������� 371
Avoid Java in the Database������������������������������������������������������������������������������������������������������� 372
Avoid TO_DATE�������������������������������������������������������������������������������������������������������������������������� 374
Avoid CURSOR��������������������������������������������������������������������������������������������������������������������������� 377
Avoid Custom SQL Parsing�������������������������������������������������������������������������������������������������������� 378
Avoid Automating Everything���������������������������������������������������������������������������������������������������� 380
Avoid Cargo Cult Syntax������������������������������������������������������������������������������������������������������������ 381
Avoid Undocumented Features������������������������������������������������������������������������������������������������� 381
Avoid Deprecated Features������������������������������������������������������������������������������������������������������� 382
Avoid Simplistic Explanations for Generic Errors���������������������������������������������������������������������� 383
Avoid Unnecessarily Small Parameters������������������������������������������������������������������������������������ 386
Avoid Conflating Planning with Premature Optimization���������������������������������������������������������� 387
Anti-patterns Discussed in Other Chapters������������������������������������������������������������������������������� 387
Summary���������������������������������������������������������������������������������������������������������������������������������� 388

Part IV: Improve SQL Performance������������������������������������������������������������� 389


Chapter 16: Understand SQL Performance with Algorithm Analysis�������������������� 391
Algorithm Analysis Introduction������������������������������������������������������������������������������������������������ 392
O(1/N): Batching to Reduce Overhead��������������������������������������������������������������������������������������� 395

x
Table of Contents

O(1): Hashing and Other Operations������������������������������������������������������������������������������������������ 397


O(LOG(N)): Index Access������������������������������������������������������������������������������������������������������������ 402
1/((1-P)+P/N): Amdahl’s Law����������������������������������������������������������������������������������������������������� 404
O(N): Full Table Scans, Other Operations����������������������������������������������������������������������������������� 406
O(N*LOG(N)): Full Table Scan vs. Index Access, Sorting, Joining, Global vs. Local Index,
Gathering Statistics������������������������������������������������������������������������������������������������������������������� 406
O(N^2): Cross Joins, Nested Loops, Other Operations�������������������������������������������������������������� 416
O(N!): Join Order����������������������������������������������������������������������������������������������������������������������� 418
O(∞): The Optimizer������������������������������������������������������������������������������������������������������������������� 418
Summary���������������������������������������������������������������������������������������������������������������������������������� 419

Chapter 17: Understand SQL Tuning Theories������������������������������������������������������ 421


Managing User Expectations���������������������������������������������������������������������������������������������������� 421
Performance Tuning State of Mind�������������������������������������������������������������������������������������������� 422
Declarative Programming (Why Execution Plans Are Important)���������������������������������������������� 426
Operations (What Execution Plan Decisions Are Available)������������������������������������������������������� 429
Cardinality and Optimizer Statistics (Building Execution Plans I)��������������������������������������������� 444
Transformations and Dynamic Optimizations (Building Execution Plans II)������������������������������ 452
Summary���������������������������������������������������������������������������������������������������������������������������������� 459

Chapter 18: Improve SQL Performance���������������������������������������������������������������� 461


Application Tuning: Logging and Profiling��������������������������������������������������������������������������������� 461
Application Tuning Through Batching���������������������������������������������������������������������������������������� 466
Database Tuning������������������������������������������������������������������������������������������������������������������������ 471
SQL Tuning: Find Slow SQL������������������������������������������������������������������������������������������������������� 485
SQL Tuning: Find Plans�������������������������������������������������������������������������������������������������������������� 489
SQL Tuning: Find Actual Times and Cardinalities for Operations����������������������������������������������� 496
SQL Tuning: Gathering Optimizer Statistics������������������������������������������������������������������������������� 515
Summary���������������������������������������������������������������������������������������������������������������������������������� 519

xi
Table of Contents

Part V: Solve Anything with Oracle SQL������������������������������������������������������ 521


Chapter 19: Solve Challenging Problems with Arcane SQL Features������������������� 523
Oracle vs. the Unix Philosophy�������������������������������������������������������������������������������������������������� 523
MODEL�������������������������������������������������������������������������������������������������������������������������������������� 524
Row Pattern Matching�������������������������������������������������������������������������������������������������������������� 528
Any Types���������������������������������������������������������������������������������������������������������������������������������� 529
APEX������������������������������������������������������������������������������������������������������������������������������������������ 531
Oracle Text�������������������������������������������������������������������������������������������������������������������������������� 532
Multilingual Engine������������������������������������������������������������������������������������������������������������������� 535
Spatial��������������������������������������������������������������������������������������������������������������������������������������� 537
Other Features�������������������������������������������������������������������������������������������������������������������������� 539
Summary���������������������������������������������������������������������������������������������������������������������������������� 541

Chapter 20: Use SQL More Often with Advanced Dynamic SQL���������������������������� 543
Parsing�������������������������������������������������������������������������������������������������������������������������������������� 543
DBMS_SQL�������������������������������������������������������������������������������������������������������������������������������� 548
DBMS_XMLGEN������������������������������������������������������������������������������������������������������������������������� 549
PL/SQL Common Table Expressions������������������������������������������������������������������������������������������ 551
Method4 Dynamic SQL�������������������������������������������������������������������������������������������������������������� 551
Polymorphic Table Functions���������������������������������������������������������������������������������������������������� 553
SQL Macros������������������������������������������������������������������������������������������������������������������������������� 555
Summary���������������������������������������������������������������������������������������������������������������������������������� 558

Chapter 21: Level Up Your Skills with PL/SQL������������������������������������������������������ 559


Is PL/SQL Worth Mastering?����������������������������������������������������������������������������������������������������� 559
Create a PL/SQL Playground����������������������������������������������������������������������������������������������������� 560
PL/SQL Integration Features����������������������������������������������������������������������������������������������������� 561
Start Teaching and Creating������������������������������������������������������������������������������������������������������ 600

xii
Table of Contents

Part VI: Appendixes���������������������������������������������������������������������������������������������� 603

Appendix A: SQL Style Guide Cheat Sheet������������������������������������������������������������ 605

Appendix B: Computer Science Topics����������������������������������������������������������������� 607

Index��������������������������������������������������������������������������������������������������������������������� 609

xiii
About the Author
Jon Heller is an expert SQL and PL/SQL programmer with
20 years of Oracle experience. He has worked as a database
developer, analyst, and administrator. In his spare time, he is
active on Stack Overflow where he is a top user in the Oracle
and PL/SQL tags. He enjoys creating open source software,
has a Master of Computer Science degree from North
Carolina State University, and lives in Iowa with his wife and
two sons.

xv
About the Technical Reviewer
Michael Rosenblum is a software architect/senior DBA at
Dulcian, Inc., where he is responsible for system tuning and
application architecture. He supports Dulcian developers
by writing complex PL/SQL routines and researching new
features. He is the coauthor of Oracle PL/SQL for Dummies
(Wiley Press, 2006) and Oracle PL/SQL Performance Tuning
Tips and Techniques (Oracle Press, 2014), contributing
author of Expert PL/SQL Practices (Apress, 2011), and author
of many database-related articles and conference papers.
Michael is an Oracle ACE and frequent presenter at conferences (Oracle OpenWorld,
ODTUG, IOUG Collaborate, RMOUG, NYOUG, etc.).

xvii
Another Random Scribd Document
with Unrelated Content
sword in his hand, and delivered one of those wild and ill-judged
philippics against the king which did so much mischief in the attempt
of Monmouth.
Altogether, so far the cause of William appeared as little promising
as that of Monmouth had done. Notwithstanding the many earnest
entreaties from men of high rank and of various classes—nobles,
bishops, officers of the army and navy,—a week had elapsed, and no
single person of influence had joined him. The people only, as in
Monmouth's case, had crowded about him with shouts of welcome.
William was extremely disappointed and chagrined; he declared that
he was deluded and betrayed, and he vowed that he would re-
embark, and leave those who had called for him to work out their
own deliverance, or receive their due punishment. But on Monday,
the 12th, his spirits were a little cheered by a gentleman of Crediton,
named Burrington, attended by a few followers, joining his standard.
This was immediately followed, however, by the news that Lord
Lovelace, with about seventy of his tenants and neighbours, had
been intercepted by the militia at Cirencester, taken prisoners, and
sent to Gloucester Castle. The slow movement of the disaffected
appears to have originated in William's not having landed in
Yorkshire, as was expected, but in the west, where he was not
expected. In the North Lords Delamere and Brandon in Cheshire,
Danby and Lumley in Yorkshire, Devonshire and Chesterfield in
Derbyshire, in Lancashire the Earl of Manchester, in Nottinghamshire
and Lincolnshire Rutland and Stamford, and others were all waiting
to receive him. The very army which had been encamped on
Hounslow Heath was the seat of a secret conspiracy of officers, with
Churchill himself at their head, who kept up constant communication
with the club at the "Rose" tavern in Covent Garden, of which Lord
Colchester was president. But all this concert was paralysed for a
time by William's appearance in so distant a quarter.
But the elements of revolt, which had suffered a momentary shock,
now began to move visibly. The very day that Lord Lovelace was
captured, Lord Colchester marched into Exeter, attended by about
seventy horse, and accompanied by the hero of "Lillibullero,"
Thomas Wharton. They were quickly followed by Russell, the son of
the Duke of Bedford, one of the earliest promoters of the revolution,
and still more significantly by the Earl of Abingdon, a staunch Tory,
who had supported James till he saw that nothing but the reign of
Popery would satisfy him. A still more striking defection from the
king immediately followed. Lord Cornbury, the eldest son of the Earl
of Clarendon, pretended to have received orders to march with three
regiments of cavalry stationed at Salisbury Moor, to the enemy in the
west. He was a young man entirely under the influence of Lord
Churchill, having been brought up in the household of his cousin, the
Princess Anne, where Churchill and his wife directed everything; and
there can be no doubt that this movement was the work of Churchill.
As the cavalry proceeded from place to place by a circuitous route to
Axminster, the officers became suspicious, and demanded to see the
orders. Cornbury replied that his orders were to beat up the quarters
of the army in the night near Honiton. The loyal officers, who had
received hints that all was not right, demanded to see the written
orders; but Cornbury, who had none to produce, stole away in the
dark with a few followers who were in the secret, and got to the
Dutch camp. His regiment, and that of the Duke of Berwick, James's
own (natural) son, with the exception of about thirty troops,
returned to Salisbury; but the third regiment, the Duke of St.
Albans', followed the colonel, Langton, to Honiton, where General
Talmash received them; and most of the officers and a hundred and
fifty privates declared for the prince, the rest being made prisoners,
but soon afterwards discharged.
The news of this defection of one so near to the king's family
created the greatest consternation in the palace. In his terror James
summoned a military council. He was anxious to receive the
assurances of fidelity from his other officers—as if any assurances,
under the circumstances, anything but leading them against the
enemy, could test the loyalty of these men. He told them that he
wished to be satisfied that there were no more Cornburys amongst
them; and that if any had scruples about fighting for him, he was
ready to receive back their commissions. Of course they protested
the most ardent devotion to his cause, though there was not a man
of them that was not already pledged to desert him. Churchill,
recently made a lieutenant-general, and the Duke of Grafton, the
king's nephew, were especially fervid in their expressions of loyalty;
so, too, were Trelawney, smarting secretly over the persecution of
his brother, the Bishop of Bristol, and the savage Kirke, who, when
James had importuned him to turn Papist, had replied that he "was
sorry, but he had already engaged to the Grand Turk that if he
changed his religion he would become a Mussulman." Reassured by
these hollow professions, James gave orders for joining the camp at
Salisbury; but the next morning, before he could set out, he was
waited on by a numerous deputation of lords spiritual and temporal,
with Sancroft at their head, praying that a free Parliament might be
immediately called, and communication opened with the Prince of
Orange.
James received the deputation ungraciously. In all his hurried
concessions he had still shown his stubborn spirit by refusing to give
up the Dispensing power; and now, though he declared that what
they asked he passionately desired, he added that he could not call
a Parliament till the Prince of Orange quitted the kingdom. "How," he
asked, "can you have a free Parliament whilst a foreign prince, at the
head of a foreign force, has the power to return a hundred
members?" He then fell foul of the bishops, reminding them that the
other day they refused to avow under their hands their disapproval
of the invasion, on the plea that their vocation was not in politics;
and yet here they were at the very head of a political movement. He
charged them with fomenting the rebellion, and retired, declaring to
his courtiers that he would not concede an atom. He then appointed
a council of five lords—of whom two were Papists, and the third
Jeffreys—to keep order during his absence, sent off the Prince of
Wales to Portsmouth to the care of the Duke of Berwick, the
commander, and set out for Salisbury. He reached his camp on the
19th of November, and ordered a review the next day at Warminster,
of Kirke's division. Churchill and Kirke were particularly anxious that
he should proceed to this review, and Kirke and Trelawney hastened
on to their forces, on pretence of making the necessary
preparations. On the other hand, Count de Roye as earnestly
dissuaded James from going to Warminster. He told him that the
enemy's advanced foot was at Wincanton, and that the position at
Warminster, or even that where they were at Salisbury, was
untenable. James, however, was resolved to go; but the next
morning, the 20th, he was prevented by a violent bleeding at the
nose, which continued unchecked for three days.

WILLIAM OF ORANGE ENTERING EXETER. (See p. 339.)


[See larger version]
Scarcely had this impediment occurred when news came that the
king's forces had been attacked at Wincanton, and worsted by some
of the division of General Mackay. James was now assured that, had
he gone to Warminster, he would have been seized by traitors near
his person, and carried off to the enemy's quarters. He was advised
to arrest Churchill and Grafton; but, with his usual imprudence, he
refused, and summoned them along with the other officers to a
military council, to decide whether they should advance or retreat.
Feversham, Roye, and Dumbarton argued for a retreat; Churchill
persisted in his recommendation of an advance to the post at
Warminster. The council lasted till midnight, when Churchill and
Grafton, seeing that their advice was not followed, felt the time was
come to throw off the mask, and therefore rode directly away to the
prince's lines. The next morning the discovery of this desertion filled
the camp with consternation, and this was at its height when it was
known that Churchill's brother, a colonel, Trelawney, Barclay, and
about twenty privates had ridden after the fugitives. It was said that
Kirke was gone too, but it was not the fact; and he was now
arrested for having disobeyed orders sent to him from Salisbury; but
he professed such indignation at the desertion of Churchill and the
others, that the shallow-minded king set him again at liberty. The
deserters were received by William with a most gracious welcome,
though Schomberg remarked of Churchill that he was the first
lieutenant-general that he had ever heard of running away from his
colours.
In James's camp all was confusion, suspicion, and dismay. There
was not a man who was sure of his fellow, and the retreat which
commenced more resembled a flight. Numbers who would have
fought had they been led at once to battle, now lost heart, and stole
away on all sides. The news that found its way every hour into the
demoralised camp was enough to ruin any army. From every quarter
came tidings of insurrection. The Earl of Bath, the Governor of
Plymouth, had surrendered the place solemnly to William; Sir
Edward Seymour, Sir William Portman, Sir Francis Warre—men of
immense influence in Devon, Somerset, and Dorset—were already
with William at Exeter; a paper had been drawn up and signed by
the leading persons there to stand by the prince, and, whether he
succeeded or whether he fell, never to cease till they had obtained
all the objects in his declaration; Delamere had risen in Chester, and
had reached Manchester on his way south; Danby had surprised the
garrison at York; the town had warmly welcomed him, and a great
number of peers, baronets, and gentlemen were in arms with him.
Devonshire had called together the authorities and people of Derby,
and published his reason for appearing in arms, calling on them to
assist all true men in obtaining a settlement of the public rights in a
free Parliament. At Nottingham he was met by the Earls of Rutland,
Stamford, Manchester, Chesterfield, and the Lords Cholmondeley
and Grey de Ruthyn.
These were tidings of a reaction as determined as James's
headstrong career had been; but the worst had not yet overtaken
him. On the evening of November 24th he had retreated towards
London as far as Andover. Prince George of Denmark, the husband
of the Princess Anne, and the Duke of Ormond, supped with him.
Prince George was a remarkably stupid personage, whose constant
reply to any news was, "Est-il possible?" When the intelligence of
one desertion after another came he had exclaimed, "Est-il
possible?" But the moment supper was over and the king gone to
bed, Prince George and Ormond rode off to the enemy too. When
James the next morning was informed of this mortifying news, he
coolly replied, "What! Is 'Est-il possible' gone too? Were he not my
son-in-law, a single trooper would have been a greater loss." With
the prince and Ormond had also fled Lord Drumlanrig, the eldest son
of the Duke of Queensberry, Mr. Boyle, Sir George Hewit, and other
persons of distinction. The blow was severe; and though James at
the first moment, being stunned, as it were, seemed to bear it with
indifference, he pursued his way to London in a state of intense
exasperation. There the first news that met him was the flight of his
own daughter Anne. Anne was bound up, soul and body, with the
Churchills, and it had no doubt been for some time settled amongst
them that they should all get away to the prince her brother-in-law.
It was towards evening of the same day that Anne fled that James
arrived at Whitehall, agitated by the awful desertions of his highest
officers and his nearest relatives. This announcement put the climax
to his torture. He exclaimed, "God help me! My very children have
forsaken me." Severe as the punishment of his desperate treason
against his people deserved to be, this certainly was a cruel fate. For
some days a lady near his person records that she thought she saw
in him occasional aberrations of intellect. That night he sat late in
council, and it was urged on him to call together such peers and
prelates as were in London to consult on the necessary steps in this
crisis. The next day came together nearly fifty peers and bishops,
and James asked their advice as to calling a Parliament. On this
head there appeared no difference of opinion; but Halifax,
Nottingham, and others, urged with equal earnestness that all
Catholics should be dismissed from office, and a general amnesty
published for all in arms against him. James assented to the calling a
Parliament, but his eyes were still not opened to the folly of his past
conduct, and he would give no assurance of dismissing the Papists,
and broke out into vehement language at the proposal to pardon his
enemies. "My lords," he said, "you are wonderfully anxious for the
safety of my enemies, but none of you troubles himself about my
safety." And he vowed that he would yet take vengeance on those
who had deserted him, and, above all, on Churchill. Clarendon, who
was on the eve of running off to William, took the opportunity to
utter the bitter feelings which his dismissal from the Lord-
Lieutenancy of Ireland to make way for Tyrconnel had no doubt long
left in his mind. He upbraided James with his dogged and incurable
Popery, with sacrificing everybody and everything for it; declaring
that, even at that moment, James was raising a regiment from which
Protestants were rigorously excluded. He taunted him with running
away from the enemy, and asked him who was likely to fight for him
when he himself was the first to flee.
After this severe treatment by his closest connections, James
appeared to comply with the advice of the lords. He sent for Halifax,
Nottingham, and Godolphin, and informed them that he had
appointed them Commissioners to treat with William. He dismissed
Sir Edward Hales from the Tower, and placed Bevil Skelton, a
Protestant, there. But the nature or the intention of this most obtuse
of bigots was by no means changed; he was internally as
determined as ever to reverse every concession on the first possible
occasion. Barillon tells us that he assured him that all this was a
mere feint; that he only sent the Commissioners to William in order
to gain time for sending his wife and child into France; that as to
calling a Parliament, that would only be to put himself into their
power, and compel him to submit to their conditions; that he had no
faith in his troops, except the Irish; none of the rest would fight for
him; and, therefore, as soon as the queen and young prince were
safe, he should get away to Ireland, Scotland, or France, and await
the turn of events. Such was the utterly hopeless character of the
Stuart race!
To clear the way for the escape of the royal infant, Lord Dover was
put in command at Portsmouth, and James sent orders to Lord
Dartmouth to see that the child was safely conveyed to the French
coast. In anticipation of the accomplishment of this object, he made
every preparation for his own flight. He sent to Jeffreys to bring the
Great Seal, and take up his quarters with it in the palace, lest by any
means it should fall into the hands of the invader, and thus give an
air of authority to his proceedings. But his escape was delayed by
unpleasant news from Lord Dartmouth. The announcement of the
calling of a Parliament, and of attempted agreement with the Prince
of Orange, had spread exultation through the navy, and the officers
had despatched an address of fervent thanks to James, when the
arrival of the infant prince awoke a general suspicion that all was still
hollow, and that James meant nothing but escape. The officers were
in great agitation, and plainly pointed out to Dartmouth his heavy
responsibility if he allowed the prince to quit the kingdom.
Dartmouth, therefore, wrote James, declaring that he would risk his
life for the support of the Crown, but that he dared not undertake to
facilitate the escape of the Prince of Wales. This was confounding
news, and James took instant measures for the return of his son to
London, and for his escape by another means to France.
Meanwhile William was gradually advancing towards the capital, and,
on the 6th of December, the king's Commissioners met him at
Hungerford, where they found the Earls of Clarendon and Oxford
already swelling the Court of the invader. They were received with
much respect, and submitted their master's proposal that all matters
in dispute should be referred to the Parliament for which the writs
were ordered, and that, in the meantime, the Dutch army should not
advance nearer than forty miles from London. The Whigs in William's
Court were decidedly averse from reconciliation with James, whose
implacable nature they knew; but William insisted on acceding to the
terms, on condition that the royal forces should remove the same
distance from the capital, and that the Tower of London and Tilbury
Fort should be put into the keeping of the City authorities. If it were
necessary for the king and prince to proceed to Westminster during
the negotiations, they should go attended only by a small guard.
Nothing could be fairer; but William knew well the character of his
father-in-law, and felt assured that he would by some means shuffle
out of the agreement, and throw the odium of failure on himself;
and he was not deceived. Never had James so fair an opportunity of
recovering his position and securing his throne, under constitutional
restraints, for his life; but he was totally incapable of such wisdom
and honesty.
On the very day that the royal Commissioners reached William's
camp, James received the Prince of Wales back from Portsmouth,
and prepared to send him off to France by another route. On the
night of the 10th of December he sent the queen across the Thames
in darkness and tempest, disguised as an Italian lady, and attended
by two Italian women, one of whom was the child's nurse, and the
other carried the boy in her arms. They were guarded by two French
refugees of distinction—Antonine, Count of Lauzun, and his friend
Saint Victor. They arrived safely at Gravesend, where a yacht
awaited them, on board of which were Lord and Lady Powis. Saint
Victor returned to inform James that they had got clear off, and in a
few hours they were safely in Calais.
Scarcely did Saint Victor bring the cheering news of the auspicious
sailing of the yacht, when the Commissioners arrived with the
conditions that had been agreed on by William. Here was the
guarantee for a speedy adjustment of all his difficulties; but the false
and distorted-minded James only saw in the circumstance a
wretched means of further deceit and contempt of his people and of
all honourable negotiation. He pretended to be highly satisfied,
summoned for the morrow a meeting of all the peers in town, and of
the Lord Mayor and aldermen, and directed that they should
deliberate freely and decide firmly for the good of the country. This
done, he retired to rest, ordered Jeffreys to be with him early in the
morning, said to Lord Mulgrave, as he bade him good night, that the
news from William was most satisfactory, and, before morning, had
secretly decamped, leaving his kingdom to take care of itself rather
than condescend to a pacification with his son-in-law and his
subjects, which should compel him to rule as a constitutional king.
But James was not satisfied with this contemptible conduct; he
indulged himself before going with creating all the confusion that he
could. Had the writs, which were preparing, been left for issue on
the 15th of January, 1689, a new Parliament would be in existence,
ready to settle the necessary measures for future Government; he
therefore collected the writs and threw them into the fire with his
own hands, and annulled a number which were already gone out, by
an instrument for the purpose. He also left a letter for Lord
Feversham, announcing his departure from the kingdom, and
desiring him no longer to expose the lives of himself and his soldiers
"by resistance to a foreign army and a poisoned nation;" then,
taking the Great Seal in his hand, he bade the Earl of
Northumberland, who was the Lord of the Bedchamber on duty, and
lay on a pallet bed in the king's room, not to unlock the door till the
usual hour in the morning, and then, disguised as a country
gentleman, disappeared down the back stairs. He was waited for by
Sir Edward Hales, whom he afterwards created Earl of Tenterden,
and they proceeded in a hackney-coach to Millbank, where they
crossed the river in a boat to Vauxhall. When in mid-stream, he flung
the Great Seal into the water, trusting that it would never be seen
any more; but it was afterwards dragged up by a fishing-net. James,
attended by Hales and Sheldon, one of the royal equerries, drove at
a rapid pace for Elmley Ferry, near the Isle of Sheppey, having relays
of horse ready engaged. They reached that place at ten in the
morning, and got on board the Custom House hoy which was
waiting for them, and dropped down the river.

JAMES HEARING OF THE LANDING OF WILLIAM OF ORANGE. (After the


Painting by E. M. Ward, R.A.)
[See larger version]
In the morning, when the Duke of Northumberland opened the
king's chamber door, and it was discovered that James had fled, the
consternation in the palace may be imagined. The courtiers and the
numbers of persons who were waiting to fulfil their morning duties,
and the lords who had been summoned to council, spread the
exciting tidings, and the capital became a scene of the wildest and
most alarming confusion. Feversham obeyed the orders of the king
left in his letter, without pausing to ask any advice, or to calculate
what might be the consequences. These were as serious as might
have been expected. There was no Government, no constituted
authority to appeal to. Lord Rochester had continued loyal to the
last; but the base desertion of James and the imminent danger at
once decided him. He bade the Duke of Northumberland muster the
Guards, and declare for William. The officers of the other regiments
in London followed the advice, and endeavoured to keep together
their men, declaring for the Prince of Orange. The lords who had
been summoned to Council hastened into the City to concert
measures with the Lord Mayor and aldermen for the public safety. A
meeting was hastily called in Guildhall, where the peers, twenty-five
in number, and five bishops, with Sancroft and the new Archbishop
of York at their head, formed themselves into a provisional council to
exercise the functions of Government till the Prince of Orange should
arrive, for whom they sent a pressing message, praying him to
hasten and unite with them for the preservation of the Constitution
and the security of the Church. The two Secretaries of State were
sent for, but Preston alone came; Middleton denied the authority of
the self-created Council. The Lieutenant of the Tower, Bevil Skelton,
was ordered to give up the keys to Lord Lucas, and an order was
sent to Lord Dartmouth, desiring him to dismiss all Popish officers
from the fleet, and attempt nothing against the Dutch fleet. But no
measures could prevent the outbreak of the mob in London. The
feeling against the Catholics displayed itself on all sides. Under
pretence of searching for Papists, the hordes of blackguards from
every low purlieu of London swarmed forth and broke into houses,
and plundered them at their pleasure. The vile Jeffreys was with
difficulty saved from the fury of the mob.
James, his heartless master, was also seized. The Custom House hoy
in which he embarked was found wanting in ballast, and the captain
was obliged to run her ashore near Sheerness. About eleven at night
on the 12th of December, before the hoy could be floated again by
the tide, she was boarded by a number of fishermen who were on
the look-out for fugitives, and the appearance of the king
immediately attracted their notice. "That is Father Petre," cried one
fellow; "I know him by his hatchet face." James was immediately
seized and searched; but, though he had his coronation ring in his
pocket, besides other jewels, they missed them, and did not
recognise him. They carried him ashore at Feversham, where, at the
inn, amid the insults of this rabble, he declared himself their king.
The Earl of Winchelsea, hearing of the king's detention, hastened to
his assistance, had him removed to the house of the Mayor, and sent
word of his capture to London.
When the countryman who carried the messages from Lord
Winchelsea arrived at Whitehall, the news of the king's detention
occasioned the greatest embarrassment. The lords had sent for
William, and hoped that they were well rid of the foolish king.
Nothing could have been easier than their course if James had got
over to the Continent. The throne would be declared vacant, and the
Prince and Princess of Orange invited to occupy it, on giving the
necessary guarantees for the maintenance of the Constitution. But
now the whole question was involved in difficulties. If James
persisted in his right to the throne, in what capacity was William to
be received? Could any safe measures be arranged with a man like
James? Was he to be deposed, and his son-in-law and daughter
forcibly placed on his throne? The dilemma was equally
embarrassing to the lords and prelates, and to the prince himself.
When the messenger was introduced, and delivered a letter from
James, but without any address, Halifax moved that they should
instantly adjourn, and thus leave the letter unnoticed. Halifax was
deeply incensed at the trick which James had played off upon him in
sending him to negotiate with William merely that he might get
away, and was now resolved to adhere to the prince; but Lord
Mulgrave prevailed on the lords to retain their seats, and obtained
from them an order that Lord Feversham should take two hundred
Life Guards, and protect the king from insult. Feversham demanded
the precise powers of his order, and was told that he must defend
the king from insult, but by no means impede the freest exercise of
his personal freedom. This meant that they would be glad if he
facilitated his escape. Halifax immediately left London, and joined
the Prince of Orange, who was now at Henley-on-Thames. Sancroft
and the clergy, as soon as they were aware that the king had not left
the country, retired from any further participation in the Council.
William and his adherents were extremely chagrined at this
untoward turn of affairs. When the messenger arrived at Henley he
was referred to Burnet, who said, "Why did you not let the king go?"
But when Feversham arrived at the town whose name he bore, the
king was no longer disposed to escape. His friends who had
gathered about him, Middleton and Lord Winchelsea especially, had
endeavoured to show him that his strength lay in remaining. Had he
vacated the throne by quitting the kingdom, it had been lost for
ever; but now he was king, and might challenge his right; and the
prince could not dispossess him without incurring the character of a
usurper, and throwing a heavy odium of unnatural severity on
himself and his wife. James had sufficient mind left to perceive the
strength thus pointed out to him. He resolved to return to his
capital, and from Rochester despatched Feversham with a letter to
William, whom he found advanced to Windsor, proposing a
conference in London, where St. James's should be prepared for the
prince. By this time William and his Council had determined on the
plan to be pursued in the great difficulty. He had calculated on
James's being gone, and had issued orders to the king's army and to
the lords at Whitehall in the style of a sovereign. His leading
adherents had settled amongst themselves the different offices that
they were to occupy as the reward of their adhesion. It was
resolved, therefore, if possible, to frighten James into a second
flight. No sooner had Feversham delivered his despatch than he was
arrested, and thrown into the Round Tower on the charge of having
disbanded the army without proper orders, to the danger of the
capital, and of having entered the prince's camp without a passport.
Zulestein was despatched to inform James that William declined the
proposed conference, and recommended him to remain at
Rochester.
James, however, was now bent on returning to London. He had not
waited for the prince's answer, but on Sunday, the 16th of
December, he entered his capital in a sort of triumphal procession.
He was preceded by a number of gentlemen, bareheaded. Immense
crowds assembled as if to welcome him back again. They cheered
him as he rode along. The bells were rung, and bonfires were lit in
the streets. Elated by these signs, as he imagined them, of returning
popularity, he no sooner reached Whitehall than he called around
him the Jesuits who had hidden themselves, stationed Irish soldiers
as guards around his palace, had grace said at his table by a Jesuit
priest, and expressed his high indignation at the lords and prelates
who had presumed to usurp his functions in his absence—who had,
in fact, saved the capital from destruction when he had abandoned
it. His folly, however, received an abrupt check. Zulestein was
announced, and delivered the stern message of William. James was
confounded, but again repeated his invitation for his nephew to
come to town, that they might settle all differences in a personal
conference. Zulestein coldly assured him that William would not
enter London whilst it contained troops not under his orders. "Then,"
said James, "let him bring his own guards, and I will dismiss mine,
for I am as well without any as such that I dare not trust." Zulestein,
however, retired without further discussion, and the moment he was
gone, James was informed of the arrest of Feversham.
Alarmed at these proofs of the stern spirit of William, James sent in
haste to Stamps and Lewis, the leading members of the City Council
—the Lord Mayor had never recovered his terror of Jeffreys'
presence,—to offer to place himself under their protection till all
necessary guarantees for the public liberties had been given and
accepted. But the Common Council had not had time to forget his
seizure of their charter, and they prudently declined to enter into an
engagement which, they said, they might not be able to fulfil. Whilst
James was thus learning that though the City acclamations might be
proofs of regret for his misfortunes, they were by no means proofs
of a desire for his continuing to reign, William, on the same day, the
17th, bade all his leading adherents hold a solemn council, to
consider what steps should be taken in this crisis. It was understood
that he would never consent to enter London whilst James was
there, and it was resolved that he should be removed to Ham House,
near Richmond, which the brutal Lauderdale had built out of the
bribes of Louis XIV. and the money wrung from the ravaged people
of Scotland. Halifax, Shrewsbury, and Delamere were despatched to
James with this intimation, though Clarendon had done all in his
power to have James seized and confined in some foreign fortress
till Tyrconnel surrendered Ireland to the prince's party.
Simultaneously with the three lords, William ordered his forces to
advance towards London. In the evening of the 17th James heard
that the Dutch soldiers had occupied Chelsea and Kennington. By
ten o'clock at night Solmes, at the head of three battalions of
infantry, was already making across St. James's Park, and sent word
that his orders were to occupy Whitehall, and he advised the Earl of
Craven, who commanded the Coldstream Guards, to retire. Craven—
though now in his eightieth year, was still possessed of the courage
and chivalry which he had displayed in the wars of Germany, and
which had won him the heart of Elizabeth of Bohemia, who was said
to be married to him—declared that, so long as he retained life, no
foreign prince should make a King of England a prisoner in his own
palace. James, however, ordered him to retire. The Coldstream
Guards withdrew, and the Dutch guards surrounded the palace.
James, as if there were no danger to his person, went composedly
to bed, but only to be roused out of his first sleep to receive the
deputation from the prince. On reading the letter proposing his
removal to Ham, which Halifax informed him must be done before
ten o'clock in the morning, James seems to have taken a final
resolve to get away. He protested against going to Ham, as a low,
damp place in winter, but offered to retire to Rochester. This was a
pretty clear indication of his intention to flee—the very object
desired. A messenger was despatched in all speed to the prince,
who returned with his full approbation before daybreak.
The morning of the 18th was miserably wet and stormy, but a barge
was brought to Whitehall Stairs, and the wretched monarch went on
board, attended by the Lords Arran, Dumbarton, Dundee, Lichfield,
and Aylesbury. The spectators could not behold this melancholy
abdication—for such it was—of the last potentate of a most unwise
line, who had lost a great empire by his incurable infatuation,
without tears. Even Shrewsbury and Delamere showed much
emotion, and endeavoured to soothe the fallen king; but Halifax,
incurably wounded in his diplomatic pride by the hollow mission to
the prince at Hungerford, stood coldly apart. Boats containing a
hundred Dutch soldiers surrounded his barge as it dropped down the
river. James landed and slept at Gravesend, and then proceeded to
Rochester, where he remained four days.
Though his advisers entreated him not to fly, James had now sunk
the last manly feeling of a monarch who would dare much and
sacrifice more to retain a noble empire for his family. A dastardly
fear that if he remained he would be put to death like his father took
possession of him. He made a last offer to the bishops, through the
Bishop of Winchester, as he had done to the City of London, to put
himself into their hands for safety, but they also declined the
responsibility, and he then gave all over as lost. On the evening of
the 22nd of December he sat down before supper, and wrote a
declaration of his motives for quitting the kingdom. About midnight
he stole quietly away with the Duke of Berwick, his natural son, and,
after much difficulty, through storm and darkness, reached a fishing
smack hired for the purpose, which, on Christmas Day, landed him at
Ambleteuse, on the coast of France. Thence he hastened to the
castle of St. Germains, which Louis had appointed for his residence,
and where, on the 28th, he found his wife and child awaiting him.
Louis also was there to receive him, had settled on him a revenue of
forty-five thousand pounds sterling yearly, besides giving him ten
thousand pounds for immediate wants. The conduct of Louis was
truly princely, not only in thus conferring on the fallen monarch a
noble and delightful residence, with an ample income, but in making
it felt by his courtiers and all France, that he expected the exiled
family to be treated with the respect due to the sovereigns of
England.
The flight of James had removed the great difficulty of William—that
of having recourse to some measure of harshness towards him, as
imprisonment, or forcible deposition and banishment, which would
have greatly lowered his popularity. The adherents of James felt all
this, and were confounded at the advantage which the impolitic
monarch had given to his enemies. The joy of William's partisans
was great and unconcealed. In France the success of William was
beheld with intense mortification, for it was the death-blow to the
ascendency of Louis in Europe, which had been the great object of
all his wars, and the expensive policy of his whole life. In Holland the
elevation of their Stadtholder to the head of the English realm was
beheld as the greatest triumph of their nation; and Dykvelt and
Nicholas Witsen were deputed to wait on him in London and
congratulate him on his brilliant success. But, notwithstanding all
these favourable circumstances, there were many knotty questions
to be settled before William could be recognised as sovereign. The
country was divided into various parties, one of which, including the
Tories and the Church, contended that no power or law could affect
the divine right of kings; and that although a king by his infamy,
imbecility, or open violation of the laws might be restrained from
exercising the regal functions personally, those rights remained
untouched, and must be invested for the time in a regent chosen by
the united Parliament of the nation. Others contended that James's
unconstitutional conduct and subsequent flight amounted to an
abdication, and that the royal rights had passed on to the next heir;
and the only question was, which was the true heir—the daughter of
James, the wife of William, or the child called the Prince of Wales?
The more determined Whigs contended that the arbitrary conduct of
the House of Stuart, and especially of James, who attempted to
destroy both the Constitution and the Church, had abrogated the
original compact between prince and people, and returned the right
of electing a new monarch into the hands of the people; and the
only question was, who should that choice be? There were not
wanting some who advised William boldly to assume the crown by
right of conquest; but he was much too wise to adopt this counsel,
having already pledged himself to the contrary in his Declaration,
and also knowing how repugnant such an assumption would be to
the proud spirit of the nation.
To settle these points he called together, on the 23rd of December,
the peers, all the members of any Parliament summoned in the reign
of Charles II. who happened to be in town, and the Lord Mayor and
aldermen, with fifty other citizens of London, at St. James's, to
advise him as to the best mode of fulfilling the terms of his
Declaration. The two Houses, thus singularly constituted, proceeded
to deliberate on the great question in their own separate
apartments. The Lords chose Halifax as their Speaker; the
Commons, Henry Powle. The Lords came to the conclusion that a
Convention was the only authority which could determine the
necessary measures; that in the absence of Charles II. a Convention
had called him back to the throne, and therefore a Convention in the
absence of James might exercise the same legitimate function.
When the Lords presented an address to this effect on the 25th,
William received it, but said it would be necessary to receive the
conclusion of the Commons before any act could take place. On the
27th the Commons came to the same decision, and William was
requested to exercise the powers of the executive till the Convention
should assemble.
In issuing orders for the election of the members of the Convention,
William displayed a most politic attention to the spirit of the
Constitution. He gave direction that no compulsion or acts of undue
persuasion should be exercised for the return of candidates; no
soldiers should be allowed to be present in the boroughs where the
elections were proceeding; for, unlike James, William knew that he
had the sense of the majority of the people with him. The same
measure was adopted with regard to Scotland. There, no sooner had
William arrived in England, than the people rose against James's
Popish ministers, who were glad to flee or conceal themselves.
Perth, the miserable renegade and tyrant, endeavoured to escape by
sea; he was overtaken, brought ignominiously back, and flung into
the prison of Kirkcaldy. The Papists were everywhere disarmed, the
Popish chapels were attacked and ransacked. Holyrood House, which
swarmed with Jesuits, and with their printing presses, was not
exempt from this summary visitation; and bonfires were made of all
sorts of Popish paraphernalia—crosses, books, images, and pictures.
William now called together such Scottish noblemen and gentlemen
as were in London, who adopted a resolution requesting him to call
a Convention of the Estates of Scotland, to meet on the 14th of
March, and in the meantime to take on himself the same executive
authority as in England. William was, therefore, the elected ruler of
the whole kingdom for the time. This power he proceeded to
exercise with a prudence and wisdom which were in striking contrast
to the antagonism of James. All parties and religions were protected
as subjects; Feversham was released, and the administration of
justice proceeded with a sense of firmness and personal security
which gave general confidence.
On the 22nd of January, 1689, the Convention met. The Lords again
chose Halifax as Speaker, the Commons, Powle. The Catholic lords
had not been summoned, and were not there. In the Lords, Bishop
Sherlock and a small knot of Tories were for recalling James, and
attempting the impossible thing of binding him to the Constitution;
another party, of which Sancroft was known to be the head, though
he had not the courage to go there and advocate it, were for a
regency; whilst Danby contended for proclaiming the Princess Mary
in her own right; and the Whigs were for nominating William as an
elective prince. In the Commons, similar parties appeared; but the
great majority were for declaring the throne vacant, and, on the
28th, they passed a resolution to that effect, and the next day
another, that no Popish king could possess the throne. These carried
up to the Lords were, after a debate of two days, also adopted, but
only by small majorities.
James now sent a letter to each House, declaring that he had not
abdicated, but had been compelled to withdraw by necessity; and he
offered to return and redress every grievance. Both Houses refused
to receive the letters; but in both the question as to who should be
the successor to the throne was violently debated. Lord Lovelace
and William Killigrew presented a petition to the Commons,

You might also like