Tuesday, March 27, 2012
delete builtin\administrators
I delete the login buildin\administrator and now I can't use anymore SQL
Server Enterprise Manager.
Can somebody tell how to valid an other user or haw to recreate the account
buildin\adminstrators ?
I still have sa.
Thanks in advance
rmeuser@.free.frHi,
IN Enterprise manager, Right click above the server name and remove
registration. After that register the server again with SA user.
Thanks
Hari
MCDBA
"Ralf Meuser" <rmeuser@.free.fr> wrote in message
news:4030c1c4$0$20229$626a14ce@.news.free.fr...
> Hi there
> I delete the login buildin\administrator and now I can't use anymore SQL
> Server Enterprise Manager.
> Can somebody tell how to valid an other user or haw to recreate the
account
> buildin\adminstrators ?
> I still have sa.
> Thanks in advance
> rmeuser@.free.fr
>
delete builtin\administrators
I delete the login buildin\administrator and now I can't use anymore SQL
Server Enterprise Manager.
Can somebody tell how to valid an other user or haw to recreate the account
buildin\adminstrators ?
I still have sa.
Thanks in advance
rmeuser@.free.frHi,
IN Enterprise manager, Right click above the server name and remove
registration. After that register the server again with SA user.
Thanks
Hari
MCDBA
"Ralf Meuser" <rmeuser@.free.fr> wrote in message
news:4030c1c4$0$20229$626a14ce@.news.free.fr...
> Hi there
> I delete the login buildin\administrator and now I can't use anymore SQL
> Server Enterprise Manager.
> Can somebody tell how to valid an other user or haw to recreate the
account
> buildin\adminstrators ?
> I still have sa.
> Thanks in advance
> rmeuser@.free.fr
>
Saturday, February 25, 2012
Default Values not Selected on Report Manager
In the report manager when you choose the parameters and execute the report. It's rendered fine?|||
The server has behavior that it keeps the old parameter defaults that are set, even after republishing. Try deleting the report and republishing.
|||I have not seen the Report Server maintain default parameter values when a report is redeployed. After redeploying the report I have to manually reset the defaults (Properties tab --> Parameters page --> Override Default button).If there is some property of the server that would persist the defaults between deployments, I'd love to learn about it. Thanks.
Default Values in SQL Server
Under Enterprise Manager I am trying to set up default values for these fields
Phone, Fax = 000-000-000
Zip = 00000
However Sql Server truncates it to 0.
How do I default value as shown about in SQL server?You must have the column set to int?
Change it to varchar(30) and you should be fine.
ScAndal|||I have Phone, Fax nvarchar(12) and Zip as nvarchar(5)
I don't know why this doesn't work !!|||Ok.. I got the solution
For default value instead of putting 000-000-000 with nvarchar(12) I put '000-000-0000' and it works fine.
1) How do I use 'Formula' field in Enterprise Manager works?
2) How do I work with various Timezone issue ?|||love,
How did you determine it is storing as 0? Did you select the data from query analyzer and it shows 0?
ScAndal|||I right clicked on table and selected 'Return All Rows' where I saw 0 instead of 00000
Another way was, once I put value in Default field as 00000 and save table, return to the same column it will indiate data as (0) for zip and (0-0-0) for phone and fax.
This and your data type indicated me that there is something wrong with my default value.
Sunday, February 19, 2012
Default Value Does Not Work On Insert
In Enterprise Manager, the column will fill with the Default Value when no
data is entered as it should.
However, in my Stored Procedure, it won't.
Table:
Col1 uniqueidentifier pkey not null default newid()
Col2 tinyint not null default 20
Procedure:
@.Col1 UNIQUEIDENTIFIER = NULL,
@.Col2 TINYINT = NULL
SET @.Col1 = NEWID() /*Set to use later on*/
INSERT INTO dbo.Table1
(Col1, Col2)
VALUES (@.Col1, @.Col2)
If Col2 column is described as NOT null, it errs saying it can't insert null
into the col.
I would think that once it saw null, it would replace it with default.
If Col2 column is described as null, it would fill it with null and NOT
default.
If I replace @.Col2 with default, the default value is filled in.
Am I missing something here? I could have sworn I've done it before and it's
blowing my mind why it won't work.
Appreciating any assistance,
NathanSQL Server doesn't replace default with null. If you specify NULL, then it i
s because you want to
have NULL. Specifying NOT NULL in CREATE TABLE doesn't change this.
EM might do some strange smarts here, but EM does a lot of strange things.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Nathan" <Nathan@.discussions.microsoft.com> wrote in message
news:4BDDED11-1A72-45A6-B87D-ACD0F863C4B8@.microsoft.com...
> I'm totally flabbergasted,
> In Enterprise Manager, the column will fill with the Default Value when no
> data is entered as it should.
> However, in my Stored Procedure, it won't.
> Table:
> Col1 uniqueidentifier pkey not null default newid()
> Col2 tinyint not null default 20
> Procedure:
> @.Col1 UNIQUEIDENTIFIER = NULL,
> @.Col2 TINYINT = NULL
> SET @.Col1 = NEWID() /*Set to use later on*/
> INSERT INTO dbo.Table1
> (Col1, Col2)
> VALUES (@.Col1, @.Col2)
> If Col2 column is described as NOT null, it errs saying it can't insert nu
ll
> into the col.
> I would think that once it saw null, it would replace it with default.
> If Col2 column is described as null, it would fill it with null and NOT
> default.
> If I replace @.Col2 with default, the default value is filled in.
> Am I missing something here? I could have sworn I've done it before and it
's
> blowing my mind why it won't work.
> Appreciating any assistance,
> Nathan|||A little confusion here.
I want default to be used when "nothing" has been given.
In the SP, I have = Null so my app doesn't have to send anything.
If I don't have = Null in the SP, then my app is required to send something
and that may or may not be dbnull.value or "nothing".
Whatever the case, when I have nothing to give from my app, I want the DB to
set the value to the Default val.
I was just switching the Not Null for the Column for debugging purposes. I
thought it should have set the record cell to default value regardless of th
e
Null or Not Null.
I hope this is helping to clear up my situation and hope you have something
else for me.
Thanks for your input so far.
Nathan
"Tibor Karaszi" wrote:
> SQL Server doesn't replace default with null. If you specify NULL, then it
is because you want to
> have NULL. Specifying NOT NULL in CREATE TABLE doesn't change this.
> EM might do some strange smarts here, but EM does a lot of strange things.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Nathan" <Nathan@.discussions.microsoft.com> wrote in message
> news:4BDDED11-1A72-45A6-B87D-ACD0F863C4B8@.microsoft.com...
>
>|||If you want SQL Server to use the default value on insert, use the
DEFAULT keyword or do not specify the column at all:
INSERT INTO dbo.Table1 (Col1, Col2) VALUES (@.Col1, DEFAULT)
or
INSERT INTO dbo.Table1 (Col1) VALUES (@.Col1)
Razvan|||See Razvan's post. He posted the two ways for which SQ!L Server will apply a
default values. I.e.,
you probably have to check parameters values in the procedure and execute th
e inserts conditionally.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Nathan" <Nathan@.discussions.microsoft.com> wrote in message
news:3B533344-91F5-4EF8-8BA6-637E8420DD44@.microsoft.com...
>A little confusion here.
> I want default to be used when "nothing" has been given.
> In the SP, I have = Null so my app doesn't have to send anything.
> If I don't have = Null in the SP, then my app is required to send somethin
g
> and that may or may not be dbnull.value or "nothing".
> Whatever the case, when I have nothing to give from my app, I want the DB
to
> set the value to the Default val.
> I was just switching the Not Null for the Column for debugging purposes. I
> thought it should have set the record cell to default value regardless of
the
> Null or Not Null.
> I hope this is helping to clear up my situation and hope you have somethin
g
> else for me.
> Thanks for your input so far.
> Nathan
> "Tibor Karaszi" wrote:
>|||OK, I think I will have to use a trigger for this (first timer here).
I thought I could conditionally set the value if it was Null to Default, but
it doesn't like me using the word Default in a condition (isnull).
Thanks for the help you two,
Nathan
"Razvan Socol" wrote:
> If you want SQL Server to use the default value on insert, use the
> DEFAULT keyword or do not specify the column at all:
> INSERT INTO dbo.Table1 (Col1, Col2) VALUES (@.Col1, DEFAULT)
> or
> INSERT INTO dbo.Table1 (Col1) VALUES (@.Col1)
> Razvan
>|||On Mon, 25 Apr 2005 10:27:02 -0700, Nathan wrote:
>OK, I think I will have to use a trigger for this (first timer here).
>I thought I could conditionally set the value if it was Null to Default, bu
t
>it doesn't like me using the word Default in a condition (isnull).
>Thanks for the help you two,
>Nathan
Hi Nathan,
No need to use a trigger here! Just change the code in your stored
procedure to:
@.Col1 UNIQUEIDENTIFIER = NULL,
@.Col2 TINYINT = NULL
SET @.Col1 = NEWID() /*Set to use later on*/
IF @.Col2 IS NULL
INSERT INTO dbo.Table1 (Col1, Col2)
VALUES (@.Col1, DEFAULT)
ELSE
INSERT INTO dbo.Table1 (Col1, Col2)
VALUES (@.Col1, @.Col2)
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Hi Hugo,
If anything, I really would have liked to use an embedded conditional
statement, but don't seem to be able to.
For simplicity-sake, I only used two columns here, but there are several,
most having the possibility of being a value or needing to use a default
value.
So the combinations/permutations would just end up making it a mess.
I know, I could just set the default value (replacing =Null), but I want it
tightly-knitted with the database itself.
It seems that the trigger is the solution I'm looking for. At least there
are options. I always say, you can find at least 5 ways to copy and paste.
Thanks for the input,
Nathan
"Hugo Kornelis" wrote:
> On Mon, 25 Apr 2005 10:27:02 -0700, Nathan wrote:
>
> Hi Nathan,
> No need to use a trigger here! Just change the code in your stored
> procedure to:
> @.Col1 UNIQUEIDENTIFIER = NULL,
> @.Col2 TINYINT = NULL
> SET @.Col1 = NEWID() /*Set to use later on*/
> IF @.Col2 IS NULL
> INSERT INTO dbo.Table1 (Col1, Col2)
> VALUES (@.Col1, DEFAULT)
> ELSE
> INSERT INTO dbo.Table1 (Col1, Col2)
> VALUES (@.Col1, @.Col2)
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>|||On Mon, 25 Apr 2005 19:49:18 -0700, Nathan wrote:
>Hi Hugo,
>If anything, I really would have liked to use an embedded conditional
>statement, but don't seem to be able to.
>For simplicity-sake, I only used two columns here, but there are several,
>most having the possibility of being a value or needing to use a default
>value.
>So the combinations/permutations would just end up making it a mess.
>I know, I could just set the default value (replacing =Null), but I want it
>tightly-knitted with the database itself.
>It seems that the trigger is the solution I'm looking for. At least there
>are options. I always say, you can find at least 5 ways to copy and paste.
Hi Nathan,
I agree that the IF ... ELSE tree would grow quickly is the same logic has
to be applied to many columns. Writing triggers is one way around this.
But I doubt that it is the best way.
You already use a stored procedure to insert the data. Why not include the
default value in the code of the stored procedure? You say that you don't
want to do this because you want it tightly-knitted with the DB, but then
you want to code the default value in a trigger. How is a trigger more
tightly-knitted with the DB than a stored procedure?
CREATE PROC InsertIt
(@.KeyValue int,
@.Data1 varchar(20) = NULL,
@.Data2 datetime = NULL,
@.Date3 int = NULL)
INSERT INTO YourTable (KeyCol, Data1, Data2, Data3)
SELECT @.KeyValue,
COALESCE (@.Data1, 'Default value'),
COALESCE (@.Data2, CURRENT_TIMESTAMP),
COALESCE (@.Data3, 100)
go
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Actually, I was starting on the TR just to get some experience with it, but
figured my only app using the DB would work just fine setting the SP
parameter defaults.
I tend to think of future possibilities such as another app that will use
the DB, but not want to make use of that SP and may require another SP, and
then needing to remember to adjust the defaults for the parameters in each
SP. If I just had a single trigger, I wouldn't have to worry about default
parameters in different SPs.
But like I just said, I dropped that thought and will just stick with the
"here and now" of the single SP.
Just my way of thinking is all.
Nathan
"Hugo Kornelis" wrote:
> On Mon, 25 Apr 2005 19:49:18 -0700, Nathan wrote:
>
> Hi Nathan,
> I agree that the IF ... ELSE tree would grow quickly is the same logic has
> to be applied to many columns. Writing triggers is one way around this.
> But I doubt that it is the best way.
> You already use a stored procedure to insert the data. Why not include the
> default value in the code of the stored procedure? You say that you don't
> want to do this because you want it tightly-knitted with the DB, but then
> you want to code the default value in a trigger. How is a trigger more
> tightly-knitted with the DB than a stored procedure?
> CREATE PROC InsertIt
> (@.KeyValue int,
> @.Data1 varchar(20) = NULL,
> @.Data2 datetime = NULL,
> @.Date3 int = NULL)
> INSERT INTO YourTable (KeyCol, Data1, Data2, Data3)
> SELECT @.KeyValue,
> COALESCE (@.Data1, 'Default value'),
> COALESCE (@.Data2, CURRENT_TIMESTAMP),
> COALESCE (@.Data3, 100)
> go
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)
>
Friday, February 17, 2012
Default Value - I see the finish line!
specifically the method it uses. Current, RS drops that property when you
copy a report, hence making Snap Shots impossible when Snapping a copy of
another report. I'm doing this in an application.
Comon someone, I get this down and this baby gets thru QA!!!
My kingdom for the answer!!
thank you in advanceTake a look at
http://msdn.microsoft.com/library/en-us/rsprog/htm/rsp_ref_soapapi_ir_5zec.asp
for working with ReportParameter Objects
and
http://msdn.microsoft.com/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_48jc.asp
for how to call SetReportParameters method.
Some examples for working with report parms can be found on:
http://groups.google.com/groups?q=SetReportParameters&hl=en&lr=&group=microsoft.public.sqlserver.reportingsvcs&selm=OlRQmQDuEHA.3860%40TK2MSFTNGP09.phx.gbl&rnum=8
http://groups.google.com/groups?hl=en&lr=&frame=right&th=3c7cb0c51785eb58&seekm=9F17B95C-B484-46D9-A7F0-FD7BE91DE8EB%40microsoft.com#link7
Suspect you need to 1st call GetReportParameters against old report to
obtain parameters, then SetReportParameters against copy fo the report you
are making.
--
-- "This posting is provided 'AS IS' with no warranties, and confers no
rights."
jhmiller@.online.microsoft.com
"Eddie" <Eddie@.discussions.microsoft.com> wrote in message
news:6320E87B-95CA-4DA7-85FB-B2FCF05198E2@.microsoft.com...
> Third Posting on how the heck Report Manager sets the "Has Default"
> property,
> specifically the method it uses. Current, RS drops that property when you
> copy a report, hence making Snap Shots impossible when Snapping a copy of
> another report. I'm doing this in an application.
> Comon someone, I get this down and this baby gets thru QA!!!
> My kingdom for the answer!!
> thank you in advance|||John,
I do as the docs and you speak of. The twist is, you can't set a default
value if the report does not have the "has default" check box ichecked. It
works great if that darn check box is checked. Unfortunately, when you do a
Copy of a report, using CreateReport(), it for some reason loses the "Has
Default" property, meaning you can't progamatically set it, and hence, cannot
create a snapshot from it. I know it's possible, since you can do it in
Report Manager. What I can't figure out is how to progamatically set the "Has
Default" property of the parameter. The "Has Default" property is not listed
as a public of the ReportParameter Class.
"John H. Miller" wrote:
> Take a look at
> http://msdn.microsoft.com/library/en-us/rsprog/htm/rsp_ref_soapapi_ir_5zec.asp
> for working with ReportParameter Objects
> and
> http://msdn.microsoft.com/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_48jc.asp
> for how to call SetReportParameters method.
> Some examples for working with report parms can be found on:
> http://groups.google.com/groups?q=SetReportParameters&hl=en&lr=&group=microsoft.public.sqlserver.reportingsvcs&selm=OlRQmQDuEHA.3860%40TK2MSFTNGP09.phx.gbl&rnum=8
> http://groups.google.com/groups?hl=en&lr=&frame=right&th=3c7cb0c51785eb58&seekm=9F17B95C-B484-46D9-A7F0-FD7BE91DE8EB%40microsoft.com#link7
> Suspect you need to 1st call GetReportParameters against old report to
> obtain parameters, then SetReportParameters against copy fo the report you
> are making.
> --
> -- "This posting is provided 'AS IS' with no warranties, and confers no
> rights."
> jhmiller@.online.microsoft.com
> "Eddie" <Eddie@.discussions.microsoft.com> wrote in message
> news:6320E87B-95CA-4DA7-85FB-B2FCF05198E2@.microsoft.com...
> > Third Posting on how the heck Report Manager sets the "Has Default"
> > property,
> > specifically the method it uses. Current, RS drops that property when you
> > copy a report, hence making Snap Shots impossible when Snapping a copy of
> > another report. I'm doing this in an application.
> >
> > Comon someone, I get this down and this baby gets thru QA!!!
> > My kingdom for the answer!!
> >
> > thank you in advance
>
>
Tuesday, February 14, 2012
default settings when creating a database
Some users create new databases using the enterprise manager console (right
click in the database section and then selecting new database).
Once created this database has default settings like "Auto shrink" checked
or "Auto close" unchecked (in the option tab).
Is there a way to set these default settings so each time a new database is
created it has the right options?
thanks
Yes, set the correct options on the Model database. That database is the
baseline from which all other databases on a server are created.
<grille11@.yahoo.com> wrote in message
news:cjju9f$bb5$1@.reader1.imaginet.fr...
> Hello,
> Some users create new databases using the enterprise manager console
(right
> click in the database section and then selecting new database).
> Once created this database has default settings like "Auto shrink" checked
> or "Auto close" unchecked (in the option tab).
> Is there a way to set these default settings so each time a new database
is
> created it has the right options?
> thanks
>
|||I could have searched a little more for this one I guess. Thanks!
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:OMxDsF9pEHA.2864@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Yes, set the correct options on the Model database. That database is the
> baseline from which all other databases on a server are created.
>
> <grille11@.yahoo.com> wrote in message
> news:cjju9f$bb5$1@.reader1.imaginet.fr...
> (right
checked
> is
>
default settings when creating a database
Some users create new databases using the enterprise manager console (right
click in the database section and then selecting new database).
Once created this database has default settings like "Auto shrink" checked
or "Auto close" unchecked (in the option tab).
Is there a way to set these default settings so each time a new database is
created it has the right options?
thanksYes, set the correct options on the Model database. That database is the
baseline from which all other databases on a server are created.
<grille11@.yahoo.com> wrote in message
news:cjju9f$bb5$1@.reader1.imaginet.fr...
> Hello,
> Some users create new databases using the enterprise manager console
(right
> click in the database section and then selecting new database).
> Once created this database has default settings like "Auto shrink" checked
> or "Auto close" unchecked (in the option tab).
> Is there a way to set these default settings so each time a new database
is
> created it has the right options?
> thanks
>|||I could have searched a little more for this one I guess. Thanks!
"Adam Machanic" <amachanic@.hotmail._removetoemail_.com> wrote in message
news:OMxDsF9pEHA.2864@.TK2MSFTNGP12.phx.gbl...
> Yes, set the correct options on the Model database. That database is the
> baseline from which all other databases on a server are created.
>
> <grille11@.yahoo.com> wrote in message
> news:cjju9f$bb5$1@.reader1.imaginet.fr...
> > Hello,
> >
> > Some users create new databases using the enterprise manager console
> (right
> > click in the database section and then selecting new database).
> > Once created this database has default settings like "Auto shrink"
checked
> > or "Auto close" unchecked (in the option tab).
> > Is there a way to set these default settings so each time a new database
> is
> > created it has the right options?
> >
> > thanks
> >
> >
>
Default rendering by report.
Is it possible in RS 2000/2005 to specify a default rendering by
report, within the report manager web page. For example i have a data
extract that users will dump into execl/access so they never want to
see a pretty html rendering so i want that to go straight to csv, other
reports may render straight to pdf or html. I realise i could acheive
this by creating my own report manager, but i think this is quite a
sensible option to expect from the MS report manager.
Thanks for any assistance.
BenI have a user who only likes Excel.
So I created a report that doesn't read any data but consists of some
textboxes. They're formatted in a fancy way to look like buttons. In
the properties | Navigation tab of the textbox I navigate to a URL
which is the "URL access" form (look this up in BOL) for running
reports, from which you can specify parameters, rendering formats, how
much of the RS interface is shown (i.e. parameters, toolbars, document
maps etc.)
It's easy to do and requires no more than for you to look up the URL
access syntax. My user is very happy with this arrangement!
--
Regards
Chris
benaud@.gmail.com wrote:
> Hi All,
> Is it possible in RS 2000/2005 to specify a default rendering by
> report, within the report manager web page. For example i have a data
> extract that users will dump into execl/access so they never want to
> see a pretty html rendering so i want that to go straight to csv,
> other reports may render straight to pdf or html. I realise i could
> acheive this by creating my own report manager, but i think this is
> quite a sensible option to expect from the MS report manager.
> Thanks for any assistance.
> Ben|||Thanks Chris, This is a nice workaround cause it maintains the security
of the report manager... If theres no in-built way of doing what i
want then I will set it up like you suggest. But don't you agree that
the default rendering should be configurable by report?
Ben|||Oh yes, I do agree. There is a wishlist somewhere on microsofts web
site!
--
Regards
Chris
benaud@.gmail.com wrote:
> Thanks Chris, This is a nice workaround cause it maintains the
> security of the report manager... If theres no in-built way of doing
> what i want then I will set it up like you suggest. But don't you
> agree that the default rendering should be configurable by report?
> Ben