Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Monday, March 26, 2012

Fill() problem in VS .NET 2003 in Windows application C# with SQL Server

I starting to use Visual Studio .NET 2003 creating C# Windows application
with SQL Server and I get problem with method Fill() for which when
running ends with System Error even with the most simple cases which I
copied from a tutorial. everything else works right for ex Preview Data
except for example sqlDataAdapter1.Fill(ds1).
Is it a bug or some other kind of error. What should I do?
Dalius
Fill() problem in VS .NET 2003 in Windows application C# with SQL ServerI get :
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
"Auto" <dalius@.autocentras.com> wrote in message
news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> I starting to use Visual Studio .NET 2003 creating C# Windows application
> with SQL Server and I get problem with method Fill() for which when
> running ends with System Error even with the most simple cases which I
> copied from a tutorial. everything else works right for ex Preview Data
> except for example sqlDataAdapter1.Fill(ds1).
> Is it a bug or some other kind of error. What should I do?
> Dalius
> Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
>
>|||Post your code... The fill method does work, so I suspect you are doing
something funny... It might be a better place to post it in the dot net
groups, but Either place will do.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> > I starting to use Visual Studio .NET 2003 creating C# Windows
application
> > with SQL Server and I get problem with method Fill() for which
when
> > running ends with System Error even with the most simple cases which I
> > copied from a tutorial. everything else works right for ex Preview
Data
> > except for example sqlDataAdapter1.Fill(ds1).
> >
> > Is it a bug or some other kind of error. What should I do?
> >
> > Dalius
> >
> > Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
> >
> >
> >
>|||Try executing the statement in a try/catch block so that you can get more
detailed info on the error:
try
{
Fill();
}
catch ( SqlException ex )
{
MessageBox.Show(ex.ToString());
}
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'
occurred
> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
> > I starting to use Visual Studio .NET 2003 creating C# Windows
application
> > with SQL Server and I get problem with method Fill() for which
when
> > running ends with System Error even with the most simple cases which I
> > copied from a tutorial. everything else works right for ex Preview
Data
> > except for example sqlDataAdapter1.Fill(ds1).
> >
> > Is it a bug or some other kind of error. What should I do?
> >
> > Dalius
> >
> > Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
> >
> >
> >
>sql

Fill() problem in VS .NET 2003 in Windows application C# with SQL Server

I starting to use Visual Studio .NET 2003 creating C# Windows application
with SQL Server and I get problem with method Fill() for which when
running ends with System Error even with the most simple cases which I
copied from a tutorial. everything else works right for ex Preview Data
except for example sqlDataAdapter1.Fill(ds1).
Is it a bug or some other kind of error. What should I do?
Dalius
Fill() problem in VS .NET 2003 in Windows application C# with SQL ServerI get :
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred
in system.data.dll
Additional information: System error.
"Auto" <dalius@.autocentras.com> wrote in message
news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
quote:

> I starting to use Visual Studio .NET 2003 creating C# Windows application
> with SQL Server and I get problem with method Fill() for which when
> running ends with System Error even with the most simple cases which I
> copied from a tutorial. everything else works right for ex Preview Data
> except for example sqlDataAdapter1.Fill(ds1).
> Is it a bug or some other kind of error. What should I do?
> Dalius
> Fill() problem in VS .NET 2003 in Windows application C# with SQL Server
>
>
|||Post your code... The fill method does work, so I suspect you are doing
something funny... It might be a better place to post it in the dot net
groups, but Either place will do.
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
quote:

> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'

occurred
quote:

> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
application[QUOTE]
when[QUOTE]
Data[QUOTE]
>
|||Try executing the statement in a try/catch block so that you can get more
detailed info on the error:
try
{
Fill();
}
catch ( SqlException ex )
{
MessageBox.Show(ex.ToString());
}
Hope this helps.
Dan Guzman
SQL Server MVP
"Auto" <dalius@.autocentras.com> wrote in message
news:uciFeVa2DHA.3224@.tk2msftngp13.phx.gbl...
quote:

> I get :
> An unhandled exception of type 'System.Data.SqlClient.SqlException'

occurred
quote:

> in system.data.dll
> Additional information: System error.
>
> "Auto" <dalius@.autocentras.com> wrote in message
> news:uvWhT6X2DHA.1704@.tk2msftngp13.phx.gbl...
application[QUOTE]
when[QUOTE]
Data[QUOTE]
>

Friday, March 23, 2012

FileSystemTask->Size limitation?

I am using FileSystemTask to copy around 4 gb file(ASCII). Is there any limitation on the file size.

SQL Server 2005 SP2, Windows 2003 server. Copying from one Windows 2K server to other Windows 2K server.

Thank you,

As far as I know, there is no limitation. Are you getting any error?

|||We are copying files much larger than this. What error are you getting? could it be that you have run out of space on the destination?|||

Currently I am not getting any error messages.

Same file copy operation is not working fine right now in DTS package. So we decided to move this part of the flow to SSIS.

I was making sure any known size limitation if at all in SSIS.

Thank you all for your answers.

fileshare subscription erro

My report subscription got the following error. Before the subscription was
run, I changed the Reporting Service's Windows Service logon account from
local system account to a local user with adm rights.
I'm using developer editions for sql server and reporting service, running
everything from one single development machine of XP Pro.
I'd appreciate any help.
jf
************ log info *********************************
ReportingServicesService!crypto!1600!01/11/2005-17:27:03:: e ERROR:
DBUnProtectData failed: System.Runtime.InteropServices.COMException
(0x80090005): Bad Data.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
errorCode, IntPtr errorInfo)
at RSManagedCrypto.RSCrypto.DecryptData(Byte[] pCipherText)
at
Microsoft.ReportingServices.Diagnostics.DataProtection.DBUnprotectData(String
data)
ReportingServicesService!crypto!1600!01/11/2005-17:27:03:: i INFO: Current
user: jf\john
ReportingServicesService!notification!1600!01/11/2005-17:27:03:: e ERROR:
Error occured processing notification. Bad Data.
ReportingServicesService!notification!1600!01/11/2005-17:27:03::
Notification 882b52f3-40de-486e-a7ef-4e72e6efd6ea completed. Success: True,
Status: Bad Data., DeliveryExtension: Report Server FileShare, Report:
NWCustomers, Attempt 0
ReportingServicesService!dbpolling!1600!01/11/2005-17:27:03::
NotificationPolling finished processing item
882b52f3-40de-486e-a7ef-4e72e6efd6ea
***************** end of log info ***************************Hi, you can see the documentation (BOL) of reporting services about change
the account using rsconfig.exe
The problem is that the new user would be changed in the RSCONFIG file, but
trougth rsconfig.exe not over file directly
this is the command
RSConfig -c -s Server name -d Reporting Services database name -a
Sql|Windows -u User name -p User password
Best Regards
John Bocachica
Colombia
"John Fant" <JohnFant@.discussions.microsoft.com> wrote in message
news:3CE5CAEF-7553-457A-B072-70BA04EF84B2@.microsoft.com...
> My report subscription got the following error. Before the subscription
> was
> run, I changed the Reporting Service's Windows Service logon account from
> local system account to a local user with adm rights.
> I'm using developer editions for sql server and reporting service, running
> everything from one single development machine of XP Pro.
> I'd appreciate any help.
> jf
> ************ log info *********************************
> ReportingServicesService!crypto!1600!01/11/2005-17:27:03:: e ERROR:
> DBUnProtectData failed: System.Runtime.InteropServices.COMException
> (0x80090005): Bad Data.
> at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32
> errorCode, IntPtr errorInfo)
> at RSManagedCrypto.RSCrypto.DecryptData(Byte[] pCipherText)
> at
> Microsoft.ReportingServices.Diagnostics.DataProtection.DBUnprotectData(String
> data)
> ReportingServicesService!crypto!1600!01/11/2005-17:27:03:: i INFO: Current
> user: jf\john
> ReportingServicesService!notification!1600!01/11/2005-17:27:03:: e ERROR:
> Error occured processing notification. Bad Data.
> ReportingServicesService!notification!1600!01/11/2005-17:27:03::
> Notification 882b52f3-40de-486e-a7ef-4e72e6efd6ea completed. Success:
> True,
> Status: Bad Data., DeliveryExtension: Report Server FileShare, Report:
> NWCustomers, Attempt 0
> ReportingServicesService!dbpolling!1600!01/11/2005-17:27:03::
> NotificationPolling finished processing item
> 882b52f3-40de-486e-a7ef-4e72e6efd6ea
> ***************** end of log info ***************************

Friday, March 9, 2012

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.

file will not attach to SQL reason file is not primary file

I have a customer they are running raid 5 on a windows 2000 server one of the drives went bad. The customer replaced the drive and raid rebuilt the drive, every thing seamed to be fine but there is one database file that cannot be attached to SQL. The file is 15G so I know there is information the error states that the file is not a Primary file. Any clue on how to fix this?

mdf file size 5,738,944 KB

ldf file size 10,176 KB

You need the primary file to attach this. I guess your last resort will be your backups|||There's another file out there somewhere - probably another mdf. Make sure you've got them all and the attach should work.|||Thanks the file looks to be corupted. the customer did not run any backup so I guess the information is lost. thanks again for your help.

Sunday, February 26, 2012

File Share Delivery of subscription fails

I have a subscription that will not deliver to a file share. I've ensured
that the windows acct for share access for the subscription has read/write to
the share.
The error I get in report manager is:
Failure writing file <report name>: The Report Server has encountered a
configuration error; more details in the log files
The log file says:
ReportingServicesService!library!10ec!08/08/2005-12:26:05:: i INFO: Call to
RenderFirst( '/My Reports/<report name>)
ReportingServicesService!library!10ec!08/08/2005-12:26:06:: e ERROR:
Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files, AuthzInitializeContextFromSid: Win32 error: 234;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
ReportingServicesService!library!10ec!08/08/2005-12:26:06:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!subscription!10ec!08/08/2005-12:26:06::
Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The Report
Server has encountered a configuration error; more details in the log files
-->
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
at
Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
userName)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
userName, IntPtr userToken)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
catItemType, Byte[] secDesc, ReportOperation rptOper)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
executionOption, String& savedParametersXml, ReportSnapshot&
compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
historyDate)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
report, String historyID, Boolean forRendering, NameValueCollection values,
DatasourceCredentialsCollection credentials)
at
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String
renderFormat, String deviceInfo)
at
Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData data)
at
Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)
Any ideas?
TIA,
Berry Morgan
JSOAre the user who created the report subscription and the ReportServer in the
same domain (actually the ReportServerService service account). We have seen
this issue in our DEV + QA environments which are in different domains that
are not trusted by our prod domain (but do trust it). We have configured all
our Report Servers to run under prod domain service accounts to get around
this issue (because when testing subscriptions, developers will still be
using their prod accounts and it seems that it is the subscription owner
account that was failing to be resolved)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Berry at JSO" <6399bwmNOSPAM@.community.nospam> wrote in message
news:D735DEE3-F3E8-4250-9AAA-396D1B3742B2@.microsoft.com...
>I have a subscription that will not deliver to a file share. I've ensured
> that the windows acct for share access for the subscription has read/write
> to
> the share.
> The error I get in report manager is:
> Failure writing file <report name>: The Report Server has encountered a
> configuration error; more details in the log files
>
> The log file says:
> ReportingServicesService!library!10ec!08/08/2005-12:26:05:: i INFO: Call
> to
> RenderFirst( '/My Reports/<report name>)
> ReportingServicesService!library!10ec!08/08/2005-12:26:06:: e ERROR:
> Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files, AuthzInitializeContextFromSid: Win32 error: 234;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files
> ReportingServicesService!library!10ec!08/08/2005-12:26:06:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
> system
> properties.
> ReportingServicesService!subscription!10ec!08/08/2005-12:26:06::
> Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The Report
> Server has encountered a configuration error; more details in the log
> files
> -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files
> at
> Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr
> userSid)
> at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
> userName)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
> userName, IntPtr userToken)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
> userName, IntPtr userToken, Byte[] secDesc, ReportOperation
> requiredOperation)
> at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
> catItemType, Byte[] secDesc, ReportOperation rptOper)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
> reportContext, String historyID, Boolean forRendering, Guid& reportID,
> Int32&
> executionOption, String& savedParametersXml, ReportSnapshot&
> compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
> historyDate)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
> report, String historyID, Boolean forRendering, NameValueCollection
> values,
> DatasourceCredentialsCollection credentials)
> at
> Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters)
> at
> Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters, String[]&
> secondaryStreamNames)
> at
> Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> -- End of inner exception stack trace --
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> at
> Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
> rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
> type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
> String[]& secondaryStreamNames)
> at Microsoft.ReportingServices.Library.ReportImpl.Render(String
> renderFormat, String deviceInfo)
> at
> Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification
> notification, SubscriptionData data)
> at
> Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification
> notification)
>
> Any ideas?
> TIA,
> Berry Morgan
> JSO|||The subscription creator is a production domain account, but the
ReportServer service identity is NT AUTHORITY\Network Service.
If I change the ReportServer service identity to a domain account, won't
that require reactivation of the reporting server?
Also, email subscriptions currently work: wouldn't changing the service
identity require configuration changes for this subscription type as well?
My hunch is that subscription delivery to file shares is tied in with code
access security settings, but I'm not the MVP. :)
-Berry
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ewEcpyGnFHA.3304@.tk2msftngp13.phx.gbl...
> Are the user who created the report subscription and the ReportServer in
> the same domain (actually the ReportServerService service account). We
> have seen this issue in our DEV + QA environments which are in different
> domains that are not trusted by our prod domain (but do trust it). We have
> configured all our Report Servers to run under prod domain service
> accounts to get around this issue (because when testing subscriptions,
> developers will still be using their prod accounts and it seems that it is
> the subscription owner account that was failing to be resolved)
>|||Our issue was purely domain related however what I would suggest is that you
contact PSS. They'll be able to provide you with a utility that should help
pinpoint the issue. This is a common problem (the error message you are
seeing) and it's all related to being able to query AD and permissions
related to that (rather than specifically anything SQL related). PSS will be
able to help you track down the specific issue in your environment. Email
subscriptions don't suffer the same issue as far as I'm aware (we haven't
seen it but that doesn't mean it doesn't exist<g>)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Berry Morgan" <6399bwmNOSPAM@.community.nospam> wrote in message
news:uwK78DTnFHA.1372@.TK2MSFTNGP10.phx.gbl...
> The subscription creator is a production domain account, but the
> ReportServer service identity is NT AUTHORITY\Network Service.
> If I change the ReportServer service identity to a domain account, won't
> that require reactivation of the reporting server?
> Also, email subscriptions currently work: wouldn't changing the service
> identity require configuration changes for this subscription type as well?
> My hunch is that subscription delivery to file shares is tied in with code
> access security settings, but I'm not the MVP. :)
> -Berry
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ewEcpyGnFHA.3304@.tk2msftngp13.phx.gbl...
>> Are the user who created the report subscription and the ReportServer in
>> the same domain (actually the ReportServerService service account). We
>> have seen this issue in our DEV + QA environments which are in different
>> domains that are not trusted by our prod domain (but do trust it). We
>> have configured all our Report Servers to run under prod domain service
>> accounts to get around this issue (because when testing subscriptions,
>> developers will still be using their prod accounts and it seems that it
>> is the subscription owner account that was failing to be resolved)
>

Friday, February 24, 2012

File Ownership failing for Domain Accounts

I am having a consistent problem on several instances of SQL 2005 setting
the ownership of database files to a windows user. This is not a login
problem but a file ownership problem. Here are the steps:
1. Right-click on any user database, e.g. AdventureWorks and select
"Properties
2. Select the "Files" page from the right-hand list
3. Click the elipsis "..." button to the far right of the "Owner:" label
4. Click the "Browse..." button in the pop-up "Select Database Owner" window
5. Select any login that maps to a windows or domain account except for
members of the [NT AUTHORITY] group, e.g. [COMPANYDOMAIN\MyName]
6. Click "OK" on the Browse pop-up and then on the Select Database Owner
pop-up
7. Click "OK" on the "Database Properties" dialog to return to the main SQL
Server Management Studio application
8. Repeat steps 1 & 2
9. Notice that the "Owner:" field is now blank
This problem is occuring on multiple instances of SQL Server 2005 at both
SP1 and SP2 patch levels. All of the instances are set to mixed security
mode. All of the windows accounts I have tried are in the local server's
Adminstrators group. Setting ownership to a pure SQL account or a member of
the local [NT AUTHORITY] group works just fine. I have even attempted to
set
the permissions manually using ALTER AUTHORIZATION and the sp_changedbowner
proc. Nothing seems to work and I never get an error message or log.The procedure you describe changes the database owner and is unrelated to
file ownership. IMHO, the functionality is misplaced in the SSMS GUI; it
should be under the 'general' instead of 'files'.
I can't seem to reproduce the problem under SP2. Have you tried closing and
re-opening the object explorer? Is the correct owner reported using the
methods below?
EXEC sp_helpdb
SELECT
name AS database_name,
SUSER_SNAME(owner_sid) AS database_owner
FROM sys.databases
Hope this helps.
Dan Guzman
SQL Server MVP
"Kevin D. White" <kevinDwhite@.newsgroup.nospam> wrote in message
news:ekLZFoAaHHA.2316@.TK2MSFTNGP04.phx.gbl...
>I am having a consistent problem on several instances of SQL 2005 setting
>the ownership of database files to a windows user. This is not a login
>problem but a file ownership problem. Here are the steps:
> 1. Right-click on any user database, e.g. AdventureWorks and select
> "Properties
> 2. Select the "Files" page from the right-hand list
> 3. Click the elipsis "..." button to the far right of the "Owner:" label
> 4. Click the "Browse..." button in the pop-up "Select Database Owner"
> window
> 5. Select any login that maps to a windows or domain account except for
> members of the [NT AUTHORITY] group, e.g. [COMPANYDOMAIN\MyName]
> 6. Click "OK" on the Browse pop-up and then on the Select Database Owner
> pop-up
> 7. Click "OK" on the "Database Properties" dialog to return to the main
> SQL Server Management Studio application
> 8. Repeat steps 1 & 2
> 9. Notice that the "Owner:" field is now blank
> This problem is occuring on multiple instances of SQL Server 2005 at both
> SP1 and SP2 patch levels. All of the instances are set to mixed security
> mode. All of the windows accounts I have tried are in the local server's
> Adminstrators group. Setting ownership to a pure SQL account or a member
> of the local [NT AUTHORITY] group works just fine. I have even attempt
ed
> to set the permissions manually using ALTER AUTHORIZATION and the
> sp_changedbowner proc. Nothing seems to work and I never get an error
> message or log.
>|||Kevin
I'm also could not reproduce the problerm under SP'a'.
Have you tried Dan's suggestions?
"Kevin D. White" <kevinDwhite@.newsgroup.nospam> wrote in message
news:ekLZFoAaHHA.2316@.TK2MSFTNGP04.phx.gbl...
>I am having a consistent problem on several instances of SQL 2005 setting
>the ownership of database files to a windows user. This is not a login
>problem but a file ownership problem. Here are the steps:
> 1. Right-click on any user database, e.g. AdventureWorks and select
> "Properties
> 2. Select the "Files" page from the right-hand list
> 3. Click the elipsis "..." button to the far right of the "Owner:" label
> 4. Click the "Browse..." button in the pop-up "Select Database Owner"
> window
> 5. Select any login that maps to a windows or domain account except for
> members of the [NT AUTHORITY] group, e.g. [COMPANYDOMAIN\MyName]
> 6. Click "OK" on the Browse pop-up and then on the Select Database Owner
> pop-up
> 7. Click "OK" on the "Database Properties" dialog to return to the main
> SQL Server Management Studio application
> 8. Repeat steps 1 & 2
> 9. Notice that the "Owner:" field is now blank
> This problem is occuring on multiple instances of SQL Server 2005 at both
> SP1 and SP2 patch levels. All of the instances are set to mixed security
> mode. All of the windows accounts I have tried are in the local server's
> Adminstrators group. Setting ownership to a pure SQL account or a member
> of the local [NT AUTHORITY] group works just fine. I have even attempt
ed
> to set the permissions manually using ALTER AUTHORIZATION and the
> sp_changedbowner proc. Nothing seems to work and I never get an error
> message or log.
>|||Thanks for the helpful suggestion. The SQL you provided does return the
values I expect after changing ownership through the "Files" page in the
database properties dialog. How strange it is then that the Owner field
remains empty even after closing and reopening SQL Management Studio. Also,
I am unable to install diagram support. Any attempt to create a diagram
yields the all too common and annoying "...this database does not have a
valid owner..." error message.
Any idea why one method of discovering ownership returns the correct value
but another method does not? This is very bizarre.
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:9074E028-7EAE-4012-B0B5-F24DC8F67206@.microsoft.com...
> The procedure you describe changes the database owner and is unrelated to
> file ownership. IMHO, the functionality is misplaced in the SSMS GUI; it
> should be under the 'general' instead of 'files'.
> I can't seem to reproduce the problem under SP2. Have you tried closing
> and re-opening the object explorer? Is the correct owner reported using
> the methods below?
> EXEC sp_helpdb
> SELECT
> name AS database_name,
> SUSER_SNAME(owner_sid) AS database_owner
> FROM sys.databases
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Kevin D. White" <kevinDwhite@.newsgroup.nospam> wrote in message
> news:ekLZFoAaHHA.2316@.TK2MSFTNGP04.phx.gbl...
>|||I think I found the root cause of the problem. It looks like the admin has
setup just about every instance of SQL Server I can access to start under a
local machine account. This is preventing lookups against Active Directory.
"Kevin D. White" <kevinDwhite@.newsgroup.nospam> wrote in message
news:ekLZFoAaHHA.2316@.TK2MSFTNGP04.phx.gbl...
>I am having a consistent problem on several instances of SQL 2005 setting
>the ownership of database files to a windows user. This is not a login
>problem but a file ownership problem. Here are the steps:
> 1. Right-click on any user database, e.g. AdventureWorks and select
> "Properties
> 2. Select the "Files" page from the right-hand list
> 3. Click the elipsis "..." button to the far right of the "Owner:" label
> 4. Click the "Browse..." button in the pop-up "Select Database Owner"
> window
> 5. Select any login that maps to a windows or domain account except for
> members of the [NT AUTHORITY] group, e.g. [COMPANYDOMAIN\MyName]
> 6. Click "OK" on the Browse pop-up and then on the Select Database Owner
> pop-up
> 7. Click "OK" on the "Database Properties" dialog to return to the main
> SQL Server Management Studio application
> 8. Repeat steps 1 & 2
> 9. Notice that the "Owner:" field is now blank
> This problem is occuring on multiple instances of SQL Server 2005 at both
> SP1 and SP2 patch levels. All of the instances are set to mixed security
> mode. All of the windows accounts I have tried are in the local server's
> Adminstrators group. Setting ownership to a pure SQL account or a member
> of the local [NT AUTHORITY] group works just fine. I have even attempt
ed
> to set the permissions manually using ALTER AUTHORIZATION and the
> sp_changedbowner proc. Nothing seems to work and I never get an error
> message or log.
>|||Hello Kevin,
Thank you for sharing your experience on resolving the issue. It shall
benefit the community.
Also, I have forwarded this issue to the product team and they may want to
check if this behavior is normal or there is any further improment in UI so
that users may get more hint on this kind of problems.
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Good to hear. The thing that *really* tripped me up is the fact the applying
ownership to a domain account through the UI never returned an error or
warning. Combine the lack of an error with the frankly misleading error
message when I attempt to create a diagram and the whole thing becomes this
vicious circle. The diagram support error tells me to set a valid owner, I
go and set what appears to be a valid owner, diagram support returns the
same message..etc.
"Peter Yang [MSFT]" <petery@.online.microsoft.com> wrote in message
news:45EqxuraHHA.4088@.TK2MSFTNGHUB02.phx.gbl...
> Hello Kevin,
> Thank you for sharing your experience on resolving the issue. It shall
> benefit the community.
> Also, I have forwarded this issue to the product team and they may want to
> check if this behavior is normal or there is any further improment in UI
> so
> that users may get more hint on this kind of problems.
> Best Regards,
> Peter Yang
> MCSE2000/2003, MCSA, MCDBA
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hello Kevin,
Thank you for your additional feedback and please rest this has also been
forwarded to the right channel. Your feedback is always valuable for our
product improvement!
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.