Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts

Thursday, March 22, 2012

Database Filename error -- cannot create db From MS online tutorials

I am using VB with Visual Studio Express. I am new to these tools. I have SQL Server 2005 Express installed on my machine. I think that I have the right version. I am just using Express for taking classes and teaching myself on my machine.

When I follow the examples in the book, I keep getting this error when I go to my ASP.NET configuration and click on the security tab to add myself as a user.

"There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem:The database filename can not contain the following 3 characters: [ (open square brace), ] (close square brace) and ' (single quote) " -- end of erro msg.

I have an apostrophe in my last name. Could that be what is causing it? Is it creating a db based on my name or something? Or do I have the wrong version of SQL Server Express installed.

Thank you for any help. I appreciate it.

--Mark

Have you checked Provide of your ASP.NET configuration? Just go to Provide panel and 'Test' it. Can you see any error message?

Wednesday, March 21, 2012

Database error messages

Hello I keep getting Various database connections in MSMSE.

The error is

Micorosoft SQL server management studio express error

TITLE: Microsoft SQL Server Management Studio Express

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

ADDITIONAL INFORMATION:

Could not load file or assembly 'Microsoft.SqlServer.Express.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A) (Microsoft.SqlServer.Express.ConnectionInfo)

Strong name validation failed. (Exception from HRESULT: 0x8013141A)

BUTTONS:

OK


I just opened CMD. and did the following


Command Prompt

cd D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn

sqlservr.exe -s

and it returned the following

Error : 17112, Severity : 16, State: 1. The error is printed in terse mode because there was error durring formatting. Tracing, ETW, Notifications etc are skipped.



kk so what can I do?

Hello anyone?

I get error messages when doing anything with SSMSE

I keep getting

Microsoft SQL Server Management Studio Express

Could not load file or assembly 'Microsoft.SqlServer.Express.BatchParser, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

OK

so any way to fix this without having to lose my databases?

because I have so much on it >.>


sql

Monday, March 19, 2012

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Database Engine Connection Error.

I got the sql2005 std edition at the msdn rollout, and the vs2005 studio. I uninstalled sql2000 and now, cannot connect to the database engine.

I get the following error message with a link to an page that offers no info. What's up and how can I get it to work? Please, help.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=2&LinkId=20476

Some questions which can help troubleshoot the real cause:

1) because uninstalalation of SQL2000, could you connect to SQL2005 STD?

2) Check the remote connection setting in SQL Server Surface Area Configuration for Services and Connections, note you need to restart SQL after changing the remote connection settings there.

3) Do you installed as named instance, if you could you check if the sqlbrowser service is enabled and running?

|||

Hi hungfut

I am also getting the same error.

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

When I try to connect to SQL Server Surface Area Configuration I am getting the following error.

Specified argument was out of the range of valid values.
Parameter name: index (System.Windows.Forms)

Because of this I could not verify the remote connection setting.

My named pipe instance are set to default (\\.\pipe\sql\query). Aslo IP1 & IP2 is enabled.

The SQL erver was running well. Until I installed the SP1. My SQl server is standard version. Please help me in this regard.

-Nitu

Database display/manipulation

I have a web page called homepage.aspx created in Visual Studio 2005 using VB. It contains some hyperlinks on the left side. I have a database created in SQL Server 2005. I need to add, delete, edit, update data in the database directly from this same page. How can I achieve this?. i.e is it possible to, say, have a form on a section of this same web page that would allow me to directly manipulate/modify and update the database? (If you may give code, you may use abstract names for the database, tables and column and/or field names-I will understand). Many thanks in advance.

Yes, what you want to do is possible - and is one of the main points behind ASP.NET. You need to read some of the many free tutorials that are available. It's not the sort of thing anyone can describe in useful detail in a reply to a post in this forum. Here are a couple:

http://msconline.maconstate.edu/tutorials/ASPNET20/default.htm
http://quickstarts.asp.net/QuickStartv20/aspnet/doc/data/default.aspx

|||

The links above are useful in this regard. The question I have is a bit different. I have arleady written the code to manipulate the database using GridView control. This ofcourse works in conjunction with the SqlDataSource control. The SqlDataSource control permits selecting a single database table at a time for actions of delete, add, edit etc. This means that if I need to do the above actions on many tables, I will need to reconfigure the SqlDataSource for each table. This also means that I will be able to delete, add, update data in all tables by using a number of web pages as each each table manipulation will have to be done via a seperate web page. This is ok but is very usable. I want to put,say, a form on just one web page and then this form will allow me to perform actions of add, delete, update etc on all tables using just this page. In brief: How can I fit a form on the existing web page and use this form to add, delete, udate the entire database data?.

|||The SqlDataSource will take any valid SQL or the name of a stored procedure for its CommandText property. You can assign this value at runtime in the code-behind. Most applications of the type you are describing tend to not show one "table" at a time - they show data from related tables using joins. Each data maintenance task usually has its own page/form, so adding/editing/deleting a story, for example would all be managed from one page, whereas adding/editing/deleting a contact would be done on a different one. You could do it all in one page, but I would never do so. Maintenance of code would be a mightmare.

Sunday, March 11, 2012

Database diagrams problem

Hi, I restored my 2000 database in Microsoft SQL Management Studio 2005 but
a cannot reach the Database Diagram. I get the message:
--
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
--
I used File pages but I don't know how to set a valid owner.
AKAssuming you don't have SP1 installed, then it's likely that your updated
database is still in 80 compatability level. See the Important note in this
Books Online topic (http://msdn2.microsoft.com/en-us/library/ms186345.aspx).
SP1contains a fix to this problem.
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://www.microsoft.com/technet/pr...oads/books.mspx
"Anatoly Kurilin" <akurilin@.nordsoft.ru> wrote in message
news:%23rhyXFotGHA.4852@.TK2MSFTNGP02.phx.gbl...
> Hi, I restored my 2000 database in Microsoft SQL Management Studio 2005
> but a cannot reach the Database Diagram. I get the message:
> --
> Database diagram support objects cannot be installed because this database
> does not have a valid owner. To continue, first use the Files page of the
> Database Properties dialog box or the ALTER AUTHORIZATION statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
> --
> I used File pages but I don't know how to set a valid owner.
> AK
>

Database Diagrams on SQL 2000

So there is no way to create a Database diagram on a SQL 2000 database using
SQL Server management studio 2005 even though that database diagrams is not
a
new feature?
ThanksHi Lazer,
Thats right, you should use SQL Enterprise Manager to admin/create database
diagrams on SQL Server 2000.
You can use Management Studio only to create diagrams against SQL Server
2005 servers and databases.
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Lazer" <Lazer@.discussions.microsoft.com> wrote in message
news:3F59CE7A-30EE-4D63-9F75-9341AF211698@.microsoft.com...
> So there is no way to create a Database diagram on a SQL 2000 database
> using
> SQL Server management studio 2005 even though that database diagrams is
> not a
> new feature?
> Thanks

Database Diagrams

TITLE: Microsoft SQL Server Management Studio

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.


BUTTONS:

OK

I don't know what is the meaning of the above message, which I get when I 'right click' the Database Diagrams node of the Northwind database. Every thing seems OK, since I am the owner of this database.

I am using the trial version of MS SQL Server 2005.

Hi there,

Check the database compatability level for your database. To do this:

1) Right click on the desired database and select "Properties" from the context menu that appears

2) The "Database Properties" dialog box will appear on your screen. There will be an item on the left hand side of the dialog called "Options". Click on this.

3) The "Database Properties" dialog will change its appearance. There should be an entry in the dialog called "Compatability Level".

Now, from my experience, if the database compatability level is set to anything other than "SQL Server 2005 (90)" then diagramming won't work. You need to change the compatability level to "SQL Server 2005 (90)" if it is not currently set to this.

If that was your problem then after changing the compatability level you should be able to create database diagrams.

Also, while you have the "Database Properties" dialog open, it wouldn't hurt just to check that the owner is valid (if you have not already done so). You can check and edit the database owner by clicking on the "Files" item on the left hand side of the "Database Properties" dialog.

Hope that helps a bit, but sorry if it doesn't
|||

Thanks a lot for your reply

But unfortunately it did not work

I am using Windows Authentication when I log in. And when I click Files in the Database properties windows I find the owner is the same as the log in user.

|||did you create your database with detach/attach?|||

I did not create it

I do not remember, either I imported the database, or it came with the engine.

|||

you might want to eliminate the issue from your local instance by creating a new dummy database. If you have no problem with the new database, the issue might be caused by the source database you got.

I have noticed a similar issue after I shared my database in another machine.

|||

Nate -

Thanks for this post! That worked perfectly for me.

Regards,

Tim

|||

If there is no issue with a fresh database locally, the issue could be likely caused by credential inherited from external database when attached. I found out the similar issue in this scenario and resolved by doing the following,

Alter authorization on database::issue_database_name_here to [domain\user]

Just share my experience.

|||

Sorry, I was offline for few days.

Thank you for your replies. I'll try your solution.

Somebody suggested the following solution to me:

Use Northwind
EXEC sp_helpdb Northwind
EXEC Sp_ChangeDBOwner 'sa'
EXEC sp_helpdb Northwind

I don't have enough experience with SQL Server. So I wish to get your views about the above solution.

Thursday, March 8, 2012

Database Diagram in SQL Server Management Studio Express Help please

I cerate a database with the tables but when I want to cerate a database diagram the SQL Server Management Studio Express throws an error :

"Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects"

I try all my best I open the Properties dialog box and I am login as administrator

I keep running in to the same problem. It happens with my databases which were imported from SQL server 2000. I have looked through the properties for databases which let me make diagrams, but I can't find any differences between those and the ones which give me this error.

Someone help!

|||i have had the same problem
see this link
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=171201&SiteID=1

database diagram in server explorer

I've created a connection to an SQL 2000 server in an asp.net 2.0 web application using Visual Studio 2005. When I view the database node in the server explorer, it doesn't show the database diagram node. Is there something I need to load to make this node appear? Thanks.

You might want to post this question to the Visual Studio group. I can't recall if this facility is version dependent. They would be able to better answer your question.

Terrence Nevins

SQL Server Program Manager

|||

Unfortunately, Management Studio 2005 and Visual Studio 2005 cannot work with diagrams on SQL Server 2000 servers.

Best regards,
Steve

database diagram in server explorer

I've created a connection to an SQL 2000 server in an asp.net 2.0 web application using Visual Studio 2005. When I view the database node in the server explorer, it doesn't show the database diagram node. Is there something I need to load to make this node appear? Thanks.

You might want to post this question to the Visual Studio group. I can't recall if this facility is version dependent. They would be able to better answer your question.

Terrence Nevins

SQL Server Program Manager

|||

Unfortunately, Management Studio 2005 and Visual Studio 2005 cannot work with diagrams on SQL Server 2000 servers.

Best regards,
Steve

Database Diagram in MSSMSE

after creating database in MICROSOFT SQL SERVER MANAGEMNET STUDIO EXPRESS, when i right click on diagram node, a menu appears with these 2 options :

1- working with sql server diagrams

2- refresh

how can i make a new diagram unless there is no such thing there?

I do not have the management tools for express loaded but you should be able to do it. When you do go to the database and expand it there is a diagram node. When you first expand this the engine should ask you if you want it to create the objects. You select yes then you are able to right click and create a new diagram. The other option is to use visual stuido 2005 to work with the digrams.

database diagram

Hi,
I restored my database from the backup file, which is working fine but it
is not showing the database diagram in SQL server management studio. What do
I need to do for that?
Thanks.
Manj.
Hi Manj,
I understand that after you restored your database, you found that the
database diagram disappeared in SQL Server Management Studio.
If I have misunderstood, please let me know.
Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
If so, it is by design that the database diagram will not be displayed in
SQL Server 2005 due to structure incompatibility. If your database is SQL
Server 2005, the database diagram should be there in your restored
database.
Anyway for this issue, after you restore your database, you can manually
create a diagram and add all of your tables to it.
Please feel free to let me know if you have any other questions or
concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hi Charles,
Thanks for the reply. It is SQL Server 2005 database. When I click on
database diagram I get the following message:
TITLE: Microsoft SQL Server Management Studio
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
BUTTONS:
OK
I added the owner from the Files page but still getting the same message.
When I connect to the database it does show the owner in the 'owner box'.
Cheers.
Manj.
"Charles Wang[MSFT]" wrote:

> Hi Manj,
> I understand that after you restored your database, you found that the
> database diagram disappeared in SQL Server Management Studio.
> If I have misunderstood, please let me know.
> Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
> If so, it is by design that the database diagram will not be displayed in
> SQL Server 2005 due to structure incompatibility. If your database is SQL
> Server 2005, the database diagram should be there in your restored
> database.
> Anyway for this issue, after you restore your database, you can manually
> create a diagram and add all of your tables to it.
> Please feel free to let me know if you have any other questions or
> concerns. Have a nice day!
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ================================================== ===
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ================================================== ====
> This posting is provided "AS IS" with no warranties, and confers no rights.
> ================================================== ====
>
>
>
|||Hi Manj,
This is a known issue that was fixed in SP1 or SP2. When you upgrade a
database from SQL Server 2000 to 2005, the database remains in 80
compatibility mode. To use the database diagram tool in SQL Server 2005,
the database must be set to 90 mode. See this Books Online topic:
http://msdn2.microsoft.com/en-us/library/ms186345.aspx
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"Manjree Garg" <garg@.newsgroup.nospam> wrote in message
news:7CAFD23C-FA12-4766-A26D-10E18863090A@.microsoft.com...[vbcol=seagreen]
> Hi Charles,
> Thanks for the reply. It is SQL Server 2005 database. When I click on
> database diagram I get the following message:
> TITLE: Microsoft SQL Server Management Studio
> --
> Database diagram support objects cannot be installed because this database
> does not have a valid owner. To continue, first use the Files page of the
> Database Properties dialog box or the ALTER AUTHORIZATION statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
> --
> BUTTONS:
> OK
> --
> I added the owner from the Files page but still getting the same message.
> When I connect to the database it does show the owner in the 'owner box'.
> Cheers.
> Manj.
> "Charles Wang[MSFT]" wrote:
|||Hi Gail,
Thanks for the suggestion. Resolved the issue.
Manj.
"Gail Erickson [MS]" wrote:

> Hi Manj,
> This is a known issue that was fixed in SP1 or SP2. When you upgrade a
> database from SQL Server 2000 to 2005, the database remains in 80
> compatibility mode. To use the database diagram tool in SQL Server 2005,
> the database must be set to 90 mode. See this Books Online topic:
> http://msdn2.microsoft.com/en-us/library/ms186345.aspx
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> "Manjree Garg" <garg@.newsgroup.nospam> wrote in message
> news:7CAFD23C-FA12-4766-A26D-10E18863090A@.microsoft.com...
>
>

Wednesday, March 7, 2012

database diagram

Hi,
I restored my database from the backup file, which is working fine but it
is not showing the database diagram in SQL server management studio. What do
I need to do for that?
Thanks.
Manj.Hi Manj,
I understand that after you restored your database, you found that the
database diagram disappeared in SQL Server Management Studio.
If I have misunderstood, please let me know.
Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
If so, it is by design that the database diagram will not be displayed in
SQL Server 2005 due to structure incompatibility. If your database is SQL
Server 2005, the database diagram should be there in your restored
database.
Anyway for this issue, after you restore your database, you can manually
create a diagram and add all of your tables to it.
Please feel free to let me know if you have any other questions or
concerns. Have a nice day!
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi Charles,
Thanks for the reply. It is SQL Server 2005 database. When I click on
database diagram I get the following message:
TITLE: Microsoft SQL Server Management Studio
--
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
--
BUTTONS:
OK
--
I added the owner from the Files page but still getting the same message.
When I connect to the database it does show the owner in the 'owner box'.
Cheers.
Manj.
"Charles Wang[MSFT]" wrote:
> Hi Manj,
> I understand that after you restored your database, you found that the
> database diagram disappeared in SQL Server Management Studio.
> If I have misunderstood, please let me know.
> Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
> If so, it is by design that the database diagram will not be displayed in
> SQL Server 2005 due to structure incompatibility. If your database is SQL
> Server 2005, the database diagram should be there in your restored
> database.
> Anyway for this issue, after you restore your database, you can manually
> create a diagram and add all of your tables to it.
> Please feel free to let me know if you have any other questions or
> concerns. Have a nice day!
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> =====================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
> ======================================================>
>
>|||Hi Manj,
This is a known issue that was fixed in SP1 or SP2. When you upgrade a
database from SQL Server 2000 to 2005, the database remains in 80
compatibility mode. To use the database diagram tool in SQL Server 2005,
the database must be set to 90 mode. See this Books Online topic:
http://msdn2.microsoft.com/en-us/library/ms186345.aspx
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
Download the latest version of Books Online from
http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
"Manjree Garg" <garg@.newsgroup.nospam> wrote in message
news:7CAFD23C-FA12-4766-A26D-10E18863090A@.microsoft.com...
> Hi Charles,
> Thanks for the reply. It is SQL Server 2005 database. When I click on
> database diagram I get the following message:
> TITLE: Microsoft SQL Server Management Studio
> --
> Database diagram support objects cannot be installed because this database
> does not have a valid owner. To continue, first use the Files page of the
> Database Properties dialog box or the ALTER AUTHORIZATION statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
> --
> BUTTONS:
> OK
> --
> I added the owner from the Files page but still getting the same message.
> When I connect to the database it does show the owner in the 'owner box'.
> Cheers.
> Manj.
> "Charles Wang[MSFT]" wrote:
>> Hi Manj,
>> I understand that after you restored your database, you found that the
>> database diagram disappeared in SQL Server Management Studio.
>> If I have misunderstood, please let me know.
>> Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
>> If so, it is by design that the database diagram will not be displayed in
>> SQL Server 2005 due to structure incompatibility. If your database is SQL
>> Server 2005, the database diagram should be there in your restored
>> database.
>> Anyway for this issue, after you restore your database, you can manually
>> create a diagram and add all of your tables to it.
>> Please feel free to let me know if you have any other questions or
>> concerns. Have a nice day!
>> Best regards,
>> Charles Wang
>> Microsoft Online Community Support
>> =====================================================>> When responding to posts, please "Reply to Group" via
>> your newsreader so that others may learn and benefit
>> from this issue.
>> ======================================================>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> ======================================================>>
>>
>>|||Hi Gail,
Thanks for the suggestion. Resolved the issue.
Manj.
"Gail Erickson [MS]" wrote:
> Hi Manj,
> This is a known issue that was fixed in SP1 or SP2. When you upgrade a
> database from SQL Server 2000 to 2005, the database remains in 80
> compatibility mode. To use the database diagram tool in SQL Server 2005,
> the database must be set to 90 mode. See this Books Online topic:
> http://msdn2.microsoft.com/en-us/library/ms186345.aspx
> --
> Gail Erickson [MS]
> SQL Server Documentation Team
> This posting is provided "AS IS" with no warranties, and confers no rights
> Download the latest version of Books Online from
> http://technet.microsoft.com/en-us/sqlserver/bb428874.aspx
> "Manjree Garg" <garg@.newsgroup.nospam> wrote in message
> news:7CAFD23C-FA12-4766-A26D-10E18863090A@.microsoft.com...
> > Hi Charles,
> >
> > Thanks for the reply. It is SQL Server 2005 database. When I click on
> > database diagram I get the following message:
> >
> > TITLE: Microsoft SQL Server Management Studio
> > --
> >
> > Database diagram support objects cannot be installed because this database
> > does not have a valid owner. To continue, first use the Files page of the
> > Database Properties dialog box or the ALTER AUTHORIZATION statement to set
> > the database owner to a valid login, then add the database diagram support
> > objects.
> >
> > --
> > BUTTONS:
> >
> > OK
> > --
> >
> > I added the owner from the Files page but still getting the same message.
> > When I connect to the database it does show the owner in the 'owner box'.
> >
> > Cheers.
> >
> > Manj.
> > "Charles Wang[MSFT]" wrote:
> >
> >> Hi Manj,
> >> I understand that after you restored your database, you found that the
> >> database diagram disappeared in SQL Server Management Studio.
> >> If I have misunderstood, please let me know.
> >>
> >> Did you restore a SQL Server 2000 or earlier database to SQL Server 2005?
> >> If so, it is by design that the database diagram will not be displayed in
> >> SQL Server 2005 due to structure incompatibility. If your database is SQL
> >> Server 2005, the database diagram should be there in your restored
> >> database.
> >>
> >> Anyway for this issue, after you restore your database, you can manually
> >> create a diagram and add all of your tables to it.
> >>
> >> Please feel free to let me know if you have any other questions or
> >> concerns. Have a nice day!
> >>
> >> Best regards,
> >> Charles Wang
> >> Microsoft Online Community Support
> >> =====================================================> >> When responding to posts, please "Reply to Group" via
> >> your newsreader so that others may learn and benefit
> >> from this issue.
> >> ======================================================> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >> ======================================================> >>
> >>
> >>
> >>
> >>
> >>
>
>|||Hi all,
I have the same problem (SS2005):
TITLE: Microsoft SQL Server Management Studio
--
Database diagram support objects cannot be installed because this database
does not have a valid owner. To continue, first use the Files page of the
Database Properties dialog box or the ALTER AUTHORIZATION statement to set
the database owner to a valid login, then add the database diagram support
objects.
With:
SELECT USER
it returns "dbo"
Where the problem?
Thanks a lot.
Luigi|||The problem seems to be that the SID for your dbo user inside the database doesn't exist as a login
in the master database. Use either ALTER AUTHORIZATION (as suggested by the error message) or
sp_changedbowner to make sure that the database has an owner that really exist in the master
database (as a login).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Luigi" <ciupazNoSpamGrazie@.inwind.it> wrote in message
news:D544D243-9D98-4432-B91B-9D68BE0C189E@.microsoft.com...
> Hi all,
> I have the same problem (SS2005):
> TITLE: Microsoft SQL Server Management Studio
> --
> Database diagram support objects cannot be installed because this database
> does not have a valid owner. To continue, first use the Files page of the
> Database Properties dialog box or the ALTER AUTHORIZATION statement to set
> the database owner to a valid login, then add the database diagram support
> objects.
> With:
> SELECT USER
> it returns "dbo"
> Where the problem?
> Thanks a lot.
> Luigi
>
>|||"Tibor Karaszi" wrote:
> The problem seems to be that the SID for your dbo user inside the database doesn't exist as a login
> in the master database. Use either ALTER AUTHORIZATION (as suggested by the error message) or
> sp_changedbowner to make sure that the database has an owner that really exist in the master
> database (as a login).
Thank you Tibor, I'll make in this way.
Luigi

Saturday, February 25, 2012

Database design question

I am brand new to both programming and databases and am trying to design a database for my job as a paramedic.

I am using Visual Studio 2005 , and MSSQL . I am trying to create a log for all of our ambulance calls.

My question comes in when I try to design a field that holds our case number , which is formatted as 07-0001. Basically, the year , then four digits for the remainder of the case number .

Any help on how to accomplish this would be SO appreciated !!!I would use a varchar for this.

presumably you want to preserve the minus sign and the leading zero - this rules out any numeric storage types such as int.|||Thanks ! So, does this mean I can't use that field as an ID for my database ? Also, how would I go about the formatting I would need ?

Sorry to be such a novice, but I do SO appreciate the help !|||the reply depends on many other questions. will the database generate the next call-number or it is a user input/front-end generated number? is the number editable? will the number recycle missing numbers specially the last deleted ones?
there are quite a few options. it could be saved in 2 separate fileds and formatted properly during display, it could be a formula field, it could be a plain varchar field with validations etc. etc...

Friday, February 17, 2012

database creation

hi

if i open the management studio express and trying to create a database by right clicking the server name and trying in the new query window,im getting error as

CREATE DATABASE permission denied in database 'master'.

can anyone help me in rectifying this error?

Thanks in advance

It seems as though your login does not have permission to create a new database.

Log in as the administrator, and give your login the appropriate priviledges.

|||

hi arnie

thank you for your answer

I found another error as

when i opened the management express in windows authentication mode and tried to create table thats also did'nt work

after that i saw that i did'nt install the service pack 2

now the problem is solved after installing the SP2

i created my login and its working fine

thank you for ur response

thanks,

Poorani