Horrible Experience With Xp_cmdshell - Your Comments Please

May 21, 2008

I had a nerve-wracking experience with xp_cmdshell today.

In SSMS, I ran a command to "cd" to a directory, then "rename" some files in that directory. I made the ignorant mistake of running the commands separately - NEVER NEVER DO THIS.

What happened was, by the time I ran the "rename" command it defaulted to the "system32" directory and started renaming files there instead... talk about !!$#*@(!-up!

Has any ever done this, or heard about this horrible experience before? I am trying to document cases of this, so that I don't look like the complete idiot that I am.

View 2 Replies


ADVERTISEMENT

Horrible Table Needs Help

Feb 12, 2008



I'm having a problem normalizing this table that I have. I know I'm breaking the rules by having redundant data in the same table but I'm not sure how I'm going to calculate a penalty and find the total score. Can some lead me in the right direction fix this table for me?






Code Snippet
USE [aidms]
GO
/****** Object: Table [dbo].[PerfOrder] Script Date: 02/11/2008 16:40:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PerfOrder](
[PerfOrderID] [int] IDENTITY(1,1) NOT NULL,
[ShowID] [int] NOT NULL,
[DivisionID] [int] NOT NULL,
[OrganizationID] [int] NOT NULL,
[PerformanceShiftID] [int] NOT NULL,
[Cancelled] [bit] NOT NULL,
[DateRegistered] [datetime] NOT NULL,
[PerformanceTime] [datetime] NOT NULL,
[ReadyToBeJudged] [bit] NOT NULL,
[FirstJudgeID] [int] NULL,
[FirstCaptionID] [int] NULL,
[ScoreA1] [decimal](18, 0) NULL,
[ScoreB1] [decimal](18, 0) NULL,
[SecondJudgeID] [int] NULL,
[SecondCaptionID] [int] NULL,
[ScoreA2] [decimal](18, 0) NULL,
[ScoreB2] [decimal](18, 0) NULL,
[ThirdJudgeID] [int] NULL,
[ThirdCaptionID] [int] NULL,
[ScoreA3] [decimal](18, 0) NULL,
[ScoreB3] [decimal](18, 0) NULL,
[PenaltyScore] [decimal](18, 0) NULL,
[TotalScore] [decimal](18, 0) NULL,
CONSTRAINT [PK_PerfOrder] PRIMARY KEY CLUSTERED
(
[PerfOrderID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: ForeignKey [FK_PerfOrder_Captions] Script Date: 02/11/2008 16:40:55 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Captions] FOREIGN KEY([FirstCaptionID])
REFERENCES [dbo].[Captions] ([CaptionID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Captions]
GO
/****** Object: ForeignKey [FK_PerfOrder_Captions1] Script Date: 02/11/2008 16:40:55 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Captions1] FOREIGN KEY([SecondCaptionID])
REFERENCES [dbo].[Captions] ([CaptionID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Captions1]
GO
/****** Object: ForeignKey [FK_PerfOrder_Captions2] Script Date: 02/11/2008 16:40:56 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Captions2] FOREIGN KEY([ThirdCaptionID])
REFERENCES [dbo].[Captions] ([CaptionID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Captions2]
GO
/****** Object: ForeignKey [FK_PerfOrder_Division] Script Date: 02/11/2008 16:40:56 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Division] FOREIGN KEY([DivisionID])
REFERENCES [dbo].[Division] ([DivisionID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Division]
GO
/****** Object: ForeignKey [FK_PerfOrder_Judges] Script Date: 02/11/2008 16:40:57 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Judges] FOREIGN KEY([FirstJudgeID])
REFERENCES [dbo].[Judges] ([JudgeID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Judges]
GO
/****** Object: ForeignKey [FK_PerfOrder_Judges1] Script Date: 02/11/2008 16:40:57 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Judges1] FOREIGN KEY([SecondJudgeID])
REFERENCES [dbo].[Judges] ([JudgeID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Judges1]
GO
/****** Object: ForeignKey [FK_PerfOrder_Judges2] Script Date: 02/11/2008 16:40:58 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Judges2] FOREIGN KEY([ThirdJudgeID])
REFERENCES [dbo].[Judges] ([JudgeID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Judges2]
GO
/****** Object: ForeignKey [FK_PerfOrder_Organization] Script Date: 02/11/2008 16:40:58 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Organization] FOREIGN KEY([OrganizationID])
REFERENCES [dbo].[Organization] ([OrganizationID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Organization]
GO
/****** Object: ForeignKey [FK_PerfOrder_PerformanceShift] Script Date: 02/11/2008 16:40:59 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_PerformanceShift] FOREIGN KEY([PerformanceShiftID])
REFERENCES [dbo].[PerformanceShift] ([PerformanceShiftID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_PerformanceShift]
GO
/****** Object: ForeignKey [FK_PerfOrder_Show] Script Date: 02/11/2008 16:40:59 ******/
ALTER TABLE [dbo].[PerfOrder] WITH CHECK ADD CONSTRAINT [FK_PerfOrder_Show] FOREIGN KEY([ShowID])
REFERENCES [dbo].[Show] ([ShowID])
GO
ALTER TABLE [dbo].[PerfOrder] CHECK CONSTRAINT [FK_PerfOrder_Show]
GO

View 2 Replies View Related

A Horrible (well, I Think So) Recursive Join...

Apr 2, 2008

Hi,

I have been trying to solve this issue for around 8 hours, now. Can someoone help me?

I have two tables:

Employee (
EMPLOYEE_ID INT PRIMARY KEY,
NAME VARCHAR(25)
)

E.G.:

1 Mark
2 Tracey
3 Jim

STRUCTURE (
SUPERVISOR_ID INT,
SUBORDINATE_ID INT
)

E.G.:

1 3
2 3

I need to get a query that gives me the following query:

SUPERVISOR_ID, SUPERVISOR_NAME, SUBORDINATE_ID, SUBORDINATE_NAME

I think that the SQL is going to go recursive and I think that this can be done reasonably easily (sadly, I have struck out so far), but how?

Thanks in advance,


QuietLeni

View 7 Replies View Related

How Can I Display No Comments If There Is Not Any Comments ??

Oct 1, 2007



Hi all,

I have state, day_date, error, and text column. If there is data then it is showing all the columns. But if there is no comments I would like to show no comments in the text field. Currently I have this store procedure.




CREATE PROCEDURE dbo.up_daily_quad_text

@DAY_DATE datetime



AS

BEGIN

SELECT

dbo.adins_database.ZONE_NAME + ', ' + dbo.adins_database.ZONE_STATE AS [STATE AND LOCATION],

dbo.COMMENT_CATEGORY.NAME,

dbo.COMMENT.TEXT

FROM

dbo.adins_database,

dbo.COMMENT_CATEGORY,

dbo.COMMENT,

dbo.DIM_DATE

WHERE

( dbo.adins_database.adins_id=dbo.COMMENT.adinsdb_id OR (dbo.COMMENT.adinsdb_id is Null) )

AND ( dbo.COMMENT.comment_dt=dbo.DIM_DATE.DAY_DATE )

AND ( dbo.COMMENT_CATEGORY.category_id=dbo.COMMENT.category_id )

AND

dbo.DIM_DATE.DAY_DATE = @DAY_DATE

END

GO

GRANT EXECUTE ON dbo.up_daily_quad_text TO AdIns_SSRS

GO




How can I modify do that.

Thanks

Rozar2007

View 7 Replies View Related

Horrible Report Rendering Performance

Feb 11, 2008



Hello! We are having a strange problem with Reporting Services 2005. Our RS server is located in a DMZ with the supporting RS database housed in our internal network. We have a batch of reports that perform well when rendering to browsers in our internal network. However, when accessing these same reports externally, the reports take a very long time to render. The difference between internal vs. external is huge; we are looking at maybe a minute tops to render the report from an internal browser vs. 10-15 minutes from an external client browser. The website and reports are setup for anonymous access, so it shouldnt be an authentication problem.

The RS execution log doesnt indicate much difference between the two. The data retrieval does take a little longer (only a second or two), according to the log, for an external request. But still, the times recorded in the Execution Log dont match at all what we are experiencing for external requests.

The various logs, both for reporting services and IIS arent picking up any anomalies either and Im at my wits end as to what else I can use to try and troubleshoot this problem. Has anyone seen this behavior before, or have any ideas what might shed some light on this?

View 2 Replies View Related

Horrible Performance Connecting To A Remote Sql Server...how Can I Fix It?

Apr 11, 2007

Hello, I have a sql server installed on a server in my server room.



The problem I have is that when I try to connect to the server, it takes a loooooooooong time to open the connection. Even when connecting through the Sql Server Management Studio it takes about 30 seconds just to open the connection.



Can anybody help me with some pointers on how to troubleshoot this issue? It only happens with this specific server



It might be a configuration issue, but where can I find information on how to configure it correctly?

View 2 Replies View Related

Pls Share Your Experience With SAN's

Jan 26, 2001

Is anyone using sql server 70 or 2000 and a EMC or LSI Metastore SAN? If so, I would like to know how things are going for you. We are currently evaluating both of these products and will be making a decision as to which we will purchase in February. Please advise if you have anything positive or negative to offer.
Thanks.
Gail Wade
gwade@it.rjf.com

View 1 Replies View Related

T-SQL XML Experience??? (repost)

Nov 14, 2007



Hi all,
I have posted a thread on the XML forum but its not getting much traction there so I'm posting a link to it from here hoping that more people will pick it up. Hope that's OK.

I have a problem with a T-SQL query involving XML that is taking FAR too long to run.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2404607&SiteID=1&mode=1

-Jamie

View 1 Replies View Related

Database Experience With Sharepoint?

Apr 14, 2008

It looks like I'll be assigned with development and database management utilizing Microsoft Office Sharepoint Services and saw that there are some issues as it can become quite unwieldy.

I was wondering what difficulties to expect from MOSS and/or Sharepoint in terms of managing and backing up. Any tips or suggestions?

View 2 Replies View Related

Experience Of Changing Sortorder

Oct 20, 1998

Hi!

I have 1 sql server 6.5 sp3 with wrong sortorder, is there anyone who can give some feedback of this job.

- How to?
- What issues should i have in mind?

Thanks in advance

Fredrik

View 2 Replies View Related

Experience With Torn Pages?

May 15, 2002

Does anyone have any experience detecting and repairing torn pages? Does Optimization repair Torn Pages ? Any help or resources would be much appriciated.

Late
Matt

View 1 Replies View Related

SQL 2K5 Replication With DB Mirroring - Any Experience?

Feb 14, 2008

Looking for anyone that has had any experience with using SQL Merge replication while mirroring the publisher database. Thinking about doing this as a recovery plan in the event of a publisher failure.

Any advice would be appreciated.

Thank you!

View 3 Replies View Related

Please Share Your Valuable Experience

Nov 21, 2007

I have SQL Server 2000 database involving voluminous data spread across different locations in a state. The database involves lot of transactions. The database involves tables storing photo images and thumb impressions along with the textual data and other needed information in a single table. I have a application accessing and updating about 5 tables and reading most of the master tables. I need a strategy to design the database such that performance improves. Once the photo and thumb are inserted for a particular party it is not required for retrieval immediately at any circumstance. In this scenario how should I design the database and keep data volume in check. Can I archive photo and thumb impressions in CDs. Will it be reliable and feasible. Please clarify on this issue. Please share your valuable experience. Only insertions involved in the partyinfo table having Photo and Thumb impressions. Later the table is only used to fetch the data of party other than Photo and thumb.

View 3 Replies View Related

Any Experience With 2005 Sp2 Hotfixes

Jan 15, 2008

I am currently at build 9.00.3054.00 and I'm having some strange
performance problems.. inserts hanging etc.....

Has anyone applied build 3175 or 3215 with good results....

any input is appreciated!

View 1 Replies View Related

"Production Support Experience" In SQL Server

Jun 29, 2000

IN ONE OF THE ADVERTISEMENT I SAW, IT SAYS "WE NEED PRODUCTION SUPPORT EXPERIENCE". AND MINIMUM CRITERIA IS, HE/SHE SHOULD BE A SQL SERVER DBA.

My Question is, what do we mean by "PRODUCTION SUPPORT IN SQL SERVER".

Can anyone give a good explantion on that, please?. Thanks in advance.

Srinivasan.

View 1 Replies View Related

Backup Plan Reccomendations For User With ZERO Experience.

Aug 15, 2007

Hello all, I was just awarded the job of maintaing the database serverfor our company. I have basically ZERO experience using MS SQL Server2000. Can anyone point me in the direction of a good resource forcreating backups of our database? I would love something that comeswith a gui that really simplifies the process; seeing as how i havenever even opened the MS SQL program.Our database is fairly small we have 7 users with access to thedatabase. That is it.any advice or good resources would be greatly appreciated.

View 2 Replies View Related

My First Experience Distributing The New-built Sql Db Onto Client Machine?

Dec 14, 2005

hi i am new to mssql db stuff. I just developed my first VB.NET application and it uses a mssql database which is hosted locally on my development machine. I built the deployment msi file for my application which can be installed easily on client machine, but have no idea how to move the mssql db with it.

View 1 Replies View Related

Has Anyone Had Any Experience With This Feature? Microsoft Provide A Sample C++ Prog

Apr 29, 2004

I am using SQL 2000 running a couple of large (up to 70GB) databases. I am currently backing up to disk, which is working fine.
I now want to backup the databases using the Snapshot feature of my storage array. To do this however, I first need to put my databases (3 of them) into 'backup mode', so as to stop transactions being written to the database, and provide a consistent database to backup.
Has anyone had any experience with this feature? Microsoft provide a sample C++ program called snaphot.cpp that puts a single database into 'backup mode'. I am not particularly clued up on C++. Can multiple databases be put into this mode simultaneously? Is this particularly difficult to do?
Any help would be greatly appreciated

View 1 Replies View Related

Experience A Hard Time To Connect To The Database My Dbase Is Sql Express Ed 2005

Aug 8, 2006

hi to all , well i succesfully installed SQL server 2005 express edition in windows 2000 however when i am trying to connect my program thru ODBC im having a difficulty to connect. but based on my observation if i am not connected to the internet i cannot connect to my database but if i am connected to the internet i could access the SQL server 2005 express edition.i have read the hardware requirements for SQL server 2005 express edition i have upgraded the IE5 into IE6 SP1,windows 2000 SP4, even my memory to 1GB.but still i have the problem.

my question is, do i have to maintain my connection to the internet for me to have a smooth SQL connection?

BTW, i badly need the answer.Bigthanks!



-gae-

View 1 Replies View Related

SQL 7.0 SP1 Is Out. Comments?

Jun 7, 1999

Well, the time is here, SQL 7.0 Service Pack 1 is out.

I'm sure the bravest of us have already fetched and installed it. (I'm currently downloading it myself)

Any problems so far everyone? I'd really like to hear from anyone running 7.0 SP1 on a big alpha system.

Anthony B. Kenitzki

View 1 Replies View Related

Comments In SQL

Nov 15, 2006

Hi,

I am new to MS SQL Server 2005. I used MySQL.

Now my doubt is how to put a comment in SQL statement, where i am using query editor in SQL Management Studio.

Rgds.,

Aazad

View 1 Replies View Related

Comments

Mar 1, 2007

hi

how can i put comments in rdl (XML)???

Thanks

View 1 Replies View Related

Comments Table Help

Jun 28, 2007

Hi everyone.  I've taken a while off of developing site in ASP.net but had a site that I wanted to upgrade a little, but needed a little help.What I have currently is a website of a person with videos and images of that person.  To view the videos, I have a "view_video.aspx?ID=" page that plays the video from YouTube by looking my database for the ID, YouTube URL, Name, and Description.  What I want to do is create a "comments" table for visitors to add comments for each video and then display all comments on the page.So far, my "comments" table looks like this. ID, otherID, name, email, comment, type, date.The ID is the id of the comment, otherID is the foreign key to the "videos" table, the name is the name of the person leaving the comment, e-mail is for the person, comment is the text, type is the type of video (tutorial, sampler, random video), and date is a timestamp for when users leave the comment.So hopefully I have a good start.  I don't have any code to show right at the moment for I am at work, but if anyone has any ideas or critiques so far, I'd love to hear them.  This is an interesting project for my friend and I'd love to implement this sometime.Thanks,TetrisSmalls 

View 1 Replies View Related

Getting Table Set Up For Comments

Mar 10, 2004

I am working on a project that lets visitors to my webpage post comments. I have there name, city, etc. stored into an sql database. This all works until I put text into the comments field of my form. I get this message when it is trying execute -- String or binary data would be truncated. I was wondering what data type to use, I have used char and varchar and neither one is working. Is there anything else I could try to fix this.

View 1 Replies View Related

SP3 Comments Needed

Sep 26, 2001

Anyone using SQL 7.0, SP3 on production ? Any comments
on the upgrade from SP2, any quirks, gotchas that you
experienced?

Any input appreciated!

thanks!
Bruce

View 1 Replies View Related

Can A Field Have Comments ?

Jan 20, 2000

We're migrating from Access to MS SQL server 7.0
Inside the edit of an Access tables; the Description column can also be used to place comments other then the description of the field,
ie. explanation of field's use
pay payrate per hour in USD
or allowed values
status O=open, C=closed
I can not find something similar inside SQL 7.0.
If this option is not available, what other alternatives are there ?

Patrick

PS. what is the CTEXT field inside the SYSCOMMENTS table ?

View 1 Replies View Related

Table Comments

Jun 4, 2002

Has anyone discovered how to store table and column comments inside SQL Server 2000? It was supposed to be an added feature with 2000.

thanks!

View 1 Replies View Related

How Do I Set Up User Comments

Sep 16, 2007

I am trying to plan out a database that will have users and comments on those users. How should I structure this? Should each comment be attached to the user it describes or should each user have a list of the comments that describe it?

View 5 Replies View Related

Some Comments On DTS Package

Jul 23, 2005

On quick observation, it seems to me DTS has a strange way tointerprete File System. ENV: NT OS, SQL Server 2000.When a data import package (source point to c:XYZdir) is executed atEM level, sql server seems to think the "c:XYZdir" is the currentuser's "c:XYZdir", however, if the same package is scheduled as a joband executed as a job, then, sql server seems to think the "c:XYZdir"is THE SQL SERVER INSTALLTION MACHINE's C:XYZdir. It's quiteinconsistent. Please let me know your finding about this.Also, I use ActiveX scripts to perform exception handing (errorchecking) for certain transaction. For instance before a packageimports a file an ActiveX script checks source file's existence andformat, if not as expected halt here (not to execute the package).Now, the two cases of (a) file not exist; and (b) incorrect file formatcan't be determined by not running the package. Probably, the ActiveXscript should capture each case by creating a record/row during thefile checking. What's your thought?TIA.

View 4 Replies View Related

SSIS Comments

Jul 20, 2007

Hi all,

i am not sure is it have the way to comments some process on the package.



Thanks,

View 4 Replies View Related

Read Before Committed, Comments?

Mar 10, 2000

Consider this example please.
BEGIN TRAN
insert into OrderDetail (fields) VALUES (values)
insert into Orders (fields) VALUES (values)
COMMIT TRAN

If there is a trigger on Orders that takes some fields from OrderDetail and puts them into some other table.

When the trigger fires, can it find the details if the COMMIT has not occurred yet.

I'm wondering If I should use isolation level READ UNCOMMITTED.
After all, If the whole transaction rolls back, my trigger activity will be rolled back as well. Comments?

View 1 Replies View Related

Table Level Comments

Jul 13, 2004

Is there a way to add comments on a table in sql server?

View 14 Replies View Related

Adding Comments To Metadata

Mar 15, 2008

Did some searching and didn't seem to find what I'm looking for. I'm pretty new to SQL Server (most of my experience is on DB2 for z/OS).I'm building some new tables, and want to find a way to add comments to the metadata for the column. In DB2 the syntax is:COMMENT ON COLUMN TB_CREATOR.TB_NAME.COLUMN_NAME IS 'comments here';ORCOMMENT ON TB_CREATOR.TB_NAME (COLUMN1 IS ' comment here',COLUMN2 IS ' comment here', );Is there anything like this in SQL Server?Thanks!

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved