Viewing 15 posts - 5,446 through 5,460 (of 7,502 total)
keep in mind sqlserver is actualy recreating your table and indexes and inserting the existing rows into it.
IO is your slowest operation.
btw you can script this operation with Enterprise manager...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 26, 2007 at 12:31 pm
it is actualy getting the resultset as well as the rowcount because that is returned as an outputvariable.
.
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 26, 2007 at 12:25 pm
- problem with authshrink is that you don't know _when_ it is going to happen.
- autoshrink is active, and apps are still accessing the db, they will suffer, or even...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 26, 2007 at 12:22 pm
--Lets create SP1
CREATE PROC SP1
@NoRows int OUTPUT
AS
begin
set nocount on -- avoid unneeded network info
SELECT au_lname
FROM authors
SET @NoRows = @@rowcount
end
go
declare @Rowcount int
exec sp1 @Rowcount output
print @Rowcount
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 26, 2007 at 10:46 am
there was no problem with the proc.
using Return @Exists just means that you use the value of var @Exists as procedure-return-code.
DECLARE @rc int
DECLARE @pUsername nvarchar(50)
DECLARE @Exists bit
-- TODO: Set parameter...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 26, 2007 at 5:35 am
Ahmed Bouzamondo (11/24/2007)
If I want to create the user JustProc on AdVentureWorks datatbase.
Please Just confirm the following:
1. Connect to an instance as the sysadmin
2. Create a new login JustProc...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 25, 2007 at 10:31 am
http://www.sqlservercentral.com/scripts/Miscellaneous/31639/
The order of adding the parameters to the cmdobject is important ! (= order of parameters as used with the create procedure)
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 25, 2007 at 4:56 am
just add the login to your db (public) and then
you can grant it exec on schema.
This way _all_ schema bound functions and procedures are available for the login.
Also keep...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 24, 2007 at 2:49 am
no, that is not needed.
in stead of the "set transaction isolation level" you
might use the "with (nolock)" table hint if you don't want
the scope to be proc level.
Anyways,...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 23, 2007 at 8:09 am
or if you only want to trim leading or trailing spaces you can use :
SELECT RTRIM(LTRIM(mycol))
FROM myobject
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 23, 2007 at 8:04 am
Check out BOL for
DBCC SHRINKFILE
(
{ 'file_name' | file_id }
{ [ , EMPTYFILE ]
| [...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 22, 2007 at 9:19 am
easiest way is to
select top 1 convert(varchar(23),datetimecolumn,121) as datetimestring
from yourtable
and copy/paste the result.
or use
Declare @wrkDatetime datetime
set @wrkDatetime = dateadd(d, -10, getdate()) -- today - 10 days
select...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 19, 2007 at 9:17 am
Indeed within a sqlserver version (sql2005) you can move datafiles from 64bit to 32bit and visa versa.
keep in mind, once mounted on sql2005 you cannot detatch and attach
on sql2000...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 19, 2007 at 9:13 am
Now that's a very welcome feedback :Wow:
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 19, 2007 at 6:55 am
You've got the solution.
Just a reminder there are some downsides for using dynamic sql
All time ref: http://www.sommarskog.se/dynamic_sql.html :Whistling:
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
November 16, 2007 at 4:55 am
Viewing 15 posts - 5,446 through 5,460 (of 7,502 total)