Cannot Create Database Diagram In SQL Server 2005 - sql-server

I've got SQL Server Management Studio 2005 and I'm trying to create a database diagram for a DB I created. I created the DB on the local SQL server an when I try to create a new database diagram it doesn't let me. It just gives me the option:
"Working with SQL Server 2005 diagrams".
It does not give me any option to create a new database diagram. It is strange though as I also connected to another SQL Server 2005 instance on our internal network and I have the option to create database diagram on that server.
Any help is appreciated.
Cian

If I remember correctly, you need a certain privilege (db-owner?) to create diagrams.
Could that be the problem?

Related

Selecting data from SQL Server 2005 DB to Azure SQL staging DB table in Azure

I was wondering if this is possible: I want to create 2 tables in an Azure SQL database which I want to use as staging tables for some data selected from a SQL Server 2005 database on an on-premise server.
Is there any good way of doing this?
Update:
Followed the Linked-Server Guide and got this error: I need to add a linked server to a MS Azure SQL Server
The weird thing is i just managed to login to the Azure DB on with Those exact credentials. Am i missing some security configuration somewhere?
You don't necessarily need to create a linked server to move data from an on-premise SQL table to Azure SQL. Tools like SSIS come to mind, where a linked server isn't necessary. Or a tool like SSDT where you could use the Data Compare feature to move data. There is also Azure Data Factory.
Support for linked servers and distributed queries against a SQL Azure Database is a feature available since September 2012 as explained here. On my tests it does not work correctly on SQL 2012 and does not work on SQL Server 2008 R2 and earlier versions. You may need to upgrade to SQL Server 2014 to create a fully functional linked server.
Hope this helps.

How to create a database using SQL Scripts?

I have SQL script and I need to create a database in other server using this SQL scripts in SQL server 2016. Is it possible and can you explain me the steps to do it?
Right click database on the old server instance, Script Database as, then Create to, execute the script on the new server instance after changing the Connection

Accessing Oracle database from SQL Server stored procedure.

I was wondering if someone could give me some pointers on how to connect to an Oracle Database from stored procedure in SQL Server.
Firstly on your SQL Server server you will need to install Oracle Client Tools, the reason behind this is any machine that wants access to a Oracle Database will need the necessary Oracle Client Tools installed to access it.
Secondly you will need to configure the file "tnsnames.ora" that is installed with the above configured to point to the required Oracle Server/Database that you want to connect to.
Now you will need to create a Linked Server from your SQL Server management studio for that server to the oracle server.
Then in your stored procedure you have to follow the rule of:
[SERVER_NAME].[DATABASE].[OWNER].[OBJECT] in order of accessing thing on the oracle database, but keep in mind this is SQL Server syntax and there might be some minor twiking needed.
This is a rough outline and I hope it has set you on your way.

I can't use a database in SQL Azure

I am trying to use a Database in SQL Azure. I have installed SQL Server 2008. I can Login SQL Azure and can use master Database. But I can't use other Database and I can't see any things in my object explorer. It shows this error:
"USE statement is not supported to switch between databases. Use a new connection to connect to a different Database."
How can I use another database?
You cannot link to another database server from SQL Azure, whether that other database is SQL Server or SQL Azure.
I found the Solution for this problem . I install SQL Server 2008 R2. then every thing is ok...
You can first create only the database before running the whole script to create schemas & Tables.
Then manually change the database to the new DB that was created.
Run the rest of the script. Do not run Use <databasename>

can i view aspnet.db in sql server 2008 management studio

i have just started playing aorund with asp.net mvc and i want to view the database (aspnetdb.mdf) in sql server 2008 management studio
but it doesn't seem to let me view this file.
any suggestions?
You have to attach the database to the SQL Server instance using CREATE DATABASE FOR ATTACH or sp_attach_db, and then connect to the instance with SQL Server Management Studio to view the contents of the database. I am assuming that you are using SQL Express, which would mean that your application is configured to use User Instances where the connection string attaches the database to the SQL Server during code execution. This isn't a optimal way of doing things performance wise since you have to pay the cost to bring the database online repeatedly. If you attach the database permanently to the SQL Instance you will need to change the application connection string because the database can only be attached once since SQL Server takes an lock on the file to prevent it from being changed by another process.

Resources