Why is my database not showing up? - sql

Actually in the sql server management studio when I click the database,nothing comes up(+ sign beside the database name is not listing any items) and none of the logins are getting connected.nothing is logged in the error log(except that the login cannot connect to the database).After sometime,automatically the database comes up without doing anything(that is the + sign comes up and all the listing in the management stidio comes up.plz suggest me what will be the reason for this

Try to refresh the SSMS windows by pressing F5. Put focus on "Databases" in the Object Explorer before refresh.
/niels

Related

SSMS SQL SERVER Management Studio 2012 startup freeze

I have a strange situation. IT installed SSMS on my laptop and it runs well the first time, connected to my SQL servers remotely etc. But then it's frozen. I forced quit and then started SSMS again. Now it's totally frozen, no popup window at all to enter the server-connection text string. Then I did a force quit and got a pop up window (see it here ).
Microsoft SQL Server Management Studio has detected that an operation is blocking user input. This can be caused by an active modal dialog or a task that needs to block user interaction. Would you like to shut down anyway?
Has anyone seen this before? My IT department has no clue.
Often this is due to the new connection dialog being off screen (usually due to changing monitor setup e.g. 1 to 2 monitors or resolution change etc).
If so the really easy fix (if your connection dialog just needed approval without changing fields) is :
Focus on SSMS and Hit Enter/Return
..or the easy fix (if above does not work - as your last connection is not ready to go) is:
Alt Tab to SSMS
Alt + Space - context menu
M - select Move (in offscreen context menu)
Arrow Key(s) - to move it back onto screen
As per answers here from #Eirik Toft and here from #Lee Chetwynd
Fixed an issue which presented the same on my machine today by renaming a entry in my registry:
After some digging there seems to be multiple issues that can produce the same error (Application, settings, registry). This blog entry covers it pretty well:
http://www.armedia.com/blog/2012/08/sql-server-management-studio-freeze/
In my case deleteing the SQL server management studio folder under AppData ( c:\users\%userName%Appdata\raoming\microsoft\ ) didn't work.
However I was successfully after deleting / renaming the regisitry entry:
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server]
(update)
Worked out the underlying issue on my laptop - was using additional 2 screens with much higher resolutions which caused windows / SSMS to open up the connect to new data source dialog off all of them. If your using multiple screens try returning to just use the native laptop screen to see if you can find the dialog that SSMS is waiting on your input for.
I just had this same situation, with two additional screens connected to my laptop. SQL Server Management Studio was opened on the third screen, with the modal dialog nowhere to be seen.
Two options:
Press tab three times and enter. This cancels the dialog. Now you can move the window to another screen.
Set Windows to only use one or two screens. SSMS opens on the first and should still open there when you move back to using three screens.
When SSMS is on your primary or secondary screen, the modal dialog opens on the first and should be usable.
It was because multi screen display. Turning off multiscreen to single one resolved it. Reenabled multi screen display after ssms started working
In my case, "Run as Administrator" option worked like charm. I was accessing my server screen with the windows RDP. And when I open SQL Server Management Studio and Visual Studio 2010 user hangs at the moment and wont operate unless sign off r disconnected by administrator.
But when I set compatibility mode of both the application to the "run as Administrator", it starts working fine.
the problem also occurs if you have a touch screen. I fixed this by disabling the local thouch screen when I switch to RDP.

how to create DB in visual studio 2010 ultimate

i am using visual studio 2010 ultimate.i have problem to using sql server in VS 2010.i find server explorer in this but i do not know how to create a new connection and what are its authentications.how to create a new data base in server explorer.what is the name of server and authentication for it.please explain?
To connect to a database from Server Explorer
From the View menu, choose Server Explorer.
In Server Explorer right-click Data Connections and choose Add
Connection.
If this is the first connection you make, the Choose Data Source
dialog box appears. Under Data Source choose the kind of data source
to which you are connecting, and then under Data Provider choose the
appropriate provider for the application you are working with.
Finally click Continue.
In the Add Connection dialog box, enter the requested
information.
This information is different for each provider. For more
help on this tab, click the Help icon at the top of the dialog box or
press F1 with the dialog box selected.
Choose the Advanced button to open a list of settings you can change
for the selected provider.
Choose Test Connection to check the connection without closing the
dialog box. This way you can make adjustments to the settings if the
connection does not succeed.
Click OK.
Your connection appears in Server Explorer under the Data Connections node.

How do I display the tabs in the query window in SQL Server Management Studio?

SQL Server Management Studio crashed on me due to plug-ins that we use (source control/schema/data compare, etc) and I had to reset it to defaults.
But now, every time I click on New Query the query window opens without tabs.
How do I open it with tabs?
Adding Hamlet Hakobyan's answer here so I can close out this question.
Answer:
Tools\Options\Environment\General\Tabbed Documents

Microsoft SQL Server not letting me open .bak

I am taking a class and our instructor gave us a file to download called cs.bak and its supposed to be formatted for the version of SQL we are using. So I downloaded the one for Microsoft SQL Server.
Well I tried to do the restore but when I get to the part that I choose device and locate the file cs.bak it loads and now I am suppose to be able to choose destination. Well after I choose destination I do not have the OK button to go through with the restore.
On these instructions http://www.katieandemil.com/sql-server-2012-restore-database-backup-file
If you count the window screens. I can only get as far as the 6th screen.
I am suppose to do this, "Some questions will ask you to write out query results from a database. In order to answer these questions you will need to have the example database available to you."
Well I can't open it to do this. Any help would appreciated. Thank you.
Check this:
This checkbox might be unchecked - and then the [OK] button remains disabled...
This seems to be a Windows Layout issue. To resolve this, reset the SSMS Window Layout by selecting from the main menu Window -> Reset Windows Layout.

"COM Surrogate stopped working" error

How can I fix the error "COM Surrogate stopped working" in Windows Vista Business?
Right click My Computer, select
Properties - select Advanced System
Settings from the left side pane -
In the Performance box, Click
Settings - Click Data Execution
Prevention tab.
Check the "Turn on DEP for all
programs and services except those I
select" option - Click "Add".
A navigation box opens, navigate to
C:\WINDOWS\system32\dllhost.exe,
Click it to add and hit OK.
This should now add this "Com
Surrogate", with a checked box, into
the list area, OK out, reboot and
you're done. The Com Surrogate errors
should disappear
Taken from here
This process nowadays is often caused by the trojan. Check your PC with anti-malware. These intruders got smart and tend to disguise their malicious activity behind these common exe processes, in this case, Dllhost.exe. check in which folder this file is and maybe update the program or drivers it is linked to. It may be an outdated software issue too.