Viewing 15 posts - 6,541 through 6,555 (of 7,185 total)
Brian doesn't want to control which objects go to which file. He only wants to ensure that data is split evenly across the files. Having multiple files within the same...
February 20, 2007 at 8:44 am
Michelle
That's just too tricky. If you don't have somewhere you can test this before you do it for real, then a large part of it is going to be keeping...
February 20, 2007 at 8:38 am
Michelle
I wouldn't risk trying to restore the system databases. That's why I suggested scripting out logins, jobs and so on, so that you can do a clean install and then...
February 20, 2007 at 7:53 am
Adam
This will work in SQL Server 2005 as well:
CREATE PROCEDURE MyProc @colname sysname
AS
SELECT 'select [' + column_name + '] from [' + table_schema + '].[' + table_name + ']'
FROM information_schema.columns
WHERE column_name = @colname
GO
Call it like this:
February 20, 2007 at 6:12 am
Charlie
I'm not sure how you got any results at all from that query, but never mind - try this:
--Table
CREATE TABLE MyTable (sampleno INT, workcode decimal(5, 2), result INT)
--Data
INSERT INTO MyTable VALUES (211, 33, 50)
INSERT INTO MyTable VALUES (211, 33.01, 51)
INSERT INTO MyTable VALUES (211, 33.02, 54)
INSERT INTO MyTable VALUES (211, 33.03, 32)
INSERT INTO MyTable VALUES (212, 33, 23)
INSERT INTO MyTable VALUES (212, 33.01, 34)
INSERT INTO MyTable VALUES (212, 33.02, 24)...
February 20, 2007 at 3:08 am
Brian
I suppose one way to do it would be to create twelve new files in a new filegroup. Then you can drop the clustered index of each table and recreate...
February 19, 2007 at 7:02 am
Adam
It sounds like poor database design to me - are we allowed to know why they want to do this?
Anyway, to answer your question. How about creating a table with...
February 14, 2007 at 10:11 am
BK
Use the sp_helplogins stored procedure to get a list of how logins map to users and roles in databases. The query below will return a list of logins and what...
February 14, 2007 at 8:30 am
Kenneth
Some DDL would have been helpful. Still, here's a guess. Despite the title of the thread, you don't need a loop - you can do it with a set-based query.
February 12, 2007 at 9:34 am
February 9, 2007 at 3:39 am
Alex
That behaviour is typical of SQL Server. It grabs all the memory it can and only gives it back if another process requires it. If you find that there's contention...
February 9, 2007 at 1:55 am
Could it be that you have a case-sensitive collation, so that when you do SELECT * FROM sysobjects WHERE name = 'MYTABLE' and xtype = 'U', it doesn't return anything...
February 7, 2007 at 10:10 am
SELECT
[name]
,[enabled]
,[description]
FROM [msdb].[dbo].[sysjobs]
February 7, 2007 at 9:31 am
This should do it for you.
UPDATE PRODDTA.F0911
SET [GLREG#] = 0
WHERE GLLT = 'AA' AND GLPN = 12
AND GLCTRY = 20 AND GLFY = 5
The reason your update...
February 7, 2007 at 9:20 am
Imke
This query returns the data and log size for all databases on the server, right? But it only provides a snapshot of the sizes at the time the query is...
February 7, 2007 at 8:09 am
Viewing 15 posts - 6,541 through 6,555 (of 7,185 total)