Showing posts with label moved. Show all posts
Showing posts with label moved. Show all posts

Thursday, March 29, 2012

Database moved - How to change subscriptions

I want to change a subscription that has been created by another user. I'am NOT an administrator of the server, but I've given me all Reporting-Services permissions (including systemadministrator). The logfile says that I have to be a member of the sysadmin-role to change subscriptions owned by another user.
Thanks
Benjamin

I found out, that the problem appears when I move the database from one machine to another. All works fine, but the owner of the SQL-Server-Agent Job seems to cause the problems. On the source-machine it is ASPNET and on destination-machine its SYSTEM, when I manually change it back to ASPNET I can edit/save the subscriptions.

So how do I set the owner of the SQL-Server Agent Jobs programaticly for all Jobs?
Or is my concept of moving the database via backup/restore not the best solution?

Thanks
Benjamin

|||

After you have moved the database to another machine, you could actually go ahead and just delete all the RS generated SQL Agent Jobs before you start up the report server windows service.

On startup of the RS windows service it will automatically recreate the agent jobs if they were deleted.

-- Robert

|||Restarting the Service creates the jobs, thats right, but they have still the wrong owner..
On both machines the owner is ASPNET if I create a new subscription (or look at a existing subscription on the test-server). Deleting the Agent-Job and starting the Report-Server Service creates the Agent-Jobs with System as owner!
Even on the test-machine(source) deleting the Agent-Job and restarting ReportingServices produces this error..
I've made a little stored procedure which changes the owners, after running it all works as expected..
Create PROCEDURE [dbo].[sp_AlterOwnerOfAgentJob] ( @.username nvarchar(128))
AS
BEGIN
SET NOCOUNT ON;
declare @.jobname nvarchar(128),@.servername nvarchar(128),@.UserID uniqueidentifier
DECLARE job_cursor CURSOR FOR select name from msdb.dbo.sysjobs
OPEN job_cursor
FETCH NEXT FROM job_cursor INTO @.jobname
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC msdb.dbo.sp_update_job @.job_name=@.jobname, @.owner_login_name=@.username
FETCH NEXT FROM job_cursor INTO @.jobname
END
CLOSE job_cursor
DEALLOCATE job_cursor
END
GO
exec sp_AlterOwnerOfAgentJob 'SERVERNAME\ASPNET'
GO

Is there any sp to list all jobs? That would make my sp work in further versions..
|||

Thanks for reporting this issue. We will look into this in more detail.

-- Robert

sql

Database moved - How to change subscription of another user.

I want to change a subscription that has been created by another user. I'am NOT an administrator of the server, but I've given me all Reporting-Services permissions (including systemadministrator). The logfile says that I have to be a member of the sysadmin-role to change subscriptions owned by another user.
Thanks
Benjamin

I found out, that the problem appears when I move the database from one machine to another. All works fine, but the owner of the SQL-Server-Agent Job seems to cause the problems. On the source-machine it is ASPNET and on destination-machine its SYSTEM, when I manually change it back to ASPNET I can edit/save the subscriptions.

So how do I set the owner of the SQL-Server Agent Jobs programaticly for all Jobs?
Or is my concept of moving the database via backup/restore not the best solution?

Thanks
Benjamin

|||

After you have moved the database to another machine, you could actually go ahead and just delete all the RS generated SQL Agent Jobs before you start up the report server windows service.

On startup of the RS windows service it will automatically recreate the agent jobs if they were deleted.

-- Robert

|||Restarting the Service creates the jobs, thats right, but they have still the wrong owner..
On both machines the owner is ASPNET if I create a new subscription (or look at a existing subscription on the test-server). Deleting the Agent-Job and starting the Report-Server Service creates the Agent-Jobs with System as owner!
Even on the test-machine(source) deleting the Agent-Job and restarting ReportingServices produces this error..
I've made a little stored procedure which changes the owners, after running it all works as expected..
Create PROCEDURE [dbo].[sp_AlterOwnerOfAgentJob] ( @.username nvarchar(128))
AS
BEGIN
SET NOCOUNT ON;
declare @.jobname nvarchar(128),@.servername nvarchar(128),@.UserID uniqueidentifier
DECLARE job_cursor CURSOR FOR select name from msdb.dbo.sysjobs
OPEN job_cursor
FETCH NEXT FROM job_cursor INTO @.jobname
WHILE @.@.FETCH_STATUS = 0
BEGIN
EXEC msdb.dbo.sp_update_job @.job_name=@.jobname, @.owner_login_name=@.username
FETCH NEXT FROM job_cursor INTO @.jobname
END
CLOSE job_cursor
DEALLOCATE job_cursor
END
GO
exec sp_AlterOwnerOfAgentJob 'SERVERNAME\ASPNET'
GO

Is there any sp to list all jobs? That would make my sp work in further versions..
|||

Thanks for reporting this issue. We will look into this in more detail.

-- Robert

database move help

Greetings.
My company is buying a new, more robust server for their SQL database. It's
currently running on a W2K Server and will be moved to a Win 2003 Server
with more horsepower. Can anyone tell me if this hard to do and where I
could find more "how to" info? Thx!
These should help:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scri...p?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB Wizard issues
Andrew J. Kelly SQL MVP
"Mark Adams" <MarkAdams71@.earthlink.net> wrote in message
news:OVmv59ocEHA.2504@.TK2MSFTNGP12.phx.gbl...
> Greetings.
> My company is buying a new, more robust server for their SQL database.
It's
> currently running on a W2K Server and will be moved to a Win 2003 Server
> with more horsepower. Can anyone tell me if this hard to do and where I
> could find more "how to" info? Thx!
>

database move

I recently moved a database and its transaction log file to another drive due
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts?
Robert
Hi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set on
the mdf and ldf files.
John
"Robert Gandrud" wrote:

> I recently moved a database and its transaction log file to another drive due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get an
> error that it can't.
> Any thoughts?
> Robert
|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
[vbcol=seagreen]
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
|||Hi
Check out
http://msdn.microsoft.com/library/de...r_da2_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
[vbcol=seagreen]
> In the move of this large db/log to another volume, the sql service account
> that starts mssqlserver didn't have specific rights to the new location. I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit the
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:

Database Move

Hi
I am doing a test database migration for SQL Reporting Services (leaving
the front end as it is). I have successfully moved the database using
http://support.microsoft.com/?kbid=842425 as ref guide. I have also moved
the databases that the reports uses to collect data from. I have updated
the data source icon for the reports to point to new database location.
When i want to view the reports i now get the following error:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection
Have i missed a step to get this working (there is no mention on KB842425
about security settings)?
Your help will be appreciated.
--
Regards
James[MVP for MBS Great Plains]
Visit MBS Blog Central
http://mbscentral.blogs.comDoes SQL Reporting Services Datasource support named instanced server names?
--
Regards
James[MVP]
Visit MBS Blog Central
http://mbscentral.blogs.com
"James[MVP]" <hushdontspamme@.Hotmail.com> wrote in message
news:ONGULWCRFHA.2744@.TK2MSFTNGP10.phx.gbl...
> Hi
> I am doing a test database migration for SQL Reporting Services (leaving
> the front end as it is). I have successfully moved the database using
> http://support.microsoft.com/?kbid=842425 as ref guide. I have also
> moved the databases that the reports uses to collect data from. I have
> updated the data source icon for the reports to point to new database
> location.
> When i want to view the reports i now get the following error:
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection
> Have i missed a step to get this working (there is no mention on KB842425
> about security settings)?
> Your help will be appreciated.
> --
> Regards
> James[MVP for MBS Great Plains]
> Visit MBS Blog Central
> http://mbscentral.blogs.com
>|||Yes.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsinstall/htm/gs_installingrs_v1_8k82.asp
Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"James[MVP]" <hushdontspamme@.Hotmail.com> schrieb im Newsbeitrag
news:efJ0hmCRFHA.1396@.TK2MSFTNGP10.phx.gbl...
> Does SQL Reporting Services Datasource support named instanced server
> names?
> --
> Regards
> James[MVP]
> Visit MBS Blog Central
> http://mbscentral.blogs.com
> "James[MVP]" <hushdontspamme@.Hotmail.com> wrote in message
> news:ONGULWCRFHA.2744@.TK2MSFTNGP10.phx.gbl...
>> Hi
>> I am doing a test database migration for SQL Reporting Services (leaving
>> the front end as it is). I have successfully moved the database using
>> http://support.microsoft.com/?kbid=842425 as ref guide. I have also
>> moved the databases that the reports uses to collect data from. I have
>> updated the data source icon for the reports to point to new database
>> location.
>> When i want to view the reports i now get the following error:
>> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
>> Server connection
>> Have i missed a step to get this working (there is no mention on
>> KB842425 about security settings)?
>> Your help will be appreciated.
>> --
>> Regards
>> James[MVP for MBS Great Plains]
>> Visit MBS Blog Central
>> http://mbscentral.blogs.com
>|||If SQL Server remains on a second machine, the SQL Server must handle
delegation.
http://pluralsight.com/blogs/keith/archive/2004/07/08/1586.aspx
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"James[MVP]" <hushdontspamme@.Hotmail.com> schrieb im Newsbeitrag
news:ONGULWCRFHA.2744@.TK2MSFTNGP10.phx.gbl...
> Hi
> I am doing a test database migration for SQL Reporting Services (leaving
> the front end as it is). I have successfully moved the database using
> http://support.microsoft.com/?kbid=842425 as ref guide. I have also
> moved the databases that the reports uses to collect data from. I have
> updated the data source icon for the reports to point to new database
> location.
> When i want to view the reports i now get the following error:
> Login failed for user '(null)'. Reason: Not associated with a trusted SQL
> Server connection
> Have i missed a step to get this working (there is no mention on KB842425
> about security settings)?
> Your help will be appreciated.
> --
> Regards
> James[MVP for MBS Great Plains]
> Visit MBS Blog Central
> http://mbscentral.blogs.com
>

database move

I recently moved a database and its transaction log file to another drive du
e
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts'
RobertHi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set o
n
the mdf and ldf files.
John
"Robert Gandrud" wrote:

> I recently moved a database and its transaction log file to another drive
due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get
an
> error that it can't.
> Any thoughts'
> Robert|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
[vbcol=seagreen]
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set
on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
>|||Hi
Check out
http://msdn.microsoft.com/library/d...r />
_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
[vbcol=seagreen]
> In the move of this large db/log to another volume, the sql service accoun
t
> that starts mssqlserver didn't have specific rights to the new location.
I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit t
he
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:
>sql

database move

I recently moved a database and its transaction log file to another drive due
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts'
RobertHi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set on
the mdf and ldf files.
John
"Robert Gandrud" wrote:
> I recently moved a database and its transaction log file to another drive due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get an
> error that it can't.
> Any thoughts'
> Robert|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
> > I recently moved a database and its transaction log file to another drive due
> > to space issues. I followed the kb article 224071 on how to move a user
> > database and it appears that it worked correctly.
> >
> > However, now the database comes up as "read-only" and if I view the
> > properties of the db and try to remove the "read-only" designation, I get an
> > error that it can't.
> >
> > Any thoughts'
> >
> > Robert|||Hi
Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
> In the move of this large db/log to another volume, the sql service account
> that starts mssqlserver didn't have specific rights to the new location. I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit the
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:
> > Hi Robert
> >
> > Check the SQL Server error log to see if there is any information on the
> > problem. You may also want to check that the readonly attribute is not set on
> > the mdf and ldf files.
> >
> > John
> >
> > "Robert Gandrud" wrote:
> >
> > > I recently moved a database and its transaction log file to another drive due
> > > to space issues. I followed the kb article 224071 on how to move a user
> > > database and it appears that it worked correctly.
> > >
> > > However, now the database comes up as "read-only" and if I view the
> > > properties of the db and try to remove the "read-only" designation, I get an
> > > error that it can't.
> > >
> > > Any thoughts'
> > >
> > > Robertsql