Viewing 15 posts - 1 through 15 (of 88 total)
Replace updated with :
- deleted if you want work with old values.
- inserted if you want new ones.
January 27, 2012 at 8:59 am
GilaMonster (1/13/2012)
he want to stop the optimiser from compiling on each run (or stop the plan from aging out of cache)
He wants that because it's much quicker when the...
January 13, 2012 at 4:05 pm
venu9099 (1/13/2012)
CAN I WRITE LIKE THIScreate trigger jam_spu_csp_changed
on customer_special_prices
after
update
as
begin
IF UPDATE(price_table)OR UPDATE (bracket)
insert into jam_spu ( customer_id, location_number, seq_num )
select customer_id,location_number, seq_num FROM updated
end
go
Yes, it looks...
January 13, 2012 at 3:47 pm
GilaMonster (1/13/2012)
No. UsePlan does not disable the optimiser and KeepFixedPlan is either for schema invalidation or statisics invalidation (forget which and not checking now)
I think USE PLAN might do it.
From...
January 13, 2012 at 3:43 pm
I just had a look at sybase online documentation (http://manuals.sybase.com/onlinebooks/group-pbarc/conn5/sqlug/@Generic__BookTextView/42763;pt=41158), and Order 2 means that there must be at least 2 after update triggers on this table and this one...
January 13, 2012 at 3:32 pm
Would an hint like USE PLAN or KEEPFIXEDPLAN help ?
January 13, 2012 at 3:10 pm
venu9099 (1/13/2012)
create trigger jam_spu_csp_changed
after update of price_table, bracket
order 2 on customer_special_prices
referencing old as old_name
for each row
begin
insert...
January 13, 2012 at 3:09 pm
Here is the 1st one :
create trigger jam_spu_csp_insert
on customer_special_prices
after insert
as
begin
insert into jam_spu ( customer_id, location_number, seq_num )
SELECT
customer_id, location_number, seq_num
FROM inserted
end
go
January 13, 2012 at 2:38 pm
Lowell (1/13/2012)
instead, i'd do the following:.
1. script out your jobs in the msdb database,
2. script out the logins with...
January 13, 2012 at 12:30 pm
I'm so used to using source control that not having the procedures saved somewhere didn't occur to me as a possibility.
Just in case 🙂
January 13, 2012 at 12:29 pm
Here is a start :
declare @x xml
set @x =
'<?xml version="1.0"?>
<xml>
<kpis>
<kpi>
<id>1</id><desc>Maintain Servers Up and Running 99.999% Availability</desc><min>1</min><max>10</max><rate>9</rate><comment>Successful to maintain KPI</comment></kpi>
<kpi>
<id>2</id><desc>Maintain Servers Up and Running 99.999% Availability</desc><min>1</min><max>10</max><rate>9</rate><comment>Successful to maintain KPI</comment></kpi>
</kpis></xml>
'
select...
January 13, 2012 at 12:23 pm
Do you have backup of your staging database ?
Do you have a repository with all your staging database script ?
If both answers are no, I'll put that into production database.
Otherwise,...
January 13, 2012 at 12:07 pm
To restrict to a single user or role :
select sys.schemas.name 'Schema'
, sys.objects.name Object
, sys.database_principals.name username
, sys.database_permissions.type permissions_type
, sys.database_permissions.permission_name
, sys.database_permissions.state permission_state
, sys.database_permissions.state_desc
, state_desc + ' ' + permission_name + ' on...
January 13, 2012 at 12:00 pm
GSquared (1/13/2012)
You could simplify to:
GRANT EXEC TO PUBLIC;
I think you still have to create a user in the database with that.
January 13, 2012 at 11:50 am
One of the way to do it is to enable the guest user :
Use Your_db
go
grant connect to guest
grant execute to guest
go
January 13, 2012 at 11:48 am
Viewing 15 posts - 1 through 15 (of 88 total)