Friday, March 30, 2012
problems with updating datasets in visual studio .net
I have a strange problem since yesterday.
I'm trying to change datasets in my project and I save changes. when I close
the Report and open it again I see that the changes where not saved. Also
the visual studio keeps getting stuck and I have to close it and open it
again.
I have noticed that if I change the query string from the Dataset Properties
window, it does save it.
Since yesterday everything worked properlly, I didn't installed any thing or
make any changes. I tried to do the same thing in another computer in a new
project, and I have the same problem there. Also when I make changes in a web
application in the visual studio, there are no problems.
I'm really desprate here,
can you help me?
Thanks,
LimorI don't know if this is what your problem is, but I noticed that when I
change a dataset from the Data tab, I click on the Layout tab (which shows
the * next to the name to show that it's changed) and then click Save. Since
I've done that I haven't seen a problem with dataset changes not being saved.
Also, if you click Run from the Data tab, leave the result set displayed and
go to another application for awhile, eventually Visual Studio pops up the
same window that Enterprise Manager does having to do with the result set
(can't remember the exact message). Sometimes a separate window pops up from
Visual Studio with the message, sometimes Visual Studio just hangs. That's
probably what you're seeing.
Hope that helps!
"Limor Bellison" wrote:
> Hi,
> I have a strange problem since yesterday.
> I'm trying to change datasets in my project and I save changes. when I close
> the Report and open it again I see that the changes where not saved. Also
> the visual studio keeps getting stuck and I have to close it and open it
> again.
> I have noticed that if I change the query string from the Dataset Properties
> window, it does save it.
> Since yesterday everything worked properlly, I didn't installed any thing or
> make any changes. I tried to do the same thing in another computer in a new
> project, and I have the same problem there. Also when I make changes in a web
> application in the visual studio, there are no problems.
> I'm really desprate here,
> can you help me?
> Thanks,
> Limor|||This is definitely the route to go. Sometimes when you change a dataset the
designer does not recognize that a change was made so it does not get saved.
Going to layout and clicking the save button resolves this problem.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"daw" <daw@.discussions.microsoft.com> wrote in message
news:48C835F1-5BB3-4CEB-A969-73995D0F4F22@.microsoft.com...
>I don't know if this is what your problem is, but I noticed that when I
> change a dataset from the Data tab, I click on the Layout tab (which shows
> the * next to the name to show that it's changed) and then click Save.
> Since
> I've done that I haven't seen a problem with dataset changes not being
> saved.
> Also, if you click Run from the Data tab, leave the result set displayed
> and
> go to another application for awhile, eventually Visual Studio pops up the
> same window that Enterprise Manager does having to do with the result set
> (can't remember the exact message). Sometimes a separate window pops up
> from
> Visual Studio with the message, sometimes Visual Studio just hangs.
> That's
> probably what you're seeing.
> Hope that helps!
> "Limor Bellison" wrote:
>> Hi,
>> I have a strange problem since yesterday.
>> I'm trying to change datasets in my project and I save changes. when I
>> close
>> the Report and open it again I see that the changes where not saved.
>> Also
>> the visual studio keeps getting stuck and I have to close it and open it
>> again.
>> I have noticed that if I change the query string from the Dataset
>> Properties
>> window, it does save it.
>> Since yesterday everything worked properlly, I didn't installed any thing
>> or
>> make any changes. I tried to do the same thing in another computer in a
>> new
>> project, and I have the same problem there. Also when I make changes in a
>> web
>> application in the visual studio, there are no problems.
>> I'm really desprate here,
>> can you help me?
>> Thanks,
>> Limor|||Hi,
I mannaged to overcome the saving problem by changing the dataset from the
"edit selected dataset" window. but I still have problems with visual studio
getting stuck, it happens unexpetedly after I change the dataset.
Thanx,
Limor
"Bruce L-C [MVP]" wrote:
> This is definitely the route to go. Sometimes when you change a dataset the
> designer does not recognize that a change was made so it does not get saved.
> Going to layout and clicking the save button resolves this problem.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "daw" <daw@.discussions.microsoft.com> wrote in message
> news:48C835F1-5BB3-4CEB-A969-73995D0F4F22@.microsoft.com...
> >I don't know if this is what your problem is, but I noticed that when I
> > change a dataset from the Data tab, I click on the Layout tab (which shows
> > the * next to the name to show that it's changed) and then click Save.
> > Since
> > I've done that I haven't seen a problem with dataset changes not being
> > saved.
> > Also, if you click Run from the Data tab, leave the result set displayed
> > and
> > go to another application for awhile, eventually Visual Studio pops up the
> > same window that Enterprise Manager does having to do with the result set
> > (can't remember the exact message). Sometimes a separate window pops up
> > from
> > Visual Studio with the message, sometimes Visual Studio just hangs.
> > That's
> > probably what you're seeing.
> > Hope that helps!
> >
> > "Limor Bellison" wrote:
> >
> >> Hi,
> >> I have a strange problem since yesterday.
> >> I'm trying to change datasets in my project and I save changes. when I
> >> close
> >> the Report and open it again I see that the changes where not saved.
> >> Also
> >> the visual studio keeps getting stuck and I have to close it and open it
> >> again.
> >> I have noticed that if I change the query string from the Dataset
> >> Properties
> >> window, it does save it.
> >> Since yesterday everything worked properlly, I didn't installed any thing
> >> or
> >> make any changes. I tried to do the same thing in another computer in a
> >> new
> >> project, and I have the same problem there. Also when I make changes in a
> >> web
> >> application in the visual studio, there are no problems.
> >>
> >> I'm really desprate here,
> >> can you help me?
> >>
> >> Thanks,
> >> Limor
>
>|||Where are you doing this from? Is it from the report wizard?
Once you have the report designed and you want to modify the dataset
definition then you just go to the data tab. There is either a graphical
design tool or you can switch to generic (2 pane versus the 4 pane). To
switch to generic designer you click on a button that is to the right of the
...
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Limor Bellison" <LimorBellison@.discussions.microsoft.com> wrote in message
news:491F9403-8334-46BD-B5DB-0AD8268EFB95@.microsoft.com...
> Hi,
> I mannaged to overcome the saving problem by changing the dataset from the
> "edit selected dataset" window. but I still have problems with visual
> studio
> getting stuck, it happens unexpetedly after I change the dataset.
> Thanx,
> Limor
> "Bruce L-C [MVP]" wrote:
>> This is definitely the route to go. Sometimes when you change a dataset
>> the
>> designer does not recognize that a change was made so it does not get
>> saved.
>> Going to layout and clicking the save button resolves this problem.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "daw" <daw@.discussions.microsoft.com> wrote in message
>> news:48C835F1-5BB3-4CEB-A969-73995D0F4F22@.microsoft.com...
>> >I don't know if this is what your problem is, but I noticed that when I
>> > change a dataset from the Data tab, I click on the Layout tab (which
>> > shows
>> > the * next to the name to show that it's changed) and then click Save.
>> > Since
>> > I've done that I haven't seen a problem with dataset changes not being
>> > saved.
>> > Also, if you click Run from the Data tab, leave the result set
>> > displayed
>> > and
>> > go to another application for awhile, eventually Visual Studio pops up
>> > the
>> > same window that Enterprise Manager does having to do with the result
>> > set
>> > (can't remember the exact message). Sometimes a separate window pops
>> > up
>> > from
>> > Visual Studio with the message, sometimes Visual Studio just hangs.
>> > That's
>> > probably what you're seeing.
>> > Hope that helps!
>> >
>> > "Limor Bellison" wrote:
>> >
>> >> Hi,
>> >> I have a strange problem since yesterday.
>> >> I'm trying to change datasets in my project and I save changes. when I
>> >> close
>> >> the Report and open it again I see that the changes where not saved.
>> >> Also
>> >> the visual studio keeps getting stuck and I have to close it and open
>> >> it
>> >> again.
>> >> I have noticed that if I change the query string from the Dataset
>> >> Properties
>> >> window, it does save it.
>> >> Since yesterday everything worked properlly, I didn't installed any
>> >> thing
>> >> or
>> >> make any changes. I tried to do the same thing in another computer in
>> >> a
>> >> new
>> >> project, and I have the same problem there. Also when I make changes
>> >> in a
>> >> web
>> >> application in the visual studio, there are no problems.
>> >>
>> >> I'm really desprate here,
>> >> can you help me?
>> >>
>> >> Thanks,
>> >> Limor
>>|||Hi,
My rport is allready designed and I modify the dataset from the data tab by
the generic designer.
Limor
"Bruce L-C [MVP]" wrote:
> Where are you doing this from? Is it from the report wizard?
> Once you have the report designed and you want to modify the dataset
> definition then you just go to the data tab. There is either a graphical
> design tool or you can switch to generic (2 pane versus the 4 pane). To
> switch to generic designer you click on a button that is to the right of the
> ...
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Limor Bellison" <LimorBellison@.discussions.microsoft.com> wrote in message
> news:491F9403-8334-46BD-B5DB-0AD8268EFB95@.microsoft.com...
> > Hi,
> > I mannaged to overcome the saving problem by changing the dataset from the
> > "edit selected dataset" window. but I still have problems with visual
> > studio
> > getting stuck, it happens unexpetedly after I change the dataset.
> >
> > Thanx,
> > Limor
> >
> > "Bruce L-C [MVP]" wrote:
> >
> >> This is definitely the route to go. Sometimes when you change a dataset
> >> the
> >> designer does not recognize that a change was made so it does not get
> >> saved.
> >> Going to layout and clicking the save button resolves this problem.
> >>
> >>
> >> --
> >> Bruce Loehle-Conger
> >> MVP SQL Server Reporting Services
> >>
> >> "daw" <daw@.discussions.microsoft.com> wrote in message
> >> news:48C835F1-5BB3-4CEB-A969-73995D0F4F22@.microsoft.com...
> >> >I don't know if this is what your problem is, but I noticed that when I
> >> > change a dataset from the Data tab, I click on the Layout tab (which
> >> > shows
> >> > the * next to the name to show that it's changed) and then click Save.
> >> > Since
> >> > I've done that I haven't seen a problem with dataset changes not being
> >> > saved.
> >> > Also, if you click Run from the Data tab, leave the result set
> >> > displayed
> >> > and
> >> > go to another application for awhile, eventually Visual Studio pops up
> >> > the
> >> > same window that Enterprise Manager does having to do with the result
> >> > set
> >> > (can't remember the exact message). Sometimes a separate window pops
> >> > up
> >> > from
> >> > Visual Studio with the message, sometimes Visual Studio just hangs.
> >> > That's
> >> > probably what you're seeing.
> >> > Hope that helps!
> >> >
> >> > "Limor Bellison" wrote:
> >> >
> >> >> Hi,
> >> >> I have a strange problem since yesterday.
> >> >> I'm trying to change datasets in my project and I save changes. when I
> >> >> close
> >> >> the Report and open it again I see that the changes where not saved.
> >> >> Also
> >> >> the visual studio keeps getting stuck and I have to close it and open
> >> >> it
> >> >> again.
> >> >> I have noticed that if I change the query string from the Dataset
> >> >> Properties
> >> >> window, it does save it.
> >> >> Since yesterday everything worked properlly, I didn't installed any
> >> >> thing
> >> >> or
> >> >> make any changes. I tried to do the same thing in another computer in
> >> >> a
> >> >> new
> >> >> project, and I have the same problem there. Also when I make changes
> >> >> in a
> >> >> web
> >> >> application in the visual studio, there are no problems.
> >> >>
> >> >> I'm really desprate here,
> >> >> can you help me?
> >> >>
> >> >> Thanks,
> >> >> Limor
> >>
> >>
> >>
>
>|||Is this going against a stored procedure or are you inputting the query
directly. Is there any pattern? Are these very large or complicated queries,
lots of parameters?
One of the things that happens when you modify the query is RS tries to get
the new field list. If you have a query that this happens with routinely
then you can directly modify in the RDL. Make a copy first before you do
this. Then you do a view, code (I think, I am at home and don't remember the
menu to view the RDL).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Limor Bellison" <LimorBellison@.discussions.microsoft.com> wrote in message
news:3953B976-D223-44A9-AB2A-7113027A4122@.microsoft.com...
> Hi,
> My rport is allready designed and I modify the dataset from the data tab
> by
> the generic designer.
> Limor
> "Bruce L-C [MVP]" wrote:
>> Where are you doing this from? Is it from the report wizard?
>> Once you have the report designed and you want to modify the dataset
>> definition then you just go to the data tab. There is either a graphical
>> design tool or you can switch to generic (2 pane versus the 4 pane). To
>> switch to generic designer you click on a button that is to the right of
>> the
>> ...
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Limor Bellison" <LimorBellison@.discussions.microsoft.com> wrote in
>> message
>> news:491F9403-8334-46BD-B5DB-0AD8268EFB95@.microsoft.com...
>> > Hi,
>> > I mannaged to overcome the saving problem by changing the dataset from
>> > the
>> > "edit selected dataset" window. but I still have problems with visual
>> > studio
>> > getting stuck, it happens unexpetedly after I change the dataset.
>> >
>> > Thanx,
>> > Limor
>> >
>> > "Bruce L-C [MVP]" wrote:
>> >
>> >> This is definitely the route to go. Sometimes when you change a
>> >> dataset
>> >> the
>> >> designer does not recognize that a change was made so it does not get
>> >> saved.
>> >> Going to layout and clicking the save button resolves this problem.
>> >>
>> >>
>> >> --
>> >> Bruce Loehle-Conger
>> >> MVP SQL Server Reporting Services
>> >>
>> >> "daw" <daw@.discussions.microsoft.com> wrote in message
>> >> news:48C835F1-5BB3-4CEB-A969-73995D0F4F22@.microsoft.com...
>> >> >I don't know if this is what your problem is, but I noticed that when
>> >> >I
>> >> > change a dataset from the Data tab, I click on the Layout tab (which
>> >> > shows
>> >> > the * next to the name to show that it's changed) and then click
>> >> > Save.
>> >> > Since
>> >> > I've done that I haven't seen a problem with dataset changes not
>> >> > being
>> >> > saved.
>> >> > Also, if you click Run from the Data tab, leave the result set
>> >> > displayed
>> >> > and
>> >> > go to another application for awhile, eventually Visual Studio pops
>> >> > up
>> >> > the
>> >> > same window that Enterprise Manager does having to do with the
>> >> > result
>> >> > set
>> >> > (can't remember the exact message). Sometimes a separate window
>> >> > pops
>> >> > up
>> >> > from
>> >> > Visual Studio with the message, sometimes Visual Studio just hangs.
>> >> > That's
>> >> > probably what you're seeing.
>> >> > Hope that helps!
>> >> >
>> >> > "Limor Bellison" wrote:
>> >> >
>> >> >> Hi,
>> >> >> I have a strange problem since yesterday.
>> >> >> I'm trying to change datasets in my project and I save changes.
>> >> >> when I
>> >> >> close
>> >> >> the Report and open it again I see that the changes where not
>> >> >> saved.
>> >> >> Also
>> >> >> the visual studio keeps getting stuck and I have to close it and
>> >> >> open
>> >> >> it
>> >> >> again.
>> >> >> I have noticed that if I change the query string from the Dataset
>> >> >> Properties
>> >> >> window, it does save it.
>> >> >> Since yesterday everything worked properlly, I didn't installed any
>> >> >> thing
>> >> >> or
>> >> >> make any changes. I tried to do the same thing in another computer
>> >> >> in
>> >> >> a
>> >> >> new
>> >> >> project, and I have the same problem there. Also when I make
>> >> >> changes
>> >> >> in a
>> >> >> web
>> >> >> application in the visual studio, there are no problems.
>> >> >>
>> >> >> I'm really desprate here,
>> >> >> can you help me?
>> >> >>
>> >> >> Thanks,
>> >> >> Limor
>> >>
>> >>
>> >>
>>
Problems with Timeout expired
Hi
I have a SQL Server database which has a number of tables and views. Using SQL Server Management Studio Express I can open most of the views without a problem. However, some of the views cause an SQL Connection Error but not every time I open them.
Error Source: Net SqlClient Data Provider
Error Message: Timeout expired. The timeout period expired ....
I have looked at the help given for this error but have come to the conclusion that none of the suggested causes are relevant as most views open without a problem. It would appear that I need to increase the timeout value but I can't find where I do that.
It must be simple..
I have just checked that the Execution Time-out in the SSMSE options is set to 0.
Problems with the Web ReportViewer Control
Problems with the Web ReportViewer Control
I'm using SQL Server 2005 Reporting Services Sept CTP and Visual Studio 2005 RC to develop an ASP.NET application. On one of my web forms I have placed the web ReportViewer control so that I can display reports from Reporting Services.
The .aspx code is:
<%@. Page Language="C#" AutoEventWireup="true" CodeFile="ReportViewer.aspx.cs" Inherits="ReportViewer" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>ReportViewer</title>
</head>
<body>
<form id="formReportViewer" runat="server">
<div>
<asp:Panel ID="PanelDisplayReport" runat="server" Height="100%" Width="100%">
<rsweb:reportviewer id="ReportViewerDisplayReport" runat="server" bordercolor="Navy" borderstyle="Solid" borderwidth="1px" height="100%" tooltip="Display Report" width="100%" Font-Names="Verdana" Font-Size="8pt" ProcessingMode="Remote">
</rsweb:reportviewer>
</asp:Panel>
</div>
</form>
</body>
</html>
The .aspx code-behind (in C#) is:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class ReportViewer : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
this.ReportViewerDisplayReport.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
this.ReportViewerDisplayReport.ToolTip = "/AdventureWorks Sample Reports/Company Sales";
this.ReportViewerDisplayReport.ZoomPercent = 90;
this.ReportViewerDisplayReport.ServerReport.DisplayName = "/AdventureWorks Sample Reports/Company Sales";
this.ReportViewerDisplayReport.ServerReport.ReportPath = @."/AdventureWorks Sample Reports/Company Sales";
this.ReportViewerDisplayReport.ServerReport.ReportServerUrl = new Uri(@."http://localhost/ReportServer");
}
}
As you can see, this is a very simply web form that is simply trying to display one of the reports from the AdventureWorks sample database and reports.
The problem is that the report will not display in the ReportViewer control. When I request the page, I see the ReportViewer's toolbar but not the actual report. I initially see the "Report is being generated" message in the control, where the report would normally be displayed. But, after the report is generated, no report, just the toolbar.
Anyway, does any one have any suggestions as to what's wrong?
Is there a bug in the ReportViewer control (for web forms) in Visual Studio 2005 RC?
Anything else???
Thanks in advance.
Wednesday, March 28, 2012
Problems with SQL Server
I have installed SQL Server 2005 and Visual Studio 2005 (release edition)- since I have SQL Server, I didn't install SQL Server Express - didn't figure I'd need it.
I have created a Web Project and added an App_Data directory.
Whenever I try to add a SQL database to the directory, I get the following message:
--------
Microsoft Visual Studio
--------
Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251
--------
OK Help
--------
How can I get VS to work with the SQL Server installation instead of Express?
Use the server explorer pane, or set the database up in Management Studio.
Monday, March 26, 2012
Problems with SQL 2005 IDE and Column Names
Hello all.
I'm having problems with SQL 2005 Management Studio not liking some of my column names, even though I believe they are valid when run directly through a SQL query window. An example...
CREATE TABLE [Test](
[ID] [int] NOT NULL,
[The.Name] [nvarchar](50) NULL )
INSERT INTO [Test] ( [ID], [The.Name]) VALUES (1, 'Test')
DELETE FROM [Test] WHERE [ID] = 1
This SQL will execute in the Query window without issue. To see the problem in action...
- Execute the SQL to CREATE the table and INSERT the row Use the Management Studio IDE to Right-Click on the Test table and "Open Table" Highlight the row in the new results window Try to delete the row See the error message: The multi-part identifier "The.Name" could not be bound
It's confusing me because, as far as I am able to determine, the column name is valid SQL and was even created in the IDE. Ultimately I can work around this by either working directly in SQL or simply renaming the column, but both options would be an impact on our project schedule. If anyone could provide some insight it would be greatly appreciated.
Much thanks.
Unfortunately it looks like you have uncovered a bug in Management Studio. I have filed it against the product team.|||This bug is under consideration for being fixed in sql server 2005 SP2. You can track the bug at
http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?feedbackid=05843594-1bcf-4b5b-a51e-cfae51b27007
Problems with Roles and sp_helpRoleMember
I have a database role named gc_stationAdmin. I have a user x who has this role granted him when via Mgmt Studio under Logins. In fact I have 50+ users who have this role.
1) when I execute sp_helpRoleMember I see only 20 users who have this role when I'm expecting to see 50 and user X is not amongst the 20
2) when sp_helpRoleMember is executed AS user X, they only see 1 user with this role (and it's not himself)
3) when I drop user X from Role using sp_dropRoleMember OR using Mgmt Studio under Login Properties, it never drops him according to Mgmt Studio. When I pull up the login properties, that role is still always checked no matter what I do...although he doesn't appear in the sp_helpRoleMember result ever.
What is going on with this? Why is dropping role member not effective? And how can I get user X to appear in the resultset of sp_HelpRoleMember?
Thanks in advance for any help...this is totally confusing me.
Sounds like there is a disconnect between the user in the server and the user in the database. Is this Windows authentication or SQL Server? Which version?
There are three tables involved with sp_helprolemember. You can cut to the heart of the matter by running this query:
select DbRole = g.name, MemberName = u.name
from sys.database_principals u
, sys.database_principals g
, sys.database_role_members m
where g.name = 'gc_stationAdmin''
and g.principal_id = m.role_principal_id
and u.principal_id = m.member_principal_id
order by 1, 2
My guess is that they won't show up there. Check the three tables one at a time to see what ID's and so on that they have. That might point you in the right direction.
|||
This is a windows authenticated user. Based on previous posts in this forum, I've already looked at those 2 tables (principals and rolemembers). Indeed, the guy's principal ID never is added to the rolemembers table when I check off the role for that guy's login or use sp_addrole. Either I don't have permissions (which I do - Admin) or something is overriding this guy's role configuration.
And why would he only see 1 from sp_helprolemembers and I see 20? Please help me make some sense on what's happening...
(thanks for your reply Buck)
|||Can you specify what version of SQL Server you are using?
Thanks
Laurentiu
The reason you see more results than x, when calling sp_helprolemember, is related to catalog security. But why x does not show in the results of sp_helprolemember even though you explicitly call sp_addrolemember is the puzzling part.
Are you getting any errors when calling sp_addrolemember?
Thanks
Laurentiu
I would suggest to check the permissions catalog, to see if there are any denies that impact your ability to see the membership rows:
select * from sys.database_permissions where state <> 'G'
Also, does the membership actually take effect? If you connect as that user, does is_member return 1?
Thanks
Laurentiu
Thanks Laurentiu...there were no explicite denies in the database_permissions table. Is_Member indeed shows that this user is a member. So, I guess I need to be using Is_Member rather than sp_HelpRoleMember. I've been using HelpRoleMember for the past 8 years with no problem until now. And now it works for some and not for others. I still think there is a problem, however.
In fact, I tried sp_HelpRoleMember again just now as I was typing this reply. Recall, previously when I executed this (as the user) I would get 1 record return and it wasn't him. Now it shows 2 records and he's one of them. The only thing I did was execute your recommendations (select * from sys.database_permissions ... AND Is_member). So, I really have to wonder what Is_Member is doing because this appears to have "kicked things" back in order. I can verify this on other user accounts having this problem...
Thanks again for having me try these suggestions!
|||Is_member should not have any effect on sp_helprolemember. What you describe sounds indeed like an issue, so let me make another suggestion and see if it helps: after you add the owner to the role and check with sp_helprolemember and you don't see him (if you can still repro this behavior), try clearing all caches and rerun sp_helprolemember. To clear caches, you can execute:
dbcc freesystemcache ('all')
If you see the row after clearing the caches, then we'll have a better idea of what causes the issue.
Thanks
Laurentiu
Yes, you can open a report on the feedback site - you can find a link to it in the sticky post at the top of this forum. But without having a repro, a report won't help much - if we cannot experience the problem, we cannot fix it. I tried a few scenarios and I couldn't see the behavior that you described.
Have you tried clearing the cache, as I suggested earlier?
Thanks
Laurentiu
I did try clearing the cache to no avail.
But, forgive me for not seeing this earlier (although I don't think the problem is totally fixed). sp_addrolemember seemed to help the situation. I tried this on another user with the problem...running sp_droprolemember and sp_addrolemember.
sp_addrolemember --> executing this makes the user account appear in the results of sp_helprolemember and Is_member return 1.
sp_droprolemember --> executing this makes the user account disappear from the results of sp_helprolemember and Is_member returns 1.
Now, I use sp_HelpRoleMember from within my application. So, I think this may work for me. But I continue to be stumped why after dropRoleMember, Is_Member returns 1. I would expect it to return 0. This may explain why in SQL Management Studio, the login's role is always checked even when you try unchecking...it always comes back. And yes, I'm an Admin in those machines...we have 25 machines and it is happening on a few users everywhere. Just continues not to make sense to me.
Again, thanks for your persistent help
|||So, clearing the cache doesn't help with the results of is_member either? Just want to confirm this...
When you execute is_member, are you logged in as the account you made a member of the role, or are you connected as admin (you can execute select suser_name(), user_name() to get your current identity).
We appreciate your time digging into this problem - if there is a problem, we want to know about it.
Thanks
Laurentiu
I'm also having the same issue:
Basically, for a db_owner user it can see all member USERS, while for SQL user with a regular database role can only see the member ROLES when calling
EXEC sp_helprolemember 'My_APP_Managers'.
The reason lies deep down at sys.database_principals and sys.database_role_members. If you do a
select * from sys.database_principals
or
select * from sys.database_role_members
It comes back with different number or rows when the connected users are different.
As soon as I change the user to a db_owner, it can see all the member USERS and ROLES.
Help please!
Problems with Rights in MS SQL Server Management Studio Express
Hi all!
I'm a beginner in SQL server admin and have just set up SQL Server 2005 in a Vista environment. So far so good! What I've got a problem with now is to get rights set up properly in the MS SQL Server Management Studio Express sw. If I try to add another database or add a new login and such, the results is all the time insufficent priviledges.
CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) for instance.
SQL is SP2, all else is up to date too
Really would appreciate som help on this
Olof
hi Olof,
please verify the the account/SQL Server login you are using has enought permissions to create new databases, specifically "Create any database" permission..
log in as a member of system administrators server role or "sa" login, select the Security->Logins node... select the appropriate login, rx click->Properties.. in the "Securables" tab, press the [add] button, select the "the Server:your instance" radio.. in the "Explicit permissions for instance_name" grid, grant "Create any database" to the required login(s)..
regards
|||Hi again!
I found the tabs u mentioned, came in where the explicit rights where and set create db on my user. Effectiv rights lists all the rights. Still I can't create a db as I don't have rights in the masterdb it says. If I go back to the explicit rights afterward, nothing is set on my user, even though it went well entering them earlier.....
This seems strange. My account is as system admin and login shows automatically login as SQLEXPRESS. If I use login with user my accound (as normal admin in the system) it says that it's not a trusted account: The user is not associated with a trusted SQL Server connection
I'm really lost here and will be thankful for any more hints.
Thanks in advance
Olof
|||Hi Olof,
Windows Vista introduced a new security feature called User Account Control. Because of UAC, programs will no longer recognize your membership in Builtin\Administrators and will only see you as a normal user. Normal users do not have permission to create databases in SQL Server. You can use the provisioning tool described in this blog post to give yourself the appropriate permissions in SQL Express for use on Vista.
Mike
Problems with Rights in MS SQL Server Management Studio Express
Hi all!
I'm a beginner in SQL server admin and have just set up SQL Server 2005 in a Vista environment. So far so good! What I've got a problem with now is to get rights set up properly in the MS SQL Server Management Studio Express sw. If I try to add another database or add a new login and such, the results is all the time insufficent priviledges.
CREATE DATABASE permission denied in database 'master'. (Microsoft SQL Server, Error: 262) for instance.
SQL is SP2, all else is up to date too
Really would appreciate som help on this
Olof
hi Olof,
please verify the the account/SQL Server login you are using has enought permissions to create new databases, specifically "Create any database" permission..
log in as a member of system administrators server role or "sa" login, select the Security->Logins node... select the appropriate login, rx click->Properties.. in the "Securables" tab, press the [add] button, select the "the Server:your instance" radio.. in the "Explicit permissions for instance_name" grid, grant "Create any database" to the required login(s)..
regards
|||Hi again!
I found the tabs u mentioned, came in where the explicit rights where and set create db on my user. Effectiv rights lists all the rights. Still I can't create a db as I don't have rights in the masterdb it says. If I go back to the explicit rights afterward, nothing is set on my user, even though it went well entering them earlier.....
This seems strange. My account is as system admin and login shows automatically login as SQLEXPRESS. If I use login with user my accound (as normal admin in the system) it says that it's not a trusted account: The user is not associated with a trusted SQL Server connection
I'm really lost here and will be thankful for any more hints.
Thanks in advance
Olof
|||Hi Olof,
Windows Vista introduced a new security feature called User Account Control. Because of UAC, programs will no longer recognize your membership in Builtin\Administrators and will only see you as a normal user. Normal users do not have permission to create databases in SQL Server. You can use the provisioning tool described in this blog post to give yourself the appropriate permissions in SQL Express for use on Vista.
Mike
Friday, March 23, 2012
Problems with remote conexion
I have installed SQL SERVER 2005 EXPRESS but i cant do a remote login
with SQL Server Management Studio Express. I have deactivated Windows
XP firewall in the SQL SERVER side and I have activated tcp/ip
connections. Which can be the problem?
Thanks all(dagato2@.terra.es) writes:
> I have installed SQL SERVER 2005 EXPRESS but i cant do a remote login
> with SQL Server Management Studio Express. I have deactivated Windows
> XP firewall in the SQL SERVER side and I have activated tcp/ip
> connections. Which can be the problem?
First of all, deactivating the Windows firewall sounds like a bad idea. You
may have to open the ports on which SQL Server listens, or list the
machine you are connecting from as an exception.
Next, I will have to ask you for clarification. On which machine have you
installed SQL Express? On which machine have you installed Mgmt Studio
Express? To which server instance do you try to connect?
Keep in mind that by default SQL Express installs as a named instance, so
if you install SQL Express on a machine named DAGATO2, you should connect
to DAGATO2\SQLEXPRESS.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Erland Sommarskog ha escrito:
> (dagato2@.terra.es) writes:
> > I have installed SQL SERVER 2005 EXPRESS but i cant do a remote login
> > with SQL Server Management Studio Express. I have deactivated Windows
> > XP firewall in the SQL SERVER side and I have activated tcp/ip
> > connections. Which can be the problem?
> First of all, deactivating the Windows firewall sounds like a bad idea. You
> may have to open the ports on which SQL Server listens, or list the
> machine you are connecting from as an exception.
> Next, I will have to ask you for clarification. On which machine have you
> installed SQL Express? On which machine have you installed Mgmt Studio
> Express? To which server instance do you try to connect?
> Keep in mind that by default SQL Express installs as a named instance, so
> if you install SQL Express on a machine named DAGATO2, you should connect
> to DAGATO2\SQLEXPRESS.
I found the problem, I didnt have enabled sql browser.
Thanks for the answer.|||(dagato2@.terra.es) writes:
> I found the problem, I didnt have enabled sql browser.
Yeah that one as well! Thanks for posting back! Maybe one day I will
be able to remember all things that can go wrong with connection!
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql
Problems with Printing and rendering to PDF
Hi,
I have an SQL server 2000 and I am creating a simple 1 page report using the Reporting Services and Visual Studio 2003. Everything is working fine. When I on "Preview" or when I access the report using a URL to disply it in HTML, I get a perfect report.
However, when I click on the "Print Preview" Icon (in the Preview Tab), or when I Render it as PDF, something goes wrong and it divides the report in 2 pages. On the first, there is only the company logo and the outlines of the tables used, while the rest of the report (minus the logo) is on the second page! I tried removing the logo, but still got a first page with only the outlines of tables. I also tried increasing the margins, with no success! I even tried removing some of the tables from the report, and test it, also the same result! could it be the datasets?
Did anybody get this problem? What could possibly be the reason?
Thanks a lot
Bob
Yes, the only way that I was able to stop this from happening was to reduce the margin size in the report properties.|||Thx
yes it was the margins of the report that did this, especially the left and right margins.
sqlProblems with Printing and rendering to PDF
Hi,
I have an SQL server 2000 and I am creating a simple 1 page report using the Reporting Services and Visual Studio 2003. Everything is working fine. When I on "Preview" or when I access the report using a URL to disply it in HTML, I get a perfect report.
However, when I click on the "Print Preview" Icon (in the Preview Tab), or when I Render it as PDF, something goes wrong and it divides the report in 2 pages. On the first, there is only the company logo and the outlines of the tables used, while the rest of the report (minus the logo) is on the second page! I tried removing the logo, but still got a first page with only the outlines of tables. I also tried increasing the margins, with no success! I even tried removing some of the tables from the report, and test it, also the same result! could it be the datasets?
Did anybody get this problem? What could possibly be the reason?
Thanks a lot
Bob
Yes, the only way that I was able to stop this from happening was to reduce the margin size in the report properties.|||Thx
yes it was the margins of the report that did this, especially the left and right margins.
Wednesday, March 21, 2012
Problems with output variables when using varchar
I am using c# in Visual Studio 2005 to run a stored procedure in a sql 2000 databse. this is the stored procedure
CREATE procedure dbo.returnVendor4
@.vendorID varchar(10),
@.name nvarchar output
as
select @.name = vendor_Name
from vendors
where Code = @.vendorID
I steped through the c# code, it gives me an error when the procedure is ran (at the ExecuteNonQuery() part). this is the error message
"String[0]: the Size property has an invalid size of 0."
I have a similar procedure that returns an int, and it works okay. My c# code that calls the procedure is below
string retVal ;
SqlConnection con = new SqlConnection(
"server = lissadell; database = s00048271; uid = s00048271; pwd = 'chocolate'");
con.Open();
SqlCommand cmd = con.CreateCommand();
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "returnVendor4";
cmd.Parameters.Add("name", SqlDbType.NVarChar);
cmd.Parameters.Add("vendorID", SqlDbType.VarChar);
cmd.Parameters["name"].Direction = ParameterDirection.Output;
cmd.Parameters["vendorID"].Value = "G/03/I";
cmd.ExecuteNonQuery();
retVal = (string)(cmd.Parameters["name"].Value);
textBox1.Text = retVal.ToString() ;
just an idea - have you tried switching the order of your Parameters.Add statements? I think SQL will want the input parameter first. No idea if this will make a difference, just something off the top of my head.
Another guess - can you specify the size of the parameters when you add them? i.e. varchar(10)?
|||i tried both ideas, they didn't work|||IN your Stored Procedure you need to add a length to your @.name parameter
@.name nvarchar(50) output.
Also, I think your C# Parameter.Add syntax may be a little off (Been a while since I coded in C#), try
cmd.Parameters.Add("@.name", SqlDbType.NVarChar,50);
cmd.Parameters.Add("@.vendorID", SqlDbType.VarChar,10);
Problems with ODBC
Thanx,Robert, You posted twice so I moved your other posting (same questions) to the SQL Data Access forum. They should be able to help you over there.
Cheers,
Dan
Tuesday, March 20, 2012
Problems with Management Studio Express
Hi,
I have two problems with Sql Management Studio Express. I've installed it to be able to upload/attach my Sql Server Express (that came with the Visual Web Developer Express download) to the real Sql Server 2005 at my web host.
1. When I start the application, that is Sql Management Studio Express, I get the following message:
***********************************************''
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.IOException: Det går inte att skapa en stabil underordnad nyckel till en temporär överordnad nyckel. ("It's not possible to create a lower key to a temporary upper key")
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.CreateKeyValueIfNotExist(String regPath, String keyName)
at Microsoft.SqlServer.Management.UI.ConnectionDlg.RegisteredServersUtils.RegisterLocalInstancesIfFirstTimeUser()
at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
------------
Microsoft.SqlServer.Express.AppIDPackage
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.AppIDPackage.DLL
------------
Microsoft.SqlServer.Express.VSIntegration
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.VSIntegration.DLL
------------
Microsoft.VisualStudio.Shell.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.Shell.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Shell.Interop.dll
------------
Microsoft.VisualStudio.OLE.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.OLE.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.OLE.Interop.dll
------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
------------
Microsoft.SqlServer.Express.SqlTDiagM
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlTDiagM.DLL
------------
Microsoft.DataWarehouse.SQM
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.DataWarehouse.SQM.DLL
------------
Microsoft.SqlServer.Instapi
Assembly Version: 9.0.242.0
Win32 Version: 9.00.1399.00
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SqlServer.Instapi/9.0.242.0__89845dcd8080cc91/Microsoft.SqlServer.Instapi.dll
------------
Microsoft.SqlServer.Express.ObjectExplorer
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ObjectExplorer.DLL
------------
Microsoft.SqlServer.Express.ConnectionDlg
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ConnectionDlg.DLL
------------
Microsoft.SqlServer.Express.RegSvrEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.RegSvrEnum.DLL
------------
Microsoft.SqlServer.Express.SqlWorkbench.Interfaces
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlWorkbench.Interfaces.DLL
------------
Microsoft.VisualStudio.TextManager.Interop
Assembly Version: 7.1.40304.0
Win32 Version: 7.0.4054
CodeBase:file:///C:/WINDOWS/assembly/GAC/Microsoft.VisualStudio.TextManager.Interop/7.1.40304.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.TextManager.Interop.dll
------------
Microsoft.SqlServer.Express.SqlMgmt
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlMgmt.DLL
------------
Microsoft.SqlServer.Express.SQLEditors
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SQLEditors.DLL
------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
------------
Microsoft.SqlServer.Express.ConnectionInfo
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.ConnectionInfo.DLL
------------
EnvDTE
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC/EnvDTE/8.0.0.0__b03f5f7f11d50a3a/EnvDTE.dll
------------
Microsoft.SqlServer.Express.CustomControls
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.CustomControls.DLL
------------
Microsoft.SqlServer.Express.SqlEnum
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.SqlServer.Express.SqlEnum.DLL
------------
Microsoft.NetEnterpriseServers.Express.ExceptionMessageBox
Assembly Version: 9.0.242.0
Win32 Version: 9.00.2047.00
CodeBase:file:///C:/Program/Microsoft%20SQL%20Server/90/Tools/Binn/VSShell/Common7/IDE/Microsoft.NetEnterpriseServers.Express.ExceptionMessageBox.DLL
------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase:file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
******************************************************************
Why do I get this and what should I do to avoid it? I've installed Atlas and tried out some AJAX components from Telerik, but I haven't done anything else sppoky to the machine (Windows XP Home, SP2). If I click Continue, I cn still open Sql Management Studio Express, but get this error code occasionally.
2. I have my db in the folder VWD suggested, that is My Documents>My websites>the website's name, but I can't seem to navigate to there. Instead the Object Explorer is stuck in my computer's topnode somewhere. What should I do? It seems strange to me that these things don't fit together if that's the case. Or has this to do with the problem stated above? I admit I know little about this, having previously worked with Access and MySql only.
Please help me out! An additional note: I don't particularily want this app anyway, just a convenient and reliable way to attach my db to the web host's Sql Server. Is there an easier way (or maybe this is easy but just not working ;-) )?
Thanks for any replies,
Pettrer
Your error is saying Windows Forms so I don't know but you could ask your hosting company backup and restore permissions so you can just backup and restore. The other option modify the code in the thread below to the info you get from the hosting compaby so attach your database. And if you are having probelm with all of the above with Express test drive the full version just right click at the top of Management studio to register the Express. Hope this helps.
http://www.microsoft.com/sql/downloads/trial-software.mspx
http://forums.asp.net/thread/977493.aspx
|||Hi,
Thanks for all of your suggestions, but actually I'm only trying out the Management Studio locally for now (the error appeared the first time I opened it). I think I'll try to re-install it and see if it works better...
Pettrer
|||It did! ;-)
P
Saturday, February 25, 2012
Problems with adding database samples
1> SELECT name from sys.databases
2> Go
name
--
master
tempdb
model
msdb
1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> USE [master]
2> GO
Changed database context to 'master'.
1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> select name from sys.databases
2> go
name
--
master
tempdb
model
msdb
(4 rows affected)
1>
Your create database statement is slightly wrong. If you look at the syntax it is
create database <dbname> ON (Name=<logical name for file>, filename='<filename>')
LOG ON (Name=<logical name for file>, filename='<filename>')
You have combined the logical name for file and filename and ommitted the name and filename keywords.
|||I am trying to learn SQL 2005 and I am working throught the Microsoft SQL Server 2005 Implementation and Maintenance Training Kit.
I have partitoned out my hard-drive into several partitons.
C,G,H,I,J and K.
Created Sales_Data folders in G,H,I drives
I ran the following code in MSSM Studio:
CREATE DATABASE Sales
ON
PRIMARY
(NAME = 'G:\Sales_Data\SalesPrimary.mdf'
SIZE = 50MB,
MAXSIZE = 200,
FILEGROWTH = 20),
FILEGROUP SalesFG
( NAME = SalesData1,
FILENAME = 'H:\Sales_Data\SalesData1.ndf'
SIZE = 200MB,
MAXSIZE = 800,
FILEGROWTH = 100),
( NAME = SalesData2,
FILENAME = 'H:\Sales_Data\SalesData2.ndf'
SIZE = 400MB,
MAXSIZE = 1200,
FILEGROWTH = 300),
FILEGROUP SalesHistoryFG
( NAME = SalesHistory1,
FILENAME = 'H:\Sales_Data\SalesHistory1.ndf'
SIZE = 100MB
MAXSIZE = 500,
FILEGROWTH = 50)
LOG ON
(NAME = ArchLog1,
FILENAME = 'I:\Sales_Data\SalesLog.ldf',
SIZE = 300MB,
MAXSIZE = 800,
FILEGROWTH = 100)
I am getting the following error message:
Msg 153, Level 15, State 1, Line 5
Invalid usage of the option SIZE in the CREATE/ALTER DATABASE statement.
Any idea as to why it will not except the syntax for the size option? ny help will be greatly appreciated.
|||Just do a basic check. You miss comma before SIZE option.CREATE DATABASE Sales
ON
PRIMARY
(NAME = 'G:\Sales_Data\SalesPrimary.mdf', <-Here
SIZE = 50MB,
MAXSIZE = 200,
FILEGROWTH = 20),
FILEGROUP SalesFG
( NAME = SalesData1,
FILENAME = 'H:\Sales_Data\SalesData1.ndf', <-Here
SIZE = 200MB,
MAXSIZE = 800,
FILEGROWTH = 100),
( NAME = SalesData2,
FILENAME = 'H:\Sales_Data\SalesData2.ndf', <--Here
SIZE = 400MB,
MAXSIZE = 1200,
FILEGROWTH = 300),
FILEGROUP SalesHistoryFG
( NAME = SalesHistory1,
FILENAME = 'H:\Sales_Data\SalesHistory1.ndf', <--Here
SIZE = 100MB, <--And here
MAXSIZE = 500,
FILEGROWTH = 50)
LOG ON
(NAME = ArchLog1,
FILENAME = 'I:\Sales_Data\SalesLog.ldf',
SIZE = 300MB,
MAXSIZE = 800,
FILEGROWTH = 100)
Thanks,
Zuomin
Problems with adding database samples
1> SELECT name from sys.databases
2> Go
name
--
master
tempdb
model
msdb
1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> USE [master]
2> GO
Changed database context to 'master'.
1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> select name from sys.databases
2> go
name
--
master
tempdb
model
msdb
(4 rows affected)
1>
Your create database statement is slightly wrong. If you look at the syntax it is
create database <dbname> ON (Name=<logical name for file>, filename='<filename>')
LOG ON (Name=<logical name for file>, filename='<filename>')
You have combined the logical name for file and filename and ommitted the name and filename keywords.
Monday, February 20, 2012
Problems when Oracle running on same machine
I was deploying my Report Model in Visual Studio but got an error that it couldnt connect to my Report Server while it was running.
When i typed the address of my ReportServer I got an error, then when I typed the name of the localhost got an Oracle screen. So then I decided to turn off all the Oracle things running on the machine. Then when I tried to deploy again it worked and I could go to my ReportServer without problems.
I assume you aren't trying to build a Report Model on top of Oracle, it just happens to be running. The only thing I can think is that Oracle is taking over the HTTP port configured for Reporting Services.|||I think this is the reason as well, I just wanted to point this out to other users that they should look at this when they cannot connect to their ReportServer when Oracle is running. Is there a way that I can give preference to Microsoft instead of Oracle ?|||I'm not very familiar with Oracle's HTTP stack. You don't mention which version of Oracle you are using but 10g comes with a modified version of Apache called OHS. I think there are configurations where you can tell it to listen on a port not managed by IIS.|||<a href= http://voip-forum.tmcnet.com/forum/forum_posts.asp?TID=55428&PN=1&TPN=1 >Enter here</a>