Commit Graph

53 Commits

Author SHA1 Message Date
ranasaria
09652cccd1 Enhanced Logging for sqltoolsservice (#695)
This change modifies the logging framework within sqltoolservice.
Moves away from custom Logger object to start using .Net tracing framework. It supports for the static Trace and TraceSource way of logging. For all new code it is recommend that we log the log messages using the existing static Logger class, while the code changes will continue to route the older Trace.Write* calls from the process to same log listeners (and thus the log targets) as used by the Logger class. Thus tracing in SMO code that uses Trace.Write* methods gets routed to the same file as the messages from rest of SQLTools Service code.
Make changes to start using .Net Frameworks codebase for all logging to unify our logging story.
Allows parameter to set tracingLevel filters that controls what kinds of message make it to the log file.
Allows a parameter to set a specific log file name so if these gets set by external code (the UI code using the tools service for example) then the external code is aware of the current log file in use.
Adding unittests to test out the existing and improved logging capabilities.


Sequences of checkins in development branch:
* Saving v1 of logging to prepare for code review. Minor cleanup and some end to end testing still remains
* Removing local launchSettings.json files
* added support for lazy listener to sqltoolsloglistener and removed incorrect changes to comments across files in previous checkin
* Converting time to local time when writing entries to the log
* move the hosting.v2 to new .net based logging code
* removing *.dgml files and addding them to .gitignore
* fixing typo of defaultTraceSource
* Addressing pull request feedback
* Adding a test to verify logging from SMO codebase
* propogating changes to v1 sqltools.hosting commandoptions.cs to the v2 version
* Fixing comments on start and stop callstack methods and whitespaces
* Commenting a test that got uncommented by mistake
* addding .gitattributes file as .sql file was observed to be misconstrued as a binary file
2018-09-24 23:55:59 -07:00
Karl Burtram
8dda34c95a Add Agent Job and Job Step request handlers (#635)
* Stage changes

* Fix update job request handler

* WIP

* Additional agent handler updates

* Setup agent job step create test

* Fix Step update handler
2018-06-13 10:02:25 -07:00
Anthony Dresser
7b1a88f842 updates backup and restore to have their own prefix, not use diasasterrecovery (#573) 2018-01-16 14:03:35 -08:00
Leila Lali
4bcf181787 fixing a restore bug - relocating db files of a windows server db in mac (#546)
* fixed the bug with relocating db files in mac
2017-11-15 10:28:16 -08:00
Leila Lali
ba359e7a68 fix the file path with the wrong path separator (#545)
* fix the file path with the wrong path separator

* fixed a typo
2017-11-06 12:12:52 -08:00
Leila Lali
54c29f20a6 binding queue should not throw excpetion if fails to connect (#542) 2017-11-02 10:53:18 -07:00
Kate Shin
93ec9864f6 remove unused metadata queries from backup (#538) 2017-11-01 10:55:17 -07:00
Leila Lali
a2a392938e fixed a typo (#532) 2017-10-27 11:00:39 -07:00
Leila Lali
f80fd8a458 added contract to cancel restore plan and close the related connections (#522) 2017-10-25 10:24:19 -07:00
Leila Lali
09dd0579d0 Fix/restore scripting issue (#521)
* fixed the bug with setting server execution mode before creating restore plan
2017-10-25 10:23:28 -07:00
Leila Lali
fc3cbe0a69 Fix/restore options issues (#515)
* fixed the bug with tail log option

* fix the bug with the tail gate file name

* closing connections before restore
2017-10-25 10:22:03 -07:00
Kevin Cunnane
d222af7824 Fix numerous Azure property issues (#511)
* Avoid crashing if azure edition is System.

* Add new Azure-specific options to the prototype and return through the service calls

* Send azure properties over database info request

* IsCloud should include Azure SQL DW
- Fixed references to this feature flag
- Updated edition handling to include ManagedInstance and removed AzureV1 check since it's never used and it's been retired.
2017-10-19 22:08:33 -07:00
Leila Lali
8db19d4b61 fixed the issue with parsing a windows path was failing in mac (#503)
* fixed the issue with parsing a windows path was failing in mac
2017-10-18 12:02:24 -07:00
Leila Lali
89d01000e9 fix the backup file path of a db file that's created in different platform (#493) 2017-10-11 15:43:45 -07:00
Leila Lali
7fb09a0284 Fix/restore db files (#491)
* fixed an issue with target database name should replcae the original db name in the db file path
2017-10-11 14:48:51 -07:00
Kevin Cunnane
7acc668c04 Create Firewall Rule support with a simple Resource Provider implementation
Implementation of the resource provider APIs in order to support Create Firewall Rule. Provides definition for a ResourceProvider and Authentication service. The ResourceProvider supports firewall rules for now, and since authentication is routed through that method it will call into the auth service to set up the current account to be used.

Additional notes:
- Fixed deserialization by adding an Accept header. This shouldn't be necessary, but for some reason the firewall rule defaults to XML without this
- Use generic server list and parse the ID to get the resource group, avoiding a large number of extra calls for each RG
- Errors now include error message from the API
2017-10-09 15:45:33 -07:00
Leila Lali
fecf56bce2 closing the default connections that are opned just for validating the connections. Added the feature to application name in the connection (#483) 2017-10-09 10:49:12 -07:00
Kate Shin
2c4f2cf6b8 Fix restore service to set target db same as source db (#479)
* fix restore service to change target db

* add overwriteTargetDb param

* update comment
2017-10-06 11:31:10 -07:00
Leila Lali
f09b9f4c30 Fixing the bug with connections on database make restore fail (#473)
* closing the connections that don't need to be open and keeping track of the connections that should stay open
2017-10-05 20:06:31 -07:00
Kate Shin
d30b9c870d Update restore service to return default backup folder (#475)
* Fix restore to return default backup folder

* fix break

* fix tests

* fix file validator for invalid filepath
2017-10-03 16:11:30 -07:00
Kate Shin
8e78ecf9a4 Fix backup file validation error message (#472)
* Fix backup error message

* check for file existence for restore

* chang error message

* address pr comment

* cleanup
2017-10-02 15:45:28 -07:00
Leila Lali
9d898f0d0c fixed couple of issues in restore (#470) 2017-09-29 09:46:44 -07:00
Karl Burtram
84ea045572 XEvent Profiler initial event handlers (#456)
* Bump SMO to 140.2.5 to pick-up private XEvent binaries

* Pick up SMO binaries from the build lab

* Add ProfilerService class placeholder

* Update SMO nuget package to include DB Scoped XEvents

* Stage changes

* Stage changes

* Update SMO to use RTM dependencies and remove separate SqlScript package

* Stage changes

* Iterate on profiler service

* Fix post-merge break in localization

* More refactoring

* Continue iterating on profiler

* Add test profiler listener

* Address a couple of the code review feedback

* Fix AppVeyor build break

* Use self-cleaning test file
2017-09-12 14:08:50 -07:00
Kate Shin
14ec5be961 Create remote file browser service (#448)
* code refactoring

* Add filebrowser service and tests

* change dataset reference

* Address pr comments

* add more tests

* address pr comments

* address pr comments and added more tests

* minor change

* minor fix

* Fix test break and add dataset result check
2017-09-08 13:57:56 -07:00
Henry Phan
784f4c5d05 Feature/serialization exe (#442)
* Initial changes to have serialization generate its own .exe

* Removed additional project from sln file

* remove all references to removed temporary project

* Moved shared contracts into own dll and fixed imports. Addressed PR comments

* Undid having a separate contracts project since that'll be a task for later on. Moved dbcellvalue and saveresultsrequest to Hosting, where they will be imported and shared by the service layer and serialization projects

* Switched backslashes in project reference in csproj file to forward slashes for consistency

* Moved necessary contracts back to service layer. Refactored CommandOptions to reduce code duplication. Addressed miscellaneous PR suggestions

* Accidentally left these files out of previous commit

* Initialized loggers for serialization and credentials with the logging directory provided by the cmd line arg, if there is one

* Changed default log directory paths for serialization and credentials. Removed unnecessary cast and added a copyright

* Changed name of generated executable for serialization service

* removed unnecessary object cast

* removing unnecessary imports and addressing other PR comments
2017-09-05 16:21:42 -07:00
Kate Shin
44d3e4b17e Close connection after backup execution (#449) 2017-08-31 11:00:02 -07:00
Leila Lali
5ab995d78f keeping the target db to what ever client is sending (#443) 2017-08-25 12:00:43 -07:00
Leila Lali
d94dda4282 integrate backup operation with new scriptable task (#440)
* integrate backup operation with new scriptable task
2017-08-21 15:04:48 -07:00
Leila Lali
39dedd88e0 generic way to support scriptable operations (#438)
* implemented a generic way to support scriptable operations
2017-08-18 16:12:00 -07:00
Karl Burtram
4e9ff42dfc Update to SMO built with .Net 2.0 RTM SDK (#437)
* Pick up .Net 2 RTM SMO dependencies

* Add missing NUPKG files

* Remove preview framework nuget packages
2017-08-16 16:08:03 -07:00
Leila Lali
f95a652174 fixed the bugs with creating new restore plan (#433)
* fixed the bug with source db name not setting correctly when new plan created
2017-08-16 08:54:05 -07:00
Leila Lali
4b97aa8c43 fixed the issues with restore options (#431)
* fixed the issues with restore options connecting to server without db name
2017-08-14 13:29:40 -07:00
Kate Shin
cd870e6f15 Integrate generate script with task service (#426)
* Support generate script for backup

* change

* update task service data contract for Generate Script

* more changes

* update test

* add comments

* Add missing files

* update stub backup operation for testing

* pr comments

* remove empty space

* Fix tests

* Add unit/integration tests and isCancelable to TaskInfo

* address pr comments

* pr comments - fix tests

* fix minor issue

* fix minor issues

* remove unused variable
2017-08-09 19:59:40 -07:00
Leila Lali
6696b7e72f supporting restore from db (#429)
* supporting restore from db
2017-08-09 11:01:52 -07:00
Leila Lali
1cbc78a266 fixing the restore tests (#428)
* fixing the restore tests and code coverage
2017-08-07 12:11:09 -07:00
Leila Lali
aa725c51ca filtering backup sets (#425)
* filtering backup sets
2017-08-02 16:28:08 -07:00
Leila Lali
e453a19d00 added restore options (#423)
* added restore options
2017-07-28 12:54:08 -07:00
Leila Lali
e1395cbd7d Adding more features to restore operation (#420)
* Adding more features to restore operations and added tests
2017-07-24 09:41:32 -07:00
Leila Lali
d5b2bcdcb7 Fix/restore connection issue (#416)
* fixed the connection issue used for restore

* fixed a test
2017-07-17 15:57:30 -07:00
Leila Lali
836847ce15 fixed the bugs related to relocating db files for restore (#414)
* fixed the bugs related to relocating db files for restore
2017-07-17 11:59:40 -07:00
Karl Burtram
005fc9e4df Add try/catch blocks for request handlers (#408)
* Add try/catch for request handlers

* Fix test break
2017-07-13 07:18:34 -07:00
Kate Shin
414949d129 Add advanced options to backup service (#405)
* Add advanced options for Backup

* Add backup encryption strings

* Add test for backup advanced option

* Add strings to SR

* Add verify backup restore option

* Addressed PR comments

* Add MIT license header
2017-07-12 13:09:07 -07:00
Leila Lali
64e671ca2a added restore errors to resx (#407)
* added restore errors to resx

* including the restore error messages in the result

* added more error handling and tests
2017-07-12 10:20:47 -07:00
Leila Lali
05775a6089 Feature/restore db (#403)
* Added service handlers for restore database operations
2017-07-10 17:28:57 -07:00
Kate Shin
8f5b5b14ca Add isCopyOnly to backup service (#397) 2017-06-28 12:53:40 -07:00
Kate Shin
cdfdd7bd5a Fix backup service to have multiple backup instances (#396)
* Allow multiple backups per backup service instance

* Add test to run multiple backups

* Update backup cancelTask method signature

* Fix to have multiple backup instances and add more tests

* Address PR comments

* Remove double new lines

* Add Azure check for backup operations
2017-06-26 16:21:09 -07:00
Kate Shin
a646d627c6 Register backup to task service for execution (#381)
* Create backup task for execution

* Register backup to task service

* Fix backup task service

* Fix async methods

* Add backup unit test

* Add cancellation token to task service and fix other PR comments

* Add SR and fix other pr comments

* Add comments to methods

* Fixed backup cancel test and casing

* Change sleep time in test
2017-06-16 14:01:09 -07:00
Leila Lali
71b349f67b Supporting SQL DW in Object explorer (#380)
* supporting sql dw in oe
2017-06-15 12:53:32 -07:00
Kate Shin
3bf562acf0 Create backup service tests (#368)
* Add backup test

* Add backup service tests
2017-06-02 18:11:35 -07:00
Karl Burtram
8e7fac26e5 Fix nullref in backup from not providing SFC XML innerDoc (#364) 2017-05-27 13:17:40 -07:00