Hello guys, I am having a bit a challenge with some distributed transactions. This particular error is quite well documented on the Web, but nothing appears to help me with my particular issue.
I am attempting to run the following bit of code within a trigger from Server A, to insert a row into...
I am running SQL Server 2000 Standard Edition, Service Pack 3 on MS Windows Server 2003 Standard Edition.
I set up a maintenance plan using the 'Create a Maintenance Plan' wizard to run scheduled database and log backups. The jobs fail however with the following error in the job history...
Hello guys,
I'm having a little problem...
When exporting a table to a text file using DTS, the columns are getting truncated at 256 bytes.
The 'Maximum characters per column' setting is set at 8000 bytes.
I'm sure I've come across this before, but can't for the life of me remember the...
I am trying to run a simple selection of a Visual Foxpro Table, from SQL Server using the following:-
select a.*
from openrowset('MSDASQL',
'DRIVER={Microsoft Visual FoxPro Driver};
SourceDb = c:\<path>\; SourceType=DBF;',
'SELECT top 10 field1 FROM table ORDER BY 1 ') as a
The .dbf in...
I am using SQL Server 2000, and am trying to run the following command:
execute master..xp_cmdshell 'dir g:\'
The 'g' drive on the SQL Server points to a server at a co-location via a VPN.
When I run the above commmand, I get the following error message:
output...
I am trying to attach a database to one server from another with this code...
declare @prm_allocserver varchar(20)
set @prm_allocserver = '<servername>'
declare @prm_drive char(1)
set @prm_drive = 'D'
declare @sql varchar(1000)
select 'Attaching <Databasename> to Allocated Server'
set @sql =...
Does anyone know how to attach a database TO another server? I am currently writing an SP that will (hopefully) detach, move and re-attach a database from one server to another. The last bit is causing me problems though.
I can attach a database FROM another server by executing the following...
I am having a few problems with importing date fields depending on whether the data is from a text file or an excel file ( with it's own column settings ).
I have reasoned that the solution lies with the default date settings in SQl Server (2000).
Using 'set dateformat', I set the format to...
I need to update TABLEA with a value where the uin is in TABLEB OR TABLEC OR TABLED. I have used left outer joins to do this.
This query is taking a huge amount of time to run, even though the correct indexes are present.
Is there a simple way around this problem without having to use legacy...
Does anyone know why the text in my results pane seems to been returned with the data 'on top' of each other. It is ok when returned in a grid ?
I am using 'Courier New' as the font
Does anyone know of an intuitive algoritm (text) that I can use to write a procedure that strips out the Page Id from the first field in sysindexes ? I need this in order to be able to use DBCC Page
There is no info in BOL, and the hard copy books I have seem to contradict each other.
Thanks...
Hi,
I am trying to run the following batch within SQL2000:
declare @cmd varchar(100)
set @cmd = 'dtsrun /s servername /u username /p password /n my_dts'
execute master.dbo.xp_cmdshell @cmd
And keep getting the following error message:
output...
I have a text file in a fixed field format. Out of the 400 or so fields within the table, I need to provide only 4.
The first 3 fields make up a unique identifer for each record.
In order to do this, I have worked out the byte position for each field needed within the text file, and have...
Does anyone know of a way of returning the date an object was last updated ? ( without having to use the transaction log )
There doesn't seem to be anything useful within the sysobjects table
I am trying to run a simple query over a datestamp field defaulted with getdate(), using the convert function:
select convert(varchar(10),datestamp,103), count(*)
from table
group by convert(varchar(10),datestamp,103)
order by convert(varchar(10),datestamp,103)
The problem is that the...
Could any one who is mad enough to be working today please tell me how I can convert an existing column within a table to a computed column (sum of several other columns), without dropping and adding the column again ?
Without using security controls, how can I 'lock' certain columns on a table - from being deleted or updated ?
I can't work out a way of using triggers or constraints to do this.
Can anyone help ?
I need to be able to derive a single name field from 4 other fields. If I do the following as an example:
declare @title varchar(20)
select @title = 'Mr'
declare @inits varchar(20)
select @inits = 'J'
declare @forename varchar(20)
select @forename = ' '
declare @surname varchar(20)
select...
I need to be able to assign either one of two values to a local variable in a stored proc depending on what is returned from a boolean type statement.
Basically if this statement returns true:
if exists
(
select sc.*
from syscolumns sc
inner join sysobjects so on sc.id = so.id
where...
I need to be able to print a message to the screen in query analyser at the beginning of a stored proc. The message however only appears once the batch has finished running. How can I ensure that the message appears as soon as the procedure is executed ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.