In Visual Studio's Server Explorer window there's a very nice feature that lets you see the DB objects grouped by schema:
It turns this object tree:
Data Connections -> MyServer -> Tables -> MyTable (MySchema)
Into this one:
Data Connections -> MyServer -> Schemas -> MySchema -> MyTable
I've been looking for this particular feature in SSMS but was unable to find it.
Does it exist?
If not, is there a plugin which would provide this feature?
Or perhaps is there a plugin which would help ease navigation in DBs which have lots of objects?
Please note I'm aware of SSMS object filters. It's better than nothing but not sufficient, as I'm often accessing objects from multiple schemas at once.
If you want a free tool, SSMS Schema Folders (GitHub repo) is your solution. It does the job beautifully.
I love the idea of grouping by schema.
SQL Treeo SSMS Addin is an inexpensive tool that allows you to create your own table structure in the Object Explorer.
You can try as follows in SSMS:
Tables > Filter > Filter Settings
There you are able to filter by schema...
Related
I am very new to EA and in general data engineering. I want to be able syncronize my MS SQL DB with the data model I created in EA. Using the help and tutorials, I learnt how to push my data model onto the MS SQL DB. What I fail to achieve is the syncronization. I have a feeling that is has to do with the schema. The database builder lists all the orginal tables and then again all tables from the ODBC connection with an additional 'dbo.'
Do i need to define this somwhere in the options of my data model or can I compare the data model with the server taking account of the schema?
You need to work in the “Database Builder” feature of Sparx EA.
This can be found on the "Develop" tab. (This will not work directly from the “Browser”)
Select the package having the “Database” as its stereotype. Use mouse button 2 and select “Manage DBMS Options”. The dialog will enable you to change the table(s) owner or even change the selected DBMS type. From the database builder you can then perform the "database compare" or "compare with options".
Note regarding terminology - the "dbo" in SQL Server is a the database owner.
(I have also posted this answer to the Sparx Forum.)
You can find the related documentation with screen images here: https://www.sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/import_schema_into_builder.html
I needed to add the owner tag dbo to all my tables. For some reson it was not enough to add it to the data model object. Thanks to this thread i found an option to change it for all tables at once.
How do you set the database schema, at the package level, in SPARX Enterprise Architect?
There were still some differences about the PK and FK ids when i tried to compare but I just aligned my local data model with that and now there are no differences between the data model and the data base.
I am trying to convert a ddl for a oracle view to snowflake view. But in Oracle ddl the view created is of FORCE EDITIONING type. But these keywords are not supported by snowflake. Can anyone share the ideas to replicate the same ?
Thanks
Oracle 11g Release 2 introduced "Editions" so people could upgrade an application's database objects while the application is in use, and then essentially flip a switch after all modifications were complete and users could then begin running all of their commands on the new "edition" or "release" of their objects.
Snowflake doesn't have this capability (yet), so you'll need to omit that clause from your Create View command.
Here are the docs on creating a view in Snowflake.
https://docs.snowflake.com/en/sql-reference/sql/create-view.html
I hope this helps...Rich
DataGrip from JetBrains is not providing Intellisense for Cross Database queries.
use mydb;
select * from otherdb.dbo.
using MSSQL
Leaving it for who seems to be struggling with this
1) while creating connection create without selecting DB.
2) In DB tree select click more Schemas and select DBs you want for cross querying.
3) Right click on those DBs and select synchronize
now cross DB should be working.
I came across this question in search of a solution to troubleshooting intellisense in DataGrip. The accepted answer didn't go quite far enough for my use case, see below for my solution:
A similar issue was posted to IntelliJ's community forms here.
This answer relates to DataGrip 2017.1.5 (is likely applicable to other versions as well):
After creating the initial connection to your server, open the Database tool window using:
(ALT + F1) or
(View -> Tool Windows -> Database).
Listed beneath your server connection you will see a "Schemas..." item, double click it. This will expand into a list of all DB schemas you have access to on that server.
Select the schemas you are interested in, and additionally expand each DB schema to select all child schemas for that DB.
Click the refresh button in the schema selection window to synchronize your settings (two arrows pointing at each other in a circle).
Image of Database Toolbar with DB/Schema selection
I am trying to generate a data only script for a view using SSMS Generate Scripts feature. However, even though I select Data Only, it still only generates the view definition and not the data generated by the view. Is there something else I need to do?
I'm using SSMS for SQL Server 2014.
I know this is old, but I will answer it for other people who stumble on it.
Generate Scripts -> Data Only is bugged for views.
The easiest option without searching for other stored procedures or external tools is to copy the view contents into a table. Generate Scripts -> Data Only works fine with tables.
For example,
SELECT *
INTO NEWTABLE
FROM dbo.Component
Then you can do Generate Scripts on the NEWTABLE and select Data Only in Advanced and it will work.
You can then delete the NEWTABLE.
Given that Generate Scripts still doesn't appear to work for view data as of SSMS v17.9.1, an alternative depending on your needs might be to use the SQL Server Import and Export Wizard. You can read data from a view and write it to a table, across different databases and servers without resorting to a linked server.
SSMS is still poor at this, VS has been able to do this for a while
Use menu VIEW->SQL SERVER OBJECT EXPLORER
Create a new server
Navigate down to your table or view , right click -> View Data
use the filter to limit the dataset to what you are interested in
Then use the SCRIPT command (also available on context menu)
This works for views and tables.
Not super easy, but ill give it A-. Way better than other hacks that used to be available (including SSMS.ExportData which is not great)
hope that helps someone. I just had to export some rows and had to re-remember how to do this.
hope it helps someone...
greg
I have a small L2S database that was generated with the L2S CreateDatabase command. When I add a class or property to the DBML, the database is not updated automatically. I get errors like "Table not found" at runtime.
Is there a way to add new tables and columns to a database?
No, LINQ to SQL cannot update your database schema to reflect changes made to DBML. To do so you'll have to either recreate your DB from scratch (which, granted, LINQ to SQL does not do very well), or use something like Wizardby to version and upgrade your DB schema.
No it is not. You need to refresh your Server Explorer, and then remove your changed table form DBML, then drag and drop it and CTRL + S :}
Not out of the box, but there are third party tools that add that kind of functionality. Take a look at my tools - Huagati DBML/EDMX Tools.
The add-in can generate the change scripts for you, and there is also a runtime component that can be used within your app to detect and generate SQL-DDL for diffs between the model and the database.