We need to be able to script objects (tables, user functions, stored procedures) with the below structure:
if exists(---) then drop procedure xxx
create procedure xxx
This is available in SQL Server 2000, but I have not been able to do it in SQL Server 2005.
It seems SQL Server 2005 has
alter...
Thank you Denis, your script (SQL statements) are just what I needed.
Perfec-chi-onnn
I had already found the 'magic button'. I need to be able to automate the process, and your script provides me w/the building tools to accomplish that.
Thanks again
I am able to enable xp_cmdshell in SQL Server 2005 Express by going to Start / All Programs / Microsoft SQL Server 2005 / Configuration Tools / SQL Server Surface Area Configuration.
However - I need to be able to enable / disable xp_cmdshell using scripts. We build service packs that go over...
We have a significant investment in using BCP in SQL Server 2000 installations. We need to continue use of that code in SQL Server 2005 installations. I am trying to get our BCP code to work on SQL Server 2005 Express. Below is an example:
exec master.dbo.xp_cmdshell 'bcp "SELECT * FROM...
I have just changed the app (VB6 program) to ignore the particular "error" - in error handling just saying "if err.number = xxx and err.description = xxx then resume next".
Thanks everyone for the helpful posts.
Our software runs on SQL Server 2000. One of the stored procedures executes sp_rename to rename columns in a table.
When running the sproc in Query Analyzer the message appears "3604 - Caution: Changing any part of an object name could break scripts and stored procedures."
When the VB6...
The "Create Group Tree" button under File / Options is for new reports, I guess, as it has no effect on existing reports.
The 'Create Group Tree' button under File / Report Options does affect an existing report. However, if you uncheck it and save the report, then when you generate the...
The below code allows me to control whether the "group tree" button appears when viewing a report.
Set mCrystalReport = mCrystalApplication.OpenReport (pRpt.ReportFileName & ".rpt", crOpenReportByTempCopy)
With mCrystalReport
--
If Report = "RSM6000" Then...
Zhavic -
Thanks for your reply. Evidently the DB was too hosed for your recovery script. I tried it, but got back null for the ID of the stored procedure in question. We could not manually update or delete the sysobject record for that particular object. We could change others but not that...
I get the below message block when I use Query Analyzer to alter stored procedure spCommon_OTCList_IDString.
Server: Msg 644, Level 21, State 3, Procedure spCommon_OTCList_IDString, Line 100
Could not find the index entry for RID '167a662d18100' in index page (1:698), index ID 0, database...
The script, at first blush, appeared to work properly. However, it would only get a small amount of the actual text of the object. And on the portion that it did get, all carriage return and line feed info was dropped, so it would be all one long line..
You have been a big help, because...
Earlier I started the below thread:
> When running large scripts I often get the "cannot >update sysdepends table ---" message. Because of this I >cannot trust the "system dependencies" as displayed for >objects by Enterprise manager.
> Is there a way to ask SQL...
When running large scripts I often get the "cannot update sysdepends table ---" message. Because of this I cannot trust the "system dependencies" as displayed for objects by Enterprise manager.
Is there a way to ask SQL Server 2000 to update the system dependencies? I...
Table variables did not work for me until I started using an alias for the table variable when I had to qualify column names of a table variable.
Look at the UPDATE @myTable statement, where the INNER JOIN refers to tblTable.Field1, and tblTable is the alias for table variable @myTable. If...
Thanks for replying to my post. I passed the date as a string, as below:
crpt_Stupid_Report.ParameterFields(0) = "stupidParameter;the stupid parameter value;TRUE"
crpt_Stupid_Report.ParameterFields(1) = "@passedType;C;TRUE"
crpt_Stupid_Report.ParameterFields(2) =...
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.