Sunday, March 25, 2012
Can not create objects in master
I'm trying to create a sp in the database master, but I
cann't, I got an error message
Server: Msg 2714, Level 16, State 5, Procedure Sp_Backup,
Line 41
There is already an object named 'Sp_Backup' in the
database.
but I login as sa user and I got the same error.
could somebody help me, please? I think is a configuration
parameter.
Thanks in advance,
Javier RosasHello Javier !
The error say itself that there is alwasy a SP named SP_BACKUP in there.
Just try this to find whos owning the sp:
USE MASTER
SELECT SO.name, SU.Name
FROM sysobjects SO INNER JOIN
sysusers SU ON SO.UID = SU.UID
WHERE SO.name = 'SP_BACKUP'
THEN CHECK you is logged on:
SELECT USER_NAME()
If they are both identical (Owner and LoggedON Persons), you have to drop
the SP first
or create it for antoher user
CREATE PROCEDURE OWNER.SP_NAME
HTH, Jens Süßmeyer.|||No, the problem is that the object doesn't exist!!!
I can change the name, but the problem is the same, in fact, if I were creating a table (or another object) I got the same mistake!!
Thanks.
>--Original Message--
>Hello Javier !
>The error say itself that there is alwasy a SP named SP_BACKUP in there.
>Just try this to find whos owning the sp:
>USE MASTER
>SELECT SO.name, SU.Name
>FROM sysobjects SO INNER JOIN
> sysusers SU ON SO.UID =3D SU.UID
>WHERE SO.name =3D 'SP_BACKUP'
>THEN CHECK you is logged on:
>SELECT USER_NAME()
>If they are both identical (Owner and LoggedON Persons), you have to drop
>the SP first
>or create it for antoher user
>CREATE PROCEDURE OWNER.SP_NAME
>HTH, Jens S=FC=DFmeyer.
>
>.
>|||It seems there is an issue with your stored procedure create script.
Note that the error message is referring to line 41. However, without
the script source, it's difficult to determine the exact cause of the
error.
Also, user stored procedures should not be prefixed with ''sp_' and it's
not a good practice to create user objects in the master database.
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"Javier Rosas" <jrosashe@.accival.com.mx> wrote in message
news:003701c36fe8$764bf0d0$a501280a@.phx.gbl...
> Hi,
> I'm trying to create a sp in the database master, but I
> cann't, I got an error message
> Server: Msg 2714, Level 16, State 5, Procedure Sp_Backup,
> Line 41
> There is already an object named 'Sp_Backup' in the
> database.
> but I login as sa user and I got the same error.
> could somebody help me, please? I think is a configuration
> parameter.
> Thanks in advance,
> Javier Rosas
Friday, February 24, 2012
Can I specify SubReport name at runtime?
I want to combine a bunch of reports (which are stand alone reports on there own) as subreports in a parent or master report. We have done this in Crystal Reprots in order to get a group of reports out in one file.
The issue with Reporting Services is the header and footers of the subreports are not rendered, so I have to repeat the logo information for each subreport in the body of the parent report. I can do this in a table or list or rectangle, but I have to do this for each subreport. Is there any way that I can specify the name of the subreport at runtime? That way I can put everything into a List and drive it from the database. I noticed that the dropdown to select the report name does not allow you to create an expression for this field.
Hi ChapsI am also attempting to change a SubReport at runtime.
Could you advise if this is possible ? and possibly some sample code.
Regards
JohnJames|||
hey,
I haven't looked at this for a while...... I built a small report to refresh my memory.
I do not think you can do this - you are basically trying to change the report definition at runtime and you can't because it tries to run the report while you are changing it - kind of a chicken-and-the-egg thing.
In my sample I used a server side report - you may be able to do this if it were a local report where you can get the definition (rdl), change the report name in your code, then run the report. This won't help if you are trying to change the report based on data or flags you pass in.
If you are trying to set the subreport name from a database or parameters, you could put all subreports in and hide/show them based on the input parameters/data. This may cause side affects as you can't disable them so all subreports may run anyways (it's been a while - not sure if they run if they are hidden?) and they will still consume some space in the main report unless you put them in a table row or another control that you can hide or show as well....
sorry I couldn't have helped
ESTUMP
|||Thanks for your reply ESTUMPAs you suggest I found that hiding/displaying subreports is a possible solution.
Although rather clunky.
JohnJames
Can I specify SubReport name at runtime?
I want to combine a bunch of reports (which are stand alone reports on there own) as subreports in a parent or master report. We have done this in Crystal Reprots in order to get a group of reports out in one file.
The issue with Reporting Services is the header and footers of the subreports are not rendered, so I have to repeat the logo information for each subreport in the body of the parent report. I can do this in a table or list or rectangle, but I have to do this for each subreport. Is there any way that I can specify the name of the subreport at runtime? That way I can put everything into a List and drive it from the database. I noticed that the dropdown to select the report name does not allow you to create an expression for this field.
Hi ChapsI am also attempting to change a SubReport at runtime.
Could you advise if this is possible ? and possibly some sample code.
Regards
JohnJames|||
hey,
I haven't looked at this for a while...... I built a small report to refresh my memory.
I do not think you can do this - you are basically trying to change the report definition at runtime and you can't because it tries to run the report while you are changing it - kind of a chicken-and-the-egg thing.
In my sample I used a server side report - you may be able to do this if it were a local report where you can get the definition (rdl), change the report name in your code, then run the report. This won't help if you are trying to change the report based on data or flags you pass in.
If you are trying to set the subreport name from a database or parameters, you could put all subreports in and hide/show them based on the input parameters/data. This may cause side affects as you can't disable them so all subreports may run anyways (it's been a while - not sure if they run if they are hidden?) and they will still consume some space in the main report unless you put them in a table row or another control that you can hide or show as well....
sorry I couldn't have helped
ESTUMP
|||Thanks for your reply ESTUMPAs you suggest I found that hiding/displaying subreports is a possible solution.
Although rather clunky.
JohnJames
Sunday, February 19, 2012
Can I setup a Global Public View in SQL Server ?
Is it possible to create such a view ?
Thanks
Yes you can do it:
Create view my_view
as
select *
from
database1.schema3.table3
join database2.schema5.table6 on ....
union database3.schema5.table8
Keep in mind that if you are going to grant select privileges on this view to a specific user/role, you must grant same privileges on all underlyeing tables.
To make things simpler you can also create synonyms to that tables, like in Oracle, but you have to qualify whem with database names.
|||Thanks !And this view can reside in any of the DBs, isn't it ?|||Yes, it can reside on any USER db, don't place it in master, tempdb, etc.
Thursday, February 16, 2012
Can I restore Master using SQL LiteSpeed?
manager because the master.bak file was generated using litespeed. Any Ideas?
Thank you.
Message posted via http://www.sqlmonster.com
Hi,
I believe there is a free LiteSpeed utility that will convert your backup
file to a standard Microsoft SQL backup file. You might be able to
successfully use this.
Joe
"Chris via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:d7a80756b65e4506b6d7d770a49f69cb@.SQLMonster.c om...
> I'm trying to restore master using a backup that was created using SQL
> Lightspeed. The server will start in single user mode but when I try to
> restore master I get a login failure. I receive this using query
> analyzer. I can not restore using enterprise manager because the
> master.bak file was generated using litespeed. Any Ideas?
> Thank you.
> --
> Message posted via http://www.sqlmonster.com
|||Chris via SQLMonster.com wrote:
> I'm trying to restore master using a backup that was created using
> SQL Lightspeed. The server will start in single user mode but when I
> try to restore master I get a login failure. I receive this using
> query analyzer. I can not restore using enterprise manager because
> the master.bak file was generated using litespeed. Any Ideas?
> Thank you.
Please contact our support department for help on this issue:
https://www.imceda.com/support.asp
David Gugick
Imceda Software
www.imceda.com
Can I restore Master using SQL LiteSpeed?
speed. The server will start in single user mode but when I try to restore
master I get a login failure. I receive this using query analyzer. I can n
ot restore using enterprise
manager because the master.bak file was generated using litespeed. Any Idea
s?
Thank you.
Message posted via http://www.droptable.comHi,
I believe there is a free LiteSpeed utility that will convert your backup
file to a standard Microsoft SQL backup file. You might be able to
successfully use this.
Joe
"Chris via droptable.com" <forum@.droptable.com> wrote in message
news:d7a80756b65e4506b6d7d770a49f69cb@.SQ
droptable.com...
> I'm trying to restore master using a backup that was created using SQL
> Lightspeed. The server will start in single user mode but when I try to
> restore master I get a login failure. I receive this using query
> analyzer. I can not restore using enterprise manager because the
> master.bak file was generated using litespeed. Any Ideas?
> Thank you.
> --
> Message posted via http://www.droptable.com|||Chris via droptable.com wrote:
> I'm trying to restore master using a backup that was created using
> SQL Lightspeed. The server will start in single user mode but when I
> try to restore master I get a login failure. I receive this using
> query analyzer. I can not restore using enterprise manager because
> the master.bak file was generated using litespeed. Any Ideas?
> Thank you.
Please contact our support department for help on this issue:
https://www.imceda.com/support.asp
David Gugick
Imceda Software
www.imceda.com
Can I restore Master using SQL LiteSpeed?
Thank you.
--
Message posted via http://www.sqlmonster.comHi,
I believe there is a free LiteSpeed utility that will convert your backup
file to a standard Microsoft SQL backup file. You might be able to
successfully use this.
Joe
"Chris via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:d7a80756b65e4506b6d7d770a49f69cb@.SQLMonster.com...
> I'm trying to restore master using a backup that was created using SQL
> Lightspeed. The server will start in single user mode but when I try to
> restore master I get a login failure. I receive this using query
> analyzer. I can not restore using enterprise manager because the
> master.bak file was generated using litespeed. Any Ideas?
> Thank you.
> --
> Message posted via http://www.sqlmonster.com|||Chris via SQLMonster.com wrote:
> I'm trying to restore master using a backup that was created using
> SQL Lightspeed. The server will start in single user mode but when I
> try to restore master I get a login failure. I receive this using
> query analyzer. I can not restore using enterprise manager because
> the master.bak file was generated using litespeed. Any Ideas?
> Thank you.
Please contact our support department for help on this issue:
https://www.imceda.com/support.asp
David Gugick
Imceda Software
www.imceda.com
Sunday, February 12, 2012
Can I move SQL Server to a new machine (including master/model/msd
We are moving a SQLServer environment from one machine to another. (SQL2000
sp3a)
Can I
- Install SQLServer on the new machine
- backup all databases including master, model , msdb + all user databases
on the source machine
- restore all databases (including mast , model, msdb + user databases) on
the destination machine
and expect SQL server to work as it did on my source machine? (Note in my
case the instance name will be different on the destination machine since the
instance name was the same as the machine name in the orig source :
npboffsql2\npboffsql2
Or do I need to follow article 314546 (i.e. only move user databases and
rebuild the missing logins etc?)
Tia,
Flora
Hi Flora
You could follow http://support.microsoft.com/kb/224071/
If you wish to rename the server itself then you can follow
http://support.microsoft.com/default...b;en-us;303774
John
"Flora Seymour" wrote:
> Hi
> We are moving a SQLServer environment from one machine to another. (SQL2000
> sp3a)
> Can I
> - Install SQLServer on the new machine
> - backup all databases including master, model , msdb + all user databases
> on the source machine
> - restore all databases (including mast , model, msdb + user databases) on
> the destination machine
> and expect SQL server to work as it did on my source machine? (Note in my
> case the instance name will be different on the destination machine since the
> instance name was the same as the machine name in the orig source :
> npboffsql2\npboffsql2
> Or do I need to follow article 314546 (i.e. only move user databases and
> rebuild the missing logins etc?)
> Tia,
> Flora
Can I move SQL Server to a new machine (including master/model/msd
We are moving a SQLServer environment from one machine to another. (SQL2000
sp3a)
Can I
- Install SQLServer on the new machine
- backup all databases including master, model , msdb + all user databases
on the source machine
- restore all databases (including mast , model, msdb + user databases) on
the destination machine
and expect SQL server to work as it did on my source machine? (Note in my
case the instance name will be different on the destination machine since the
instance name was the same as the machine name in the orig source :
npboffsql2\npboffsql2
Or do I need to follow article 314546 (i.e. only move user databases and
rebuild the missing logins etc?)
Tia,
FloraHi Flora
You could follow http://support.microsoft.com/kb/224071/
If you wish to rename the server itself then you can follow
http://support.microsoft.com/default.aspx?scid=kb;en-us;303774
John
"Flora Seymour" wrote:
> Hi
> We are moving a SQLServer environment from one machine to another. (SQL2000
> sp3a)
> Can I
> - Install SQLServer on the new machine
> - backup all databases including master, model , msdb + all user databases
> on the source machine
> - restore all databases (including mast , model, msdb + user databases) on
> the destination machine
> and expect SQL server to work as it did on my source machine? (Note in my
> case the instance name will be different on the destination machine since the
> instance name was the same as the machine name in the orig source :
> npboffsql2\npboffsql2
> Or do I need to follow article 314546 (i.e. only move user databases and
> rebuild the missing logins etc?)
> Tia,
> Flora|||Thanks John! Thats exactly what I am looking for!
--
Flora
"John Bell" wrote:
> Hi Flora
> You could follow http://support.microsoft.com/kb/224071/
> If you wish to rename the server itself then you can follow
> http://support.microsoft.com/default.aspx?scid=kb;en-us;303774
> John
> "Flora Seymour" wrote:
> > Hi
> >
> > We are moving a SQLServer environment from one machine to another. (SQL2000
> > sp3a)
> >
> > Can I
> > - Install SQLServer on the new machine
> > - backup all databases including master, model , msdb + all user databases
> > on the source machine
> > - restore all databases (including mast , model, msdb + user databases) on
> > the destination machine
> >
> > and expect SQL server to work as it did on my source machine? (Note in my
> > case the instance name will be different on the destination machine since the
> > instance name was the same as the machine name in the orig source :
> > npboffsql2\npboffsql2
> >
> > Or do I need to follow article 314546 (i.e. only move user databases and
> > rebuild the missing logins etc?)
> >
> > Tia,
> > Flora
Can I move SQL Server to a new machine (including master/model/msd
We are moving a SQLServer environment from one machine to another. (SQL2000
sp3a)
Can I
- Install SQLServer on the new machine
- backup all databases including master, model , msdb + all user databases
on the source machine
- restore all databases (including mast , model, msdb + user databases) on
the destination machine
and expect SQL server to work as it did on my source machine? (Note in my
case the instance name will be different on the destination machine since th
e
instance name was the same as the machine name in the orig source :
npboffsql2\npboffsql2
Or do I need to follow article 314546 (i.e. only move user databases and
rebuild the missing logins etc?)
Tia,
FloraHi Flora
You could follow http://support.microsoft.com/kb/224071/
If you wish to rename the server itself then you can follow
http://support.microsoft.com/defaul...kb;en-us;303774
John
"Flora Seymour" wrote:
> Hi
> We are moving a SQLServer environment from one machine to another. (SQL20
00
> sp3a)
> Can I
> - Install SQLServer on the new machine
> - backup all databases including master, model , msdb + all user database
s
> on the source machine
> - restore all databases (including mast , model, msdb + user databases) o
n
> the destination machine
> and expect SQL server to work as it did on my source machine? (Note in my
> case the instance name will be different on the destination machine since
the
> instance name was the same as the machine name in the orig source :
> npboffsql2\npboffsql2
> Or do I need to follow article 314546 (i.e. only move user databases and
> rebuild the missing logins etc?)
> Tia,
> Flora