Someone help me please. I'm confused.
I've got a brand new Maintenance Plan which reorganizes indexes, clears out
the MP history and updates DB stats. It refused to save with a schedule of
once a week on Sunday at 1:00 a.m., but did save without a schedule (on
demand).
I have reopened the Maintenance Plan and tried to create a schedule. Every
time I try to close out and save (X on the upper right), it gives me the
Error: "GUID should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
information.
What is going on? Does anyone know? Help would be appreciatedd since we're
right on top of our official 2000-to-2005 server switch over.
Thanks,
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)Check this link out, hopefully it should resolve your issue.
http://www.kbalertz.com/Feedback_922651.aspx
Bob
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears out
> the MP history and updates DB stats. It refused to save with a schedule of
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Every
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we're
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)|||Just an FYI. I tried creating a new job that contained the above 3 steps and
the Notify Operator (set with a fail precendence from the other three tasks)
for another user db. I hit save, then the X up in the right hand corner and
got the following error message:
"Apply to target server failed for job 'MyJobName' "
I did get this error message on the other job and wonder if maybe there's a
connection between this and the GUID message?
Thanks,
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears out
> the MP history and updates DB stats. It refused to save with a schedule of
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Every
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we're
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)|||No these issues are not related. The second issue you are seeing is probably
because you are using SQL Server Management studio to connect to a server
which is not local. If you terminal service to the machine itself and use sa
account to connect to it from there then you shouldn't see this issue. This
issue is somehow related to security but haven't found a solution yet.
Bob
"Catadmin" wrote:
> Just an FYI. I tried creating a new job that contained the above 3 steps and
> the Notify Operator (set with a fail precendence from the other three tasks)
> for another user db. I hit save, then the X up in the right hand corner and
> got the following error message:
> "Apply to target server failed for job 'MyJobName' "
> I did get this error message on the other job and wonder if maybe there's a
> connection between this and the GUID message?
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
> @.=)
>
> "Catadmin" wrote:
> > Someone help me please. I'm confused.
> >
> > I've got a brand new Maintenance Plan which reorganizes indexes, clears out
> > the MP history and updates DB stats. It refused to save with a schedule of
> > once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> > demand).
> >
> > I have reopened the Maintenance Plan and tried to create a schedule. Every
> > time I try to close out and save (X on the upper right), it gives me the
> > Error: "GUID should contain 32 digits with 4 dashes
> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> > information.
> >
> > What is going on? Does anyone know? Help would be appreciatedd since we're
> > right on top of our official 2000-to-2005 server switch over.
> >
> > Thanks,
> >
> > Catadmin
> > --
> > MCDBA, MCSA
> > Random Thoughts: If a person is Microsoft Certified, does that mean that
> > Microsoft pays the bills for the funny white jackets that tie in the back?
> > @.=)|||Bob,
I appreciate the link, but this has nothing to do with SSIS or an
importanted maintenance plan. I'm actually creating this plan from scratch
in the GUI of SSMS and getting this error.
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Bob" wrote:
> Check this link out, hopefully it should resolve your issue.
> http://www.kbalertz.com/Feedback_922651.aspx
> Bob
> "Catadmin" wrote:
> > Someone help me please. I'm confused.
> >
> > I've got a brand new Maintenance Plan which reorganizes indexes, clears out
> > the MP history and updates DB stats. It refused to save with a schedule of
> > once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> > demand).
> >
> > I have reopened the Maintenance Plan and tried to create a schedule. Every
> > time I try to close out and save (X on the upper right), it gives me the
> > Error: "GUID should contain 32 digits with 4 dashes
> > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> > information.
> >
> > What is going on? Does anyone know? Help would be appreciatedd since we're
> > right on top of our official 2000-to-2005 server switch over.
> >
> > Thanks,
> >
> > Catadmin
> > --
> > MCDBA, MCSA
> > Random Thoughts: If a person is Microsoft Certified, does that mean that
> > Microsoft pays the bills for the funny white jackets that tie in the back?
> > @.=)|||Bob,
You are correct. I am connected on my desktop with SSMS to a remote server.
So, you're saying I actually have to use a remote connection like VPN/Remote
Desktop to get onto the actual server and create the maintenance plan there?
That stinks. I hope they fix this soon as we only allow one TS connection
to the machine at a time and there are several of us doing different parts of
our upgrade project.
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Bob" wrote:
> No these issues are not related. The second issue you are seeing is probably
> because you are using SQL Server Management studio to connect to a server
> which is not local. If you terminal service to the machine itself and use sa
> account to connect to it from there then you shouldn't see this issue. This
> issue is somehow related to security but haven't found a solution yet.
> Bob
> "Catadmin" wrote:
> > Just an FYI. I tried creating a new job that contained the above 3 steps and
> > the Notify Operator (set with a fail precendence from the other three tasks)
> > for another user db. I hit save, then the X up in the right hand corner and
> > got the following error message:
> >
> > "Apply to target server failed for job 'MyJobName' "
> >
> > I did get this error message on the other job and wonder if maybe there's a
> > connection between this and the GUID message?
> >
> > Thanks,
> > Catadmin
> >
> > --
> > MCDBA, MCSA
> > Random Thoughts: If a person is Microsoft Certified, does that mean that
> > Microsoft pays the bills for the funny white jackets that tie in the back?
> > @.=)
> >
> >
> > "Catadmin" wrote:
> >
> > > Someone help me please. I'm confused.
> > >
> > > I've got a brand new Maintenance Plan which reorganizes indexes, clears out
> > > the MP history and updates DB stats. It refused to save with a schedule of
> > > once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> > > demand).
> > >
> > > I have reopened the Maintenance Plan and tried to create a schedule. Every
> > > time I try to close out and save (X on the upper right), it gives me the
> > > Error: "GUID should contain 32 digits with 4 dashes
> > > (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> > > information.
> > >
> > > What is going on? Does anyone know? Help would be appreciatedd since we're
> > > right on top of our official 2000-to-2005 server switch over.
> > >
> > > Thanks,
> > >
> > > Catadmin
> > > --
> > > MCDBA, MCSA
> > > Random Thoughts: If a person is Microsoft Certified, does that mean that
> > > Microsoft pays the bills for the funny white jackets that tie in the back?
> > > @.=)
Showing posts with label contain. Show all posts
Showing posts with label contain. Show all posts
Sunday, February 19, 2012
"GUID should contain 32 digits" when saving brand new Maintenance
Someone help me please. I'm confused.
I've got a brand new Maintenance Plan which reorganizes indexes, clears out
the MP history and updates DB stats. It refused to save with a schedule of
once a week on Sunday at 1:00 a.m., but did save without a schedule (on
demand).
I have reopened the Maintenance Plan and tried to create a schedule. Every
time I try to close out and save (X on the upper right), it gives me the
Error: "GUID should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
information.
What is going on? Does anyone know? Help would be appreciatedd since we're
right on top of our official 2000-to-2005 server switch over.
Thanks,
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)Check this link out, hopefully it should resolve your issue.
http://www.kbalertz.com/Feedback_922651.aspx
Bob
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears ou
t
> the MP history and updates DB stats. It refused to save with a schedule o
f
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Ever
y
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we'
re
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
'
> @.=)|||Just an FYI. I tried creating a new job that contained the above 3 steps an
d
the Notify Operator (set with a fail precendence from the other three tasks)
for another user db. I hit save, then the X up in the right hand corner and
got the following error message:
"Apply to target server failed for job 'MyJobName' "
I did get this error message on the other job and wonder if maybe there's a
connection between this and the GUID message?
Thanks,
Catadmin
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears ou
t
> the MP history and updates DB stats. It refused to save with a schedule o
f
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Ever
y
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we'
re
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
'
> @.=)
I've got a brand new Maintenance Plan which reorganizes indexes, clears out
the MP history and updates DB stats. It refused to save with a schedule of
once a week on Sunday at 1:00 a.m., but did save without a schedule (on
demand).
I have reopened the Maintenance Plan and tried to create a schedule. Every
time I try to close out and save (X on the upper right), it gives me the
Error: "GUID should contain 32 digits with 4 dashes
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
information.
What is going on? Does anyone know? Help would be appreciatedd since we're
right on top of our official 2000-to-2005 server switch over.
Thanks,
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)Check this link out, hopefully it should resolve your issue.
http://www.kbalertz.com/Feedback_922651.aspx
Bob
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears ou
t
> the MP history and updates DB stats. It refused to save with a schedule o
f
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Ever
y
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we'
re
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
'
> @.=)|||Just an FYI. I tried creating a new job that contained the above 3 steps an
d
the Notify Operator (set with a fail precendence from the other three tasks)
for another user db. I hit save, then the X up in the right hand corner and
got the following error message:
"Apply to target server failed for job 'MyJobName' "
I did get this error message on the other job and wonder if maybe there's a
connection between this and the GUID message?
Thanks,
Catadmin
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"Catadmin" wrote:
> Someone help me please. I'm confused.
> I've got a brand new Maintenance Plan which reorganizes indexes, clears ou
t
> the MP history and updates DB stats. It refused to save with a schedule o
f
> once a week on Sunday at 1:00 a.m., but did save without a schedule (on
> demand).
> I have reopened the Maintenance Plan and tried to create a schedule. Ever
y
> time I try to close out and save (X on the upper right), it gives me the
> Error: "GUID should contain 32 digits with 4 dashes
> (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" with an OK button and no other
> information.
> What is going on? Does anyone know? Help would be appreciatedd since we'
re
> right on top of our official 2000-to-2005 server switch over.
> Thanks,
> Catadmin
> --
> MCDBA, MCSA
> Random Thoughts: If a person is Microsoft Certified, does that mean that
> Microsoft pays the bills for the funny white jackets that tie in the back?
'
> @.=)
Friday, January 27, 2012
'-' in database name
Hi All,
We have a couple development database that contain a dash in them, something
like 'DB-TEST'.
I need to truncate the log and I would like to issue the following command:
backup log 'DB-TEST' with truncate_only
but sql-server doesn't like it
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
database names.
This fails both interactively and in a job.
Any help in escaping the - would be greatly appreciated.
TIA,
TimThere are rules for naming of things (aka 'identifiers') if you want to be
able to just type the name as it (without quoting the name in any way). This
is called 'standard identifiers'. By using a hyphen (dash, minus) you do not
follow those rules anymore. I discourage naming objects in this way.
The BACKUP command expects an identifier for the database name, and if you
don't follow the rules for standard identifiers, you have to quote the
database name, You can either use double-quotes or square brackets (non-ANSI
SQL). But not single quotes.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Tim" <tfleury@.pacbell.net> wrote in message
news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> We have a couple development database that contain a dash in them,
something
> like 'DB-TEST'.
> I need to truncate the log and I would like to issue the following
command:
> backup log 'DB-TEST' with truncate_only
> but sql-server doesn't like it
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> database names.
> This fails both interactively and in a job.
> Any help in escaping the - would be greatly appreciated.
> TIA,
> Tim
>|||I inherited these database and I have tried to get them renamed but I have
encountered too much resistance.
But, I tried the [ ] brackets and they work like a champ.
Thanks a lot for the help.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:usYV8HO7DHA.2712@.tk2msftngp13.phx.gbl...
> There are rules for naming of things (aka 'identifiers') if you want to be
> able to just type the name as it (without quoting the name in any way).
This
> is called 'standard identifiers'. By using a hyphen (dash, minus) you do
not
> follow those rules anymore. I discourage naming objects in this way.
> The BACKUP command expects an identifier for the database name, and if you
> don't follow the rules for standard identifiers, you have to quote the
> database name, You can either use double-quotes or square brackets
(non-ANSI
> SQL). But not single quotes.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=...ublic.sqlserver
>
> "Tim" <tfleury@.pacbell.net> wrote in message
> news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> something
> command:
>
We have a couple development database that contain a dash in them, something
like 'DB-TEST'.
I need to truncate the log and I would like to issue the following command:
backup log 'DB-TEST' with truncate_only
but sql-server doesn't like it
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
database names.
This fails both interactively and in a job.
Any help in escaping the - would be greatly appreciated.
TIA,
TimThere are rules for naming of things (aka 'identifiers') if you want to be
able to just type the name as it (without quoting the name in any way). This
is called 'standard identifiers'. By using a hyphen (dash, minus) you do not
follow those rules anymore. I discourage naming objects in this way.
The BACKUP command expects an identifier for the database name, and if you
don't follow the rules for standard identifiers, you have to quote the
database name, You can either use double-quotes or square brackets (non-ANSI
SQL). But not single quotes.
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=...ublic.sqlserver
"Tim" <tfleury@.pacbell.net> wrote in message
news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> We have a couple development database that contain a dash in them,
something
> like 'DB-TEST'.
> I need to truncate the log and I would like to issue the following
command:
> backup log 'DB-TEST' with truncate_only
> but sql-server doesn't like it
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> database names.
> This fails both interactively and in a job.
> Any help in escaping the - would be greatly appreciated.
> TIA,
> Tim
>|||I inherited these database and I have tried to get them renamed but I have
encountered too much resistance.
But, I tried the [ ] brackets and they work like a champ.
Thanks a lot for the help.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:usYV8HO7DHA.2712@.tk2msftngp13.phx.gbl...
> There are rules for naming of things (aka 'identifiers') if you want to be
> able to just type the name as it (without quoting the name in any way).
This
> is called 'standard identifiers'. By using a hyphen (dash, minus) you do
not
> follow those rules anymore. I discourage naming objects in this way.
> The BACKUP command expects an identifier for the database name, and if you
> don't follow the rules for standard identifiers, you have to quote the
> database name, You can either use double-quotes or square brackets
(non-ANSI
> SQL). But not single quotes.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=...ublic.sqlserver
>
> "Tim" <tfleury@.pacbell.net> wrote in message
> news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> something
> command:
>
'-' in database name
Hi All,
We have a couple development database that contain a dash in them, something
like 'DB-TEST'.
I need to truncate the log and I would like to issue the following command:
backup log 'DB-TEST' with truncate_only
but sql-server doesn't like it
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
database names.
This fails both interactively and in a job.
Any help in escaping the - would be greatly appreciated.
TIA,
TimThere are rules for naming of things (aka 'identifiers') if you want to be
able to just type the name as it (without quoting the name in any way). This
is called 'standard identifiers'. By using a hyphen (dash, minus) you do not
follow those rules anymore. I discourage naming objects in this way.
The BACKUP command expects an identifier for the database name, and if you
don't follow the rules for standard identifiers, you have to quote the
database name, You can either use double-quotes or square brackets (non-ANSI
SQL). But not single quotes.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Tim" <tfleury@.pacbell.net> wrote in message
news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> We have a couple development database that contain a dash in them,
something
> like 'DB-TEST'.
> I need to truncate the log and I would like to issue the following
command:
> backup log 'DB-TEST' with truncate_only
> but sql-server doesn't like it
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> database names.
> This fails both interactively and in a job.
> Any help in escaping the - would be greatly appreciated.
> TIA,
> Tim
>|||I inherited these database and I have tried to get them renamed but I have
encountered too much resistance.
But, I tried the [ ] brackets and they work like a champ.
Thanks a lot for the help.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:usYV8HO7DHA.2712@.tk2msftngp13.phx.gbl...
> There are rules for naming of things (aka 'identifiers') if you want to be
> able to just type the name as it (without quoting the name in any way).
This
> is called 'standard identifiers'. By using a hyphen (dash, minus) you do
not
> follow those rules anymore. I discourage naming objects in this way.
> The BACKUP command expects an identifier for the database name, and if you
> don't follow the rules for standard identifiers, you have to quote the
> database name, You can either use double-quotes or square brackets
(non-ANSI
> SQL). But not single quotes.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Tim" <tfleury@.pacbell.net> wrote in message
> news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> > Hi All,
> >
> > We have a couple development database that contain a dash in them,
> something
> > like 'DB-TEST'.
> >
> > I need to truncate the log and I would like to issue the following
> command:
> >
> > backup log 'DB-TEST' with truncate_only
> >
> > but sql-server doesn't like it
> >
> > Server: Msg 170, Level 15, State 1, Line 1
> > Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> > database names.
> >
> > This fails both interactively and in a job.
> >
> > Any help in escaping the - would be greatly appreciated.
> >
> > TIA,
> > Tim
> >
> >
>
We have a couple development database that contain a dash in them, something
like 'DB-TEST'.
I need to truncate the log and I would like to issue the following command:
backup log 'DB-TEST' with truncate_only
but sql-server doesn't like it
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
database names.
This fails both interactively and in a job.
Any help in escaping the - would be greatly appreciated.
TIA,
TimThere are rules for naming of things (aka 'identifiers') if you want to be
able to just type the name as it (without quoting the name in any way). This
is called 'standard identifiers'. By using a hyphen (dash, minus) you do not
follow those rules anymore. I discourage naming objects in this way.
The BACKUP command expects an identifier for the database name, and if you
don't follow the rules for standard identifiers, you have to quote the
database name, You can either use double-quotes or square brackets (non-ANSI
SQL). But not single quotes.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Tim" <tfleury@.pacbell.net> wrote in message
news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> Hi All,
> We have a couple development database that contain a dash in them,
something
> like 'DB-TEST'.
> I need to truncate the log and I would like to issue the following
command:
> backup log 'DB-TEST' with truncate_only
> but sql-server doesn't like it
> Server: Msg 170, Level 15, State 1, Line 1
> Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> database names.
> This fails both interactively and in a job.
> Any help in escaping the - would be greatly appreciated.
> TIA,
> Tim
>|||I inherited these database and I have tried to get them renamed but I have
encountered too much resistance.
But, I tried the [ ] brackets and they work like a champ.
Thanks a lot for the help.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:usYV8HO7DHA.2712@.tk2msftngp13.phx.gbl...
> There are rules for naming of things (aka 'identifiers') if you want to be
> able to just type the name as it (without quoting the name in any way).
This
> is called 'standard identifiers'. By using a hyphen (dash, minus) you do
not
> follow those rules anymore. I discourage naming objects in this way.
> The BACKUP command expects an identifier for the database name, and if you
> don't follow the rules for standard identifiers, you have to quote the
> database name, You can either use double-quotes or square brackets
(non-ANSI
> SQL). But not single quotes.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:
>
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
>
> "Tim" <tfleury@.pacbell.net> wrote in message
> news:uYqAeBO7DHA.2472@.TK2MSFTNGP10.phx.gbl...
> > Hi All,
> >
> > We have a couple development database that contain a dash in them,
> something
> > like 'DB-TEST'.
> >
> > I need to truncate the log and I would like to issue the following
> command:
> >
> > backup log 'DB-TEST' with truncate_only
> >
> > but sql-server doesn't like it
> >
> > Server: Msg 170, Level 15, State 1, Line 1
> > Line 1: Incorrect syntax near 'DB-TEST'. ****works fine for one word
> > database names.
> >
> > This fails both interactively and in a job.
> >
> > Any help in escaping the - would be greatly appreciated.
> >
> > TIA,
> > Tim
> >
> >
>
Subscribe to:
Posts (Atom)
