How to take screenshot of very large Database Diagram in SSMS? - sql-server

I have created a diagram in SSMS for my database. There are approximately 120 tables are used in this diagram. the problem is that when I copy that diagram from the Edit->Copy Diagram to Clipboard and paste it to MSPaint it gives me error. Error getting the Clipboard data!. I have also tried Fast Stone Capture utility to capture scrolled window. But, it is not taking screenshot properly. So, How do I take screenshot of very large Database Diagram?

To minimize resizing in Microsoft word go to "page layout" and choose "size/more pagesizes" and set width and height to max(55,87 cm * 55,87 cm)

Related

SSAS Tabular table always shows in Excel

In my SSAS tabular model I have a calendar dimension, and a wave dimension for half-year data only. The data flows to these tables as such:
Fact Table ---> Wave Dim <---> Calendar
No matter what I do I cannot hide the wave table from Excel users. The table shows hidden in Visual Studio, but in Excel it shows the table with no fields in it. I have tried deleting the table and reloading it with no avail. My assumption is that it has to do with the way it's connected to the Calendar dimension, but I can't seem to find anything on my issue. Any help would be much appreciated.
This is a tough one to answer without viewing your model.bim file. Based on your information I have two guesses on what could be the issue, although this may very well not be it:
1) It sounds like you've marked all fields in the Wave table as hidden, but not the Wave table itself. Could this be the reason?
2) Perhaps you are using perspectives, and only hid the Wave table in a perspective rather than in the Model (default perspective)?
The relationships in your model should have no impact on whether a table is displayed in client tools or not.
Feel free to upload your model.bim file if the above does not help.

IntelliJ IDEA: How to quickly open a DB table editor?

Scenario: I'm in IntelliJ IDEA DB console and looking at
SELECT * FROM TableXY;
I want to see the definition of the TableXY. One way of doing it is:
ctrl+click on the table name: Looks up the table in the Database window.
F4: Opens the table editor.
select the Text tab
The problem is that I'm on a DB with a lot of tables and the first step takes forever because IDEA loads the full list of tables.
Is there a way to jump to the table editor directly?
I am not sure if this is what you are looking for, but to quickly view the table definition you can use the Quick Documentation pop-up:
Place your cursor within the table name and hit CTRL+Q (or F1 on Mac). This will show you some information about the table, the first rows, and the table definition (output from SHOW CREATE TABLE).
You can also configure the Quick Documentation under Settings > Tools > Database (see Intellij IDEA on-line help).

How to add a dropdown to datasheet form in MS Access which is based off a SQL Server query

I have a form in MS Access (datasheet view) which is based on the output of a SQL Server query. Now this is used in a front end where the user needs to be able to select from a drop down the value for one of the columns, 'NAME'. I tried adding a combo box which is mapped to take distinct names from the SQL Server table to the datasheet form but the results were not as desired.
Kindly provide advice on how this can be possible. I did this before by using a lookup on a similar MS Access database, but in a multi-user environment, the database was corrupted and now I moved my back end to SQL Server.
Just got the answer to my question. here are the steps I followed.
a) Add a combo box to the datasheet form in design view like Johnny Bones suggested.
b) Create a drop down with values.
c) Point the Control Source property to the field in the SQL Server table which needs to be updated, in this case NAME.
d) And voila, your drop-down now shows the values in the table and you can include a drop down for the user.
Thank you for pointing me in the right direction Johnny.
In datasheet view, I think you'll need to set up the field in the table.
Open the table in Design View
Click on the specific field in question
At the bottom you will see 2 tabs; General and Lookup (I
apologize, my work doesn't allow me to upload pics, so I hope you
can visualize it)
On the Lookup tab, change the Display Control from Text Box to
Combo Box
At that point, the properties should look familiar if you've worked with Combo Boxes, and you can change them to suit your needs.

How to extract my table_names+descriptions from my "database navigator" from IBM?

I have a my database navigator that contains a lot of tables with descriptions. I need to search within descriptions in order to find the table I need, but in the database navigator from ibm this feature is not available. Because of this I want to export all data to a excel sheet. But how?
This SQL statement will give you the schema (library), table name, and description for every table you have access to.
SELECT TABLE_SCHEMA, NAME, TABLE_TEXT
FROM QSYS2.SYSTABLES
You can get it into Excel in a few ways. I am not a big fan of iSeries Navigator, so I tend to use Microsoft Query to get my data into Excel.
Here's how I do it:
Go to the Data ribbon (I'm on 2007)
Select "From Other Sources"
Select "From Microsoft Query"
choose your data source and click OK
Cancel out of the Query Wizard
Answer "Yes" to the question "Do you want to continue editing this query in Microsoft Query?"
Close out of the "Add Tables" dialog.
Hit the SQL button on the tool bar (or choose "SQL..." from the "View" menu).
Paste in the SQL statement and click OK.
If "SQL Query can't be represented graphically. Continue anyway?" comes up, click OK.
Choose "Return data to Microsoft Office Excel" from the "File" menu.
Yes, it's a klunky process, but it works. The only downside is that Microsoft Query runs the query to show it to you, the Excel runs it again to pull the data. That might not always be a good idea if it's an expensive query to run. I wouldn't worry about it in this case.
You can also do it the old fashioned way, if you have access to green screen and the command line.
Use WRKOBJPDM LIB(youiSerieaLibraryName) OBJTYPE(*FILE)
then use F17 Subset (Shift and F5 ) and enter your search criteria for the file description next to TEXT

Edit data from result grid

I would like to edit data directly from result grid in ssms. eg:
When I execute SELECT TOP 10 * FROM some_table, I want to edit data directly from result grid.
I don't want to open some_table and edit from there.
I know that result grid is read-only, but maybe someone written addin for it.
You can't edit the data from within the result grid. You'd have to go via the "open table" route if you want to edit the data manually instead of using UPDATE/INSERT SQL statements.
Is there a reason you specifically want to use the result grid instead?
You can specify a query when you go via open table to limit the results if that's your reason? There's a "Show SQL Pane" button in the top toolbar you need to select (square box with "SQL" written in it).
I have very large database (70+ GB) with so many tables.
I'm using Red Gate's SQL refactor for intellisense and few other things.
It's so boring to type in update sql statements every time I need to change single field.
It also takes some time to find that table in the Object explorer.
Intellisense doesn't work when I use "Show SQL Pane".
I'm new to SQL Server and have used the Oracle product 'PL/SQL developer' by All Round Automations at a previous job... It would allow you to do a SELECT in the query window and then simply add "FOR UPDATE" to the end of your refined SQL SELECT and 'ta-da' you can now edit the results in a nice grid. No need to Open Table View, click the SQL button, paste in the SQL you you have been working on and then hit execute ;)
EMS SQL Manager for SQL Server allows to update data directly inside a results grid.
This tool is boring for typing new requests (poor intellisense and error management) but fine for this. I always have the two tools opened.
If you right click on the table and choose edit top 200 records, it produces a result screen with an query.
Add to this your query and then you can edit the records in the result screen.
Also you can change the 200 to a number you want (2000).
The "results" pane is not just results.
Results in text
Assorted time and IO statistics
Estimated and actual execution plans
Row counts, Error messages, PRINT output
etc
This is why they are separate.
Feel free to write your own add-in :-) Or here
SQL Server ISN'T Access!
When you run a query and get the results - thats exactly what you are doing, reading the data, not opening the table for editing. Can you imagine the necessary transactional control around allowing the results window to be edited? The locking would probably grind SQL to a halt - I hope no-one ever writes that kind of add-in!

Resources