How can I make the Tab Drop Down In Sql Server Management Studio display more of the File Names - sql-server

Am I the only person annoyed by this? I don't even know what proc I'm clicking on if the file names have the same prefix, or are longer than the context window width.

I find the tab dropdown, as well as the tab names themselves, annoying. You can't widen either of them.
It helps to save each script to a file, even if only temporarily. I work in an environment where I need to save each script I write. I can see the file names if I hover over each tab. Not perfect, but it helps.
If you're running SSMS 2008 (or even just SSMS Express 2008), you can change certain property settings so that only certain things are shown in each tab: the current server, the current database, the filename, etc. If you only work in a single database, for instance, you could switch off everything except the filename.
But unless any of these suggestions help, there's really no way around those stupid tabs.

connect is garbage, they dont do anything

There isn't a way to make it any bigger.
I find this greatly annoying as well. There are a couple of connect items open about this.

Related

Multiple Similar (Duplicate) Reports

I currently created a report that I would like to duplicate 40 times but with a different filter each time. So far I'm afraid this is only possible with a very manual process but I was hoping if someone has a faster solution?
Would it be possible to connect to the DataStudio API (if there is one) and run a script for this?
Also, making a design change can be problematic as it needs to be copied to 40 reports. Does anyone have a suggestion for this?
A report is stored as an RDL file in the file system. Its of XML format. Make a copy of the file in the file system and open the copy using a text editor (I prefer notepad++) and find the parameter. Change the paramater to whatever value you want it to be and save the file under a different name. I would include the parameter name in the report name. If the report as using 'Memphis' I would name the report Sales_Memphis.RDL.
Do this 40 times. Be very careful about not changing the structure of the XML file (Don't change any of the element names or opening and closing symbols(<>). Re-import the file into SSDT report project to verify it is using the correct value.
To import a file into an existing project:
Right click on “Reports” folder and select “Add” then “Existing Item”
Now file browser window will open.
Find the file and double click on it.
Ideally you can have a dropdown with all the possible values for users to choose from but I guess that is not appropriate for your needs.
If this is a good solution please check it off as valid solution.
I checked this with google support and apparently there is no way yet to do this.
There are currently no API's available to do this nor can you download something similar to an RDL file. Right now the only way is manual duplication and to make adjustments for each report separately.
Have you looked into custom bookmarking. It sounds like it might be able to address the problem you're expressing. This way you would only have one report, but the links you would share would automatically apply the correct filter value.

Copy/Paste, Delete option not working in SQL Management Studio

I was trying to copy and paste some queries and noticed that the paste option is not working. After that I realized that my copy, paste, delete and next line option is not working at all. What will be the reason for this issue.
When you press the Ctrl key, the text editor is looking for a mouse click to "Go to Definition".
Tools>Options>Text Editor>General> Uncheck "Enable mouse click to perform Go To Definition"
(or you can change the modifier key to something you use less often if you want to continue using this feature)
What, exactly, are you trying to copy, and from where? For instance, if you're attempting to copy and paste tables, views or stored procedures (etc) in the Object Explorer, you'll have no luck.
For most of these items, you should be able to right-click, select "Script [Table | View | Stored Procedure ] As > CREATE TO > New Query Editor Window", then run the script.
Unfortunately(?), SSMS isn't as easy going as Microsoft Access, there's definitely a little work involved.
just experienced the same situation in SSMS v18.5!
Also wasn't able to paste/copy code in the Query's Window.
After playing around and restarting the App it wouldn't work.
I did not have issues copying/pasting in all other applications.
Then I found a solution myself by simply thinking about how to "re-init" the engine of Copy/Paste in SSMS:
Go to: Tools | Options | General | Check "Apply Cut or Copy to blank lines when there is no selection".
After applying the "fix" you should be able to copy/paste again! You may reset the checkmark later.
Hope you other guys have the same luck!
Edit: A few hours later the Copy/Paste again was not working and the fix did not work. I found out that a separate instance of Visual Studio had the same copy/paste problem. So it may be either a Windows 10 or .NET problem.
A reboot helped me in that case.
I encountered this problem too, and got a message saying my pc was out of memory. This could be caused by too many apps being open or too many background processes running.
Simply restarting the pc resolved the problem.

Open multiple copies of same file in SSMS

We have a script file called CreateClientDatabase.SQL, double clicking it opens it in SSMS where we can change a few parameters and execute it.
Problem:
A few hours/days later we may need to do the same again for another client, but if the original tab in SSMS has not been closed then double clicking the file will simply bring that tab to the fore and not actually open the file.
So it's easy to assume the script you are now looking at is the same as the file when it is not, and this can lead to all sorts of issues.
Is there a way round this?
Can SSMS open a second copy of the file, or warn the user that it hasn't actually opened it much like Excel does.
What you need, I think, is something similar to excel or word template files: whenever you open such file by double-click, a new document with the contents of the template is created.
SSMSBoost add-in (that I develop) has “Autoreplacements” feature: you can define a “magic token”, that will be replaced by your script, whenever that token is typed. For example, we have pre-defined token “sel”, which is replaced by “select * from” whenever you type “sel” and press space.
You could associate your script with any word, like “doit”, so whenever you visit next customer, you just open new query window, type that word+space and you have your script in the window immediately.
Just to mention: SSMSBoost allows you to define “favorite” connections, so, you can save all your cutomer’s servers in one list and quickly switch between them.
Alternative:
Have a look at SSMS Templates (View->Template explorer). SSMS allows creating your own templates and opening them by double-clicking their name from Template Explorer. In connection with SSMSBoost “Preferred connections” list you have a good setup to start your work quickly.
Hope this helps.
If file is opened from the windows explorer then it opens another instance of SSMS.
I think what you need is to detect when the SQL script file is changed outside if the SSMS environment:
make sure that Tools -> Options -> Environment -> Documents -> Detect when file is changed outside the environment is checked.
More details can be found here.

Datazen - Live data won't display

To the best of my knowledge, I'm correctly importing my MS-SQL data source in the Control Panel (It says successful in green). I'm also pretty sure I'm importing the data correctly into the Windows 7 Publisher app since I can view the data in the DataView:
but when I go to the Layout View or Run Preview, I just get a blank chart:
It works if I use the default SimulatedTable but once I change the data source to my MS-SQL table, I can't get anything to display, no matter what display element I'm trying to use.
I've tried re-importing the data, using a different MS-SQL table, and re-naming the columns to match the SimulatedTable but it doesn't change the result. Can anyone tell me what I'm doing wrong?
Please try one thing, I am just guessing it might work.
Please select one of the Time Preset buttons and see if you see data in that(where there is blank) chart object.
If yes, then while setting up the time navigator object, select an option in drop down box labeled "Default Time Range Preset"
There are some hacks, please do let me know if run into some weirdness. It might not make sense if i try to explain unless you run into that situation.
Cheers,
I ended up giving up on the Windows 7 version of the application and running a virtual instance of Windows 8.1 instead so I could install the Datazen Publisher app for Windows 8.1. It's FAR less buggy.
Not perfect, though.

SSRS css messing up?

So the last couple of days my dev webpage for ssrs has been looking really weird, as if it's not getting styled by css at all. I'm not the only person that is seeing it like this. We just rebooted the server and it didn't have any effect. If you know what it causing this, please help.
another symptom is that i can't modify security settings now.
If I were you, I would view the page using FF (firebug), and take a look in the head to see whether the CSS is being imported.
If it is, make sure the path is correct.
A couple of general things come to mind...
Make sure your IIS application/virtual directory settings are correct especially if you are using SSRS2005. The default IIS applications are "Reports" and "ReportServer"
Make sure the NTFS rights are correct for Local path. For example the default location for ReportServer is "c:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer"
In my experience when strange things like this are happening there are user rights/access issues. Especially when you can't modify security settings.
HTH
Well it kinda seems to have fixed itself.
This may be a bit naive, but have you tried an offline version of the code?
Get the generated HTML via "view source" in your browser of choice, then get the stylesheet by accessing it directly from the same browser, using whatever the path is from the html (I recommend Google Chrome, as the view source provides clickable hyperlinks within the source). Put them both on your desktop, making sure the relative paths are preserved, and see what it looks like offline.
I'm sure that the server/Microsoft produce all of this code and so it's SUPPOSED to work, so a missing closing tag or misplaced semi-colon is probably not the answer, but I have found more than once that pulling my output off the server and onto my desktop has made the problem go from mysterious to "Oh! Duh! /styles/style.css, not /Styles/style.css" etc etc.
The problem can only be with your server if www doesn't have read/execute access to all of the right folders. I find this really unlikely, but it's easy to check by simply trying to view the source code of the CSS. If you can, the problem is post-server output.

Resources