Where can I access the tables under Master table in SQL Server 2012 Express? - sql-server-2012-express

I did a
select * from mytablename
and it is clearly there. But under the GUI Microsoft took out the tables link?

The master database can be seen under the System Databases in Object Explorer:
But why are you putting your tables into the master database!??!? That's not something you should be doing ....

Yes, I guess Microsoft has removed it in SQL Express 2012 or something like that as I too cannot see the 'Tables' link under the master database.

Related

How to create a graphical schema for Postgres database?

I have got a sql file where is configured a database in PostgreSQL technology. I created a database from sql file but from code it is hard to understand action/connecting between the tables. Is it some tool which show all the connections between tables for PostgreSQL?
pgDesigner
Data Architect
Datastudio
DbDesigner fork
DbSchema
dbwrench
DeZign for Database
Please take a look to this list of tools.

SquirrelSQL access more databases in one SQL script

It's probably a trivial question but I wasn't able to find any solution. The following script:
use Database1
go
...
use Database2
go
...
works in SQL Server Management Studio but not in SquirrelSQL 3.5.0 (jTDS Microsoft SQL driver) - use: invalid SQL statement.
What's wrong? Should I enable something in Squirrel options? (Both databases are located on the same server.)

Attach database to SQL Server 2008 R2

How do i load a database into SQL Server 2008 R2 express? SQL Server 2008, have a right click function on databases to add it. R2 don'r have the database folder. I checked the FAQ as best I could to find an answer but found nothing.
Thanks
I'm not quite sure, if I understand the question, but I read it as you do not have a "Databases" folder under the connected database server. I am thinking if the problem is more on the connection..
I assume that you mean SQL Server Management Studio.
In my understand you can't create a database.Right click and add.Something missing in your installation.Try to full install it again.. or try to create using Query
Create Database <DB NAME>

Rename SQL Azure database?

How can i rename the database in sql Azure?
I have tried Alter database old_name {MODIFY NAME = new_name} but not worked.
Is this feature available in SQL Azure or not?
Just so people don't have to search through the comments to find this... Use:
ALTER DATABASE [dbname] MODIFY NAME = [newdbname]
(Make sure you include the square brackets around both database names.)
Please check that you've connected to master database and you not trying to rename system database.
Please find more info here: https://msdn.microsoft.com/en-US/library/ms345378.aspx
You can also connect with SQL Server Management Studio and rename it in Object Explorer. I just did so and the Azure Portal reflected the change immediately.
Do this by clicking on the database name (as the rename option from the dropdown will be greyed out)
Connect with SQL Server Management Studio to your Azure database server, right-click on the master database and select 'New Query'. In the New Query window that will open type ALTER DATABASE [dbname] MODIFY NAME = [newdbname].
It's Very simple for now - Connect to DB via SQL Management Studio and Just rename as you generally doing for DB [Press F2 on DB name]. It will allow you to do this and it will immediately reflect the same.
I can confirm the
ALTER DATABASE [oldname] MODIFY NAME = [newname];
works without connecting to master first BUT if you are renaming a restored Azure database; don't miss the space before the final hyphen
ALTER DATABASE [oldname_2017-04-23T09 -17Z] MODIFY NAME = [newname];
And be prepared for a confusing error message in the Visual Studio 2017 Message window when executing the ALTER command
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.
You can easily do it from SQL Server Management Studio, Even from the community edition.

Creating a user without an associated login is not supported in SQL Server 2008 R2

When scripting a SQL Server 2000 database, on an SQL Server 2000 version of SQL Server, with SQL Server Management Studio 2008 R2 (10.50.1617.0) i get the error:
Creating a user without an associated login is not supported in SQL Server 2008 R2.
With the full stack trace:
Microsoft.SqlServer.Management.Smo.SmoException: Creating a user without an associated login is not supported in SQL Server 2008 R2.;
at Microsoft.SqlServer.Management.SqlScriptPublish.GeneratePublishPage.worker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
What is a good way to resolve this issue.
i've considered:
creating a login (and incur the wrath high atop the thing)
deleting the user (and incur the wrath from high atop the place)
select some rather than all objects to script, and don't script the user that offends SQL Server 2008 R2
But i'll let people on SO post answers, get answers upvoted, and accept an answer that best solves the problem.
As instructed. Just don't script the database users that have no associated login. You can do this in the Tasks > Generate Scripts wizard (pointing 2008 or later SSMS at your 2000 instance) by choosing to select specific database objects and unchecking any troublesome users:
I suspect that your SQL Server 2000 database has user aliases: these were required in SQL Server 6.5 in some circumstances because it was, er, crap,
Note what MSDN says:
sp_addalias is provided for backward compatibility. Microsoft® SQL Server™ version 7.0 provides roles and the ability to grant permissions to roles as an alternative to using aliases.
Run sp_helpuser on the SQL Server 2000 box and review the output and remove them