Friday, March 30, 2012
Manage Triggers grayed out
--=_NextPart_000_0020_01C5E53E.B83BB160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
What do I need to do to give someone access to Manage Triggers in EM?
Is there a way to give them access to view triggers via EM, but disable = their ability to create/drop?
--=_NextPart_000_0020_01C5E53E.B83BB160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
What do I need to do = to give someone access to Manage Triggers in EM?
Is there a way to give = them access to view triggers via EM, but disable their ability to = create/drop?
--=_NextPart_000_0020_01C5E53E.B83BB160--You need to be table owner or higher for this. And you cannot grant table owner in 2000. In other
words, either be the owner of the table or db_owner (you could try db_ddladmin, not sure). Whether
EM then will enable the option or not, I don't know...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"JLS" <jlshoop@.hotmail.com> wrote in message news:eoNMiiW5FHA.620@.TK2MSFTNGP12.phx.gbl...
What do I need to do to give someone access to Manage Triggers in EM?
Is there a way to give them access to view triggers via EM, but disable their ability to
create/drop?
Wednesday, March 28, 2012
Manage Null Format
is it possible to render a report in the Null format and store the
intermediate formate in an own database and tell report server at any time in
the future:
Here is the Null-Format and please render it now as PDF, Excel, whatever?
We cannot use the snapshots because:
1) Each set of parameter settings needs it's own rdl definition
(for snapshots, you have to define fixed standard parameters!)
2) Some reports might become very large and we do not want to
bring the customersSorry, that's when the children come in ...
Once again:
Hi,
is it possible to render a report in the Null format and store the
intermediate formate in an own database and tell report server at any time in
the future:
"Here is the Null-Format and please render it now as HTML, PDF, Excel,
whatever?
We cannot use the snapshot history because:
1) Each set of parameter settings needs it's own rdl definition
(for snapshots, you have to define fixed standard parameters!)
2) Some reports might become very large and we do not want to
bring the customer's report database to explosion ...
I know, that we could render the reports into any format we want and store
it on our own, but that would require unneccessary db (or file) space and the
user would not be able to render different formats later. Further more the
HTML-Format would not be possible at all.
Any help on that?
Thanks in advance ...
"Niklas" wrote:
> Hi,
> is it possible to render a report in the Null format and store the
> intermediate formate in an own database and tell report server at any time in
> the future:
> Here is the Null-Format and please render it now as PDF, Excel, whatever?
> We cannot use the snapshots because:
> 1) Each set of parameter settings needs it's own rdl definition
> (for snapshots, you have to define fixed standard parameters!)
> 2) Some reports might become very large and we do not want to
> bring the customers
Wednesday, March 21, 2012
Make XACT_ABORT persist?
--=_NextPart_000_000C_01C55544.13F07530
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi,
I want my transactions to abort when a runtime error (i.e. foreign = key constraint violation) occurs. I currently accomplish this by = prefixing all of my queries with:
SET XACT_ABORT ON
Is there a way to set this option globally so that I don't have to = continually set this option on each query? My first attempt to do this = was:
EXEC sp_dboption 'MyDatabaseName', 'xact_abort', 'true'
...which returned the following error message:
Database option 'xact_abort' does not exist.
Any help would be appreciated. Thanks.
Sincerely,
Vincent Vega
--=_NextPart_000_000C_01C55544.13F07530
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Hi,
I want my = transactions to abort when a runtime error (i.e. foreign key constraint violation) = occurs. I currently accomplish this by prefixing all of my queries = with:
SET XACT_ABORT ON
Is there a way to = set this option globally so that I don't have to continually set this = option on each query? My first attempt to do this was:
EXEC sp_dboption = 'MyDatabaseName', 'xact_abort', 'true'
...which returned = the following error message:
Database option = 'xact_abort' does not exist.
Any help would be = appreciated. Thanks.
Sincerely,
Vincent Vega
--=_NextPart_000_000C_01C55544.13F07530--This is a multi-part message in MIME format.
--=_NextPart_000_0048_01C5559A.040E7CB0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Just turning that on will eventually help you with your present =problems, but will make a lot of trouble when leaving this as a global =setting:
"Specifies whether Microsoft=AE SQL ServerT automatically rolls back the =current transaction if a Transact-SQL statement raises a run-time =error."
I would rather do some error handling than just pushing in all data with =ignoring the error about that.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Vincent Vega" <Pulp@.Fiction.com> schrieb im Newsbeitrag =news:aJadna7pIuwCfh3fRVn-3w@.giganews.com...
Hi,
I want my transactions to abort when a runtime error (i.e. foreign =key constraint violation) occurs. I currently accomplish this by =prefixing all of my queries with:
SET XACT_ABORT ON
Is there a way to set this option globally so that I don't have to =continually set this option on each query? My first attempt to do this =was:
EXEC sp_dboption 'MyDatabaseName', 'xact_abort', 'true'
...which returned the following error message:
Database option 'xact_abort' does not exist.
Any help would be appreciated. Thanks.
Sincerely,
Vincent Vega
--=_NextPart_000_0048_01C5559A.040E7CB0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&
Just turning that on will eventually =help you with your present problems, but will make a lot of trouble when leaving this =as a global setting:
"Specifies whether Microsoft=AE SQL Server=99 automatically rolls =back the current transaction if a Transact-SQL statement raises a run-time =error."
I would rather do some error handling =than just pushing in all data with ignoring the error about that.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Vincent Vega"
Hi,
I want my =transactions to abort when a runtime error (i.e. foreign key constraint violation) =occurs. I currently accomplish this by prefixing all of my queries =with:
SET XACT_ABORT ON
Is there a way =to set this option globally so that I don't have to continually set this =option on each query? My first attempt to do this was:
EXEC sp_dboption 'MyDatabaseName', 'xact_abort', 'true'
...which =returned the following error message:
Database option ='xact_abort' does not exist.
Any help would =be appreciated. Thanks.
Sincerely,
Vincent Vega
--=_NextPart_000_0048_01C5559A.040E7CB0--|||I fully agree with Jens. If you still want to turn this on, you can at the instance level using
sp_configure. Note that many tools etc are not designed to use this setting, so be aware.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in message
news:eDuF9kYVFHA.3312@.TK2MSFTNGP10.phx.gbl...
Just turning that on will eventually help you with your present problems, but will make a lot of
trouble when leaving this as a global setting:
"Specifies whether Microsoft® SQL ServerT automatically rolls back the current transaction if a
Transact-SQL statement raises a run-time error."
I would rather do some error handling than just pushing in all data with ignoring the error about
that.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Vincent Vega" <Pulp@.Fiction.com> schrieb im Newsbeitrag
news:aJadna7pIuwCfh3fRVn-3w@.giganews.com...
Hi,
I want my transactions to abort when a runtime error (i.e. foreign key constraint violation)
occurs. I currently accomplish this by prefixing all of my queries with:
SET XACT_ABORT ON
Is there a way to set this option globally so that I don't have to continually set this option
on each query? My first attempt to do this was:
EXEC sp_dboption 'MyDatabaseName', 'xact_abort', 'true'
...which returned the following error message:
Database option 'xact_abort' does not exist.
Any help would be appreciated. Thanks.
Sincerely,
Vincent Vega
Monday, March 19, 2012
make math operations with DateTime
hi,
how can i make mathematical operations with the DateTime format from thw Sql? -- this is the format 9/6/2007 11:09:00 PM --
how can i substract 30 days from that date and know the resulting one?
if i have two dates, how can i know what number of hours and minutes are between them (if they are fewer than 24), or what number of days and hours and minutes are (if the difference is grater than 24 hours)
please help me, thanks
You can use the sql function DATEADD. To perform subtraction, you simply pass a negative value to DATEADD.
http://msdn2.microsoft.com/en-us/library/ms186724.aspx
For the difference between two dates, you can use DATEDIFF. To express that difference in day,hours etc.. you can get some ideas from here:
http://classicasp.aspfaq.com/date-time-routines-manipulation/how-do-i-convert-a-datediff-to-days-hours-and-minutes.html
|||
thank you, very good examples
Make date from several strings
Hello all
Someone gave me this:
Month Day Year Hour Min Sec
9 9 2006 15 9 36
And I need to make a descent date format out of it which looks like this:
Sun Sept 09 15:09:36 CEST 2006
I can concatenate the whole thing but I'm stuck with the "sunday" part.
I'm sure there are some experst out there who know how to do this is in 1 minute;)
Regards
Worf
to get the name wrap left(convert(varchar(30),dateadd(d,day-1,'19000101'),100),3)
around your Day column
example
select left(convert(varchar(30),dateadd(d,dayCol-1,'19000101'),100),3) from(
select 9 as dayCol, 9 as m, 2006 as y)x
Denis The SQL Menace
http://sqlservercode.blogspot.com/
Exellent!
Many thanks!
Worf
|||So far I have the following code but it gives me an error:
Conversion failed when converting datetime from character string.
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER FUNCTION [dbo].[MakeDate] (@.Month int, @.Day int, @.Year int, @.Hour int, @.Min int, @.Sec int)
RETURNS nvarchar(50)
AS
BEGIN
DECLARE @.C_Date nvarchar(50)
DECLARE @.TempMonth varchar(3)
DECLARE @.TempWeekDay varchar(3)
SET @.TempMonth = LEFT(CONVERT(nvarchar,(DATENAME(month, (@.Year + @.Month + @.Day)))), 3)
SET @.TempWeekDay = LEFT(CONVERT(nvarchar,(DATENAME(weekday, (@.Year + @.Month + @.Day)))),3)
SET @.C_Date = @.TempWeekDay + ' ' + @.TempMonth +' '+ @.Day +' ' + @.Hour +':'+ @.Min +':'+ @.Sec + ' CEST ' + @.Year
RETURN(@.C_Date)
END;
when eexecuting it looks like this:
SELECT [myDatabase].[dbo].[MakeDate] (08,23,2006,12,23,45)
Sigh
Worf
|||
How about this?
CREATE FUNCTION [dbo].[MakeDate] (@.Month int, @.Day int, @.Year int, @.Hour
int, @.Min int, @.Sec int)
RETURNS nvarchar(50)
AS
BEGIN
DECLARE @.C_Date nvarchar(50)
DECLARE @.TempMonth varchar(3)
DECLARE @.TempWeekDay varchar(3)
DECLARE @.MonthNames VARCHAR(100)
DECLARE @.DT datetime
SET @.DT = DATEADD(minute,@.Min,
DATEADD(second,@.Sec,
DATEADD(hour,@.Hour,
DATEADD(day,@.Day,
DATEADD(month,@.Month-1,
DATEADD(year,@.Year-1900,-1))))))
SET @.MonthNames = 'Jan Feb Mar Apr May Jun Jul Aug SeptOct Nov Dec'
DECLARE @.DayNames VARCHAR(100)
SET @.DayNames = 'Sun Mon Tue Wed Thu Fri Sat'
SET @.TempMonth = RTRIM(SUBSTRING(@.MonthNames,(DATEDIFF(month,0,@.DT)%12)*4+1,4))
SET @.TempWeekDay = LEFT(DATENAME(weekday,DATEDIFF(day,0,@.DT)),3)
SET @.C_Date = @.TempWeekDay + ' ' + @.TempMonth +' '
+ RTRIM(DATEPART(Day,@.DT)) +' ' + CONVERT(CHAR(8),@.DT,8)
+ ' CEST ' + RTRIM(DATEPART(Year,@.DT))
RETURN(@.C_Date)
END
GO
SELECT dbo.MakeDate(2,13,2004,11,12,4)
go
This won't work except for English, but Sept is not the
SQL Server short month name, so I didn't use DATENAME
on the month part. This will also accept invalid
parts, and change November 32 to Dec 2, for example.
Test thoroughly!
Steve Kass
Drew University
http://www.stevekass.com
Worf@.discussions.microsoft.com wrote:
> Hello all
>
> Someone gave me this:
>
> Month Day Year Hour Min Sec
> 9 9 2006 15 9 36
>
> And I need to make a descent date format out of it which looks like
> this:
>
> Sun Sept 09 15:09:36 CEST 2006
>
> I can concatenate the whole thing but I'm stuck with the "sunday" part.
>
> I'm sure there are some experst out there who know how to do this is in
> 1 minute;)
>
> Regards
>
> Worf
>
>