Viewing 15 posts - 196 through 210 (of 211 total)
Glad to help. As with all things, practice makes perfect.
_____________________________________________________________________
- Nate
September 10, 2008 at 5:54 am
This code snippet might work for you.
create table #tbl (imagefile varchar(50), location varchar(50))
declare @filename varchar(50)
, @sql varchar(255)
insert into #tbl (imagefile, location) values ('C:\Images\0\1.tif', 'backup')
insert into #tbl (imagefile, location) values ('C:\Images\0\2.tif',...
_____________________________________________________________________
- Nate
September 9, 2008 at 3:17 pm
You could also create views in the current db that union tables across dbs (assuming they have the same structure).
create view1
as
select * from db1.dbo.tblname
union
select * from db2.dbo.tblname
_____________________________________________________________________
- Nate
September 8, 2008 at 8:38 am
This might be causing your problem
FROM BOL (DBCC SHRINKFILE):
If target_size is specified, DBCC SHRINKFILE attempts to shrink the file to the specified size. Used pages in the part of the...
_____________________________________________________________________
- Nate
September 5, 2008 at 10:01 am
Use the fully qualified name in your FROM clause: [dbname].[owner].[tblname]
_____________________________________________________________________
- Nate
September 5, 2008 at 6:22 am
I've unfortunately had to do this a number of times against a legacy db I inherited.
I usually start off by checking for occurrences in the syscomments table and then wade...
_____________________________________________________________________
- Nate
September 5, 2008 at 6:17 am
I would just schedule a job executing xp_cmdshell.
_____________________________________________________________________
- Nate
September 4, 2008 at 7:04 am
Orlith (8/26/2008)
HiI found a solution ,perhaps not the perfect one 🙂 but it works now.
Functional always trumps elegance!
_____________________________________________________________________
- Nate
August 26, 2008 at 6:26 am
Try replacing
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
with this
SELECT TABLE_SCHEMA + '.' + TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
_____________________________________________________________________
- Nate
August 26, 2008 at 6:22 am
Server role dbcreator grants a user the ability to create, alter, and drop databases. This would give them access to modify any database on the server.
Database roles db_owner and db_ddladmin...
_____________________________________________________________________
- Nate
August 26, 2008 at 6:12 am
Sergiy (8/25/2008)
So, clustered indexes must be processed first. I don't see where your script takes...
_____________________________________________________________________
- Nate
August 25, 2008 at 12:20 pm
If you're interested, here's a script we run over the weekend (downtime) to identify and defrag indexes. It uses extent switching and logical scan fragmentation as the defrag indicators.
Comments are...
_____________________________________________________________________
- Nate
August 25, 2008 at 5:51 am
You could add a LIKE filter on the TextData column for %insert% and %update%.
_____________________________________________________________________
- Nate
August 21, 2008 at 6:14 am
The job runs under the account that started the SQL Server Agent service. Make sure that that account has adequate rights to run the DTS and has access to the...
_____________________________________________________________________
- Nate
August 20, 2008 at 2:46 pm
Working from your example, something like this might work:
declare @col1 int, @col2 int, @col3 int
declare @tbl table (col1 int, col2 int, col3 int)
insert into @tbl values (1, 0, 0)
insert into...
_____________________________________________________________________
- Nate
August 20, 2008 at 2:26 pm
Viewing 15 posts - 196 through 210 (of 211 total)