Commit Graph

730 Commits

Author SHA1 Message Date
Leila Lali
1ec297efe2 improving OE tables expand (#555)
* improving OE tables expand for dw database
2017-12-01 14:49:42 -08:00
Leila Lali
ab332cba9b using existing connection for scripting as operation (#556)
* using connection binding queue for scripting to be able to use existing connection
2017-12-01 14:34:09 -08:00
Leila Lali
864c4f60cd Adding Indexes of all types to OE indexes folder (#557) 2017-12-01 13:40:21 -08:00
Matt Irvine
4174d5acaf Work around URI parsing issue for Windows drives (#558) 2017-11-29 12:22:03 -08:00
Benjamin Russell
2190039df2 Edit Data: Create Row with Nullable Columns (#553)
* WIP

* All the new RowCreate tests are working

* Fixing a couple bugs with the row delete and row update tests

* Regenerating localization files

* Fixing multiple iteration in tests
2017-11-28 14:59:48 -08:00
Aditya Bist
bc8aef6a15 fixed sproc failing peek definition (#550)
* fixed sproc failing peek definition

* changed commented out tests for peek definition
2017-11-27 15:08:22 -08:00
Leila Lali
530b66fc54 Adding new handler for script as requests (#552)
* added new scripting handler for script as request
*change the language service to get the peek definition using scripting as operatin
2017-11-27 15:04:17 -08:00
Kevin Cunnane
b8e46ce65f Support GO N syntax to execute multiple times (#551)
* Support `GO N` syntax to execute multiple times
- Plumbed through the batch execution count from the parser and used in the batch execution code path
- Functionality matches SSMS:
  - Outputs loop start/end messages that match SSMS if you're doing multi-batch execution
  - Outputs an "ignoring failure" error if an error happens during a batch
- Added tests for this
- Manually verified end to end also

* Fixing test error
2017-11-22 11:33:19 -08:00
Kevin Cunnane
42ee96f99f Fix Ops Studio issue 97 where query connection is dropped (#549)
- Fixes https://github.com/Microsoft/sqlopsstudio/issues/97.
- This should fix the bulk of the issues reported by users since it's the 1st use of this connection in the query code path.
- Implemented the fix in the connection service. This will always open a connection when calling `GetOrOpenConnection`. I cannot see a reason why the connection returned from this should ever be closed.
- resolve issues in both this code path and the edit data code path since both use this method.
2017-11-21 14:46:20 -08:00
Monasr
c512d53caa Loc checkin for November update (#548) 2017-11-20 15:14:32 -08:00
Benjamin Russell
d7080eb07e Edit Data: Fixing Defaults Behavior (#533)
* Moving logic for adding default values to new rows

* Fixing implementation of script generation to handle default values all around

* Unit tests!

* Addressing PR comments
2017-11-20 14:14:41 -08:00
Leila Lali
7a3baf6620 loading database status for all databases in the server to fix the perf issue (#547) 2017-11-15 15:46:53 -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
3bb86af10b Fix/scripting server name (#543)
* binding queue should not throw excpetion if fails to connect

* getting the server name using the server connection

* removed extra comment
2017-11-02 15:39:38 -07:00
Leila Lali
54c29f20a6 binding queue should not throw excpetion if fails to connect (#542) 2017-11-02 10:53:18 -07:00
Leila Lali
17e7ddd66f handling database info and metadata request async (#541) 2017-11-01 10:58:47 -07:00
Kate Shin
93ec9864f6 remove unused metadata queries from backup (#538) 2017-11-01 10:55:17 -07:00
Kevin Cunnane
185978eb80 Fix empty result set error handling and metadata service returning correct type name (#535)
- HandleSimpleExecuteRequest now handles the case where no rows are in a result by cleanly returning a success message but with no rows included. This is handled in the front-end instead and goes through the standard path (with a clean explanation message) instead of showing a `error: no results to return`
- MetadataService was always meant to include the type name in the return result, as otherwise the front end has to guess. In order to fix a bug where this resulted in scripting based on the metadata failing (as front-end used `Procedure` instead of `StoredProcedure`), I'm returning the data here. I'll have a matching front end fix but this is overall a good solution to have.
2017-10-30 11:36:46 -07:00
Matt Irvine
f711aaea5b Fix typo in docs/design/index.md (#536) 2017-10-30 10:57:29 -07:00
Aditya Bist
10cb78b712 listDatabases now shows online databases only (#534) 2017-10-27 16:10:38 -07:00
Leila Lali
a2a392938e fixed a typo (#532) 2017-10-27 11:00:39 -07:00
Karl Burtram
7ccf78aec1 Add group id and db display name to OE connection queue key (#531) 2017-10-26 10:56:22 -07:00
Saurabh Singh
4c329921c7 Update smo (#530)
* update the version in CSPROJ

* Add the updated SMO package
2017-10-26 10:55:04 -07:00
Leila Lali
76e26268ec removing th oe binding context on closing session (#529) 2017-10-26 10:54:34 -07:00
Kate Shin
cc9beed835 Fix file browser cancel/connetion issues (#528)
* clean bindingqueue after cancel

* fileborwser fixes

* code cleanup

* re-initialize filetree whenever filter is changed

* fix test issues

* address pr comments
2017-10-26 10:54:22 -07:00
Karl Burtram
4d04bff810 Revert "Scripting should await result of requestcontext.sendresult in case it errors" (#526)
* Revert "Add rowcount check so that no results error is sent for a query where no rows are returned (#525)"

This reverts commit 3392f93a2e.

* Revert "Add unknown status for DB Nodes whose status is not known (#524)"

This reverts commit 3d7b87eca2.

* Revert "Should await result of requestcontext.sendresult in case it errors (#520)"

This reverts commit caf196ea31.
2017-10-25 13:34:45 -07:00
Kevin Cunnane
3392f93a2e Add rowcount check so that no results error is sent for a query where no rows are returned (#525) 2017-10-25 12:06:22 -07:00
Saurabh Singh
3d7b87eca2 Add unknown status for DB Nodes whose status is not known (#524) 2017-10-25 12:06:10 -07:00
Kevin Cunnane
caf196ea31 Should await result of requestcontext.sendresult in case it errors (#520)
- Refactored to use pattern where we wait on the binding queue action to complete, then send the result / error outside of that.
2017-10-25 12:06:00 -07:00
Anthony Dresser
399b03cbd1 Add force change database logic (#519)
* add logic to close connections if changing fails

* added logic to close connections and reopen that fail to change (azure)

* expose connection map in connection info, change while to foreach

* removed unneeded code

* reworked logic to not depend on thrown errors

* added tests
2017-10-25 10:54:17 -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
Anthony Dresser
ed5b68bcf9 change return type from always true (#516) 2017-10-24 12:35:00 -07:00
Aditya Bist
97fa99a713 fixed failing integration tests (#512)
* fixed failing integration tests

* close connection after test

* undo close connection
2017-10-21 11:10:38 -07:00
Benjamin Russell
e9bc97e290 Edit Data: Better errors for possible truncation (#514)
* Fix to make sql exceptions surface properly to user (with important notes!)

* Adding support for detecting column size issues when updating a cell

* Adding unit tests for the exception on read scenario
2017-10-21 11:08:40 -07:00
Aditya Bist
9499d73cec removed duplicate files from nupkg (#513) 2017-10-21 11:06:32 -07:00
Kate Shin
db32cee0d7 Fix filebrowser to handle cancellation and multiple open/expand requests (#499)
* add cancel filebrowser request

* update expand request contract

* cleanup

* add queue

* add expand queue and update cancellation

* dispose cancelsource

* remove unnecessary field

* cleanup using directives

* address pr comment

* more changes

* change contract
2017-10-21 11:05:31 -07:00
Benjamin Russell
605f5e9f7b Adding more continuewithonfaulted handlers (#507) 2017-10-20 11:31:31 -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
Aditya Bist
49f0221dc8 updated smo nuget package with latest bits (#508)
* updated smo nuget package with latest bits

* added new nupkg

* fixed peek definition test

* fixed batch parser wrapper tests
2017-10-19 18:02:47 -07:00
Karl Burtram
328fb30db2 Switch back to Tasks in binding queue (#510) 2017-10-19 16:05:24 -07:00
Karl Burtram
c2b2d16b6c Reduce OE timeout to 45 seconds (#509) 2017-10-19 15:42:37 -07:00
Benjamin Russell
01c414a65a Fixing backup service tests that utilized the file browser service host 2017-10-19 14:52:00 -07:00
Benjamin Russell
4016a05b48 Actually fixing the service host requirements by using the EventFlowValidator 2017-10-19 14:39:20 -07:00
Benjamin Russell
639cd91fe2 Moving event flow validatior into test.common 2017-10-19 14:27:37 -07:00
Benjamin Russell
9600125186 File Browser: Adding async task exception handling (#504)
* Replacing Dictionary with ConcurrentDictionary since values are accessed in async contexts

* Adding new method to allow async tasks to be executed in the exception continuation

* Adding unit tests for the aforementioned

* Adding exception handling to async tasks in file browser service

* Updating query execution async handling to use the async version

* Removing unnecesary send result from continuewithonfaulted
2017-10-19 11:25:29 -07:00
Kevin Cunnane
4b66203dfc Fix tools service crash + improve server edition naming (#506)
* Fix https://github.com/Microsoft/vscode-mssql/issues/986 and add better server edition naming
- Fixed a number of issues related to the binding queue, specifically the fact that it didn't capture exceptions that occurred on the binding thread. This caused the thread to crash the service.
  - The root cause of the error was when you get a connection error during init of the SmoMetadataProvider which threw an exception. Because of this no Binder was created, and the code would null ref later during processing
  - Added logic to handle null ref issue and other related code
  - Added a unit test for the new error handling path, and supported still returning some value in this case
- Separately, have a fix for an issue where the edition is shown as "SQL Azure" for all Azure connections. Fixing to be "Azure SQL DB" for this case and handle when the database reports as DW or Stretch instead. This maps better to users concept of what the edition should be and avoids returning what is an outdated term.

* Messed up the test - fixing this by returning the expected return object
2017-10-19 10:42:26 -07:00
Anthony Dresser
680f9f47d0 added change database handler (#505) 2017-10-18 19:09:55 -07:00