Getting A SQL Expert To Review SQL Server And DB?

Apr 3, 2007

Hi,

I posted last year when we were having problems with a new SQL box we had moved to here...

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=74650

...we coded round most of the issues and deadlocks and things seemed to improve for quite a while but we have recently run into performance problems again of late.

The CPUs on our SQL box often thrash away at 100% and our ColdFusion website has begun running painfully slow.

Our developers/hosts have suggested we might need to look for a 3rd party SQL guru who could look at the SQL box, do some tracing etc. and perhaps make some recomendations around optimising the DB architecture or changing the way we run certain queries. At the moment we have only gut instinct on which bits of the DB are likely to be being hit most hard.

Our website has grown from being very small to being really quite busy and it's possible we are running into shortcomings with the design of the DB that need to be tackled before we can expand further.

I'm not sure what the protocol is (I see there is a Jobs part of the site) but I wondered about the possibility of getting one of you guys in for a short while to review our server and database, for a fee of course. I'm not sure how long it would take to review that kind of data and get a feel for the usage?

We are based in the UK and whilst I guess it could be done remotely it might be easiest if the person was UK based too.

I'm as much interested in feedback about the idea (it might be not workable/a good idea for example) as I am to people offering their services.

If this post breaks any rules please let me know.

Cheers,

Tem

View 18 Replies


ADVERTISEMENT

SQL Server 2008 :: Review Data Type Mapping (Import And Export Wizard)

Jun 5, 2015

Not seeing the Review Data Type Mapping Screen in SQL Server Import and Export Wizard?

Is there only a certain version where that screen shows up?

I am trying to import data from an MS Access application to SQL Server and all of the connections are good, but some of the data isn't and if I let it migrate using this tool it crashes on the bad data and there is no data that migrates. The Review Data Type Mapping screen will allow me to bypass the records in error and load the rest. however, I can;t do that if I cannot see the screen.

View 9 Replies View Related

MDX Training : Need Review

Apr 13, 2004

Hi Gurus ....

Planning for a MDX Training for me and my development team ...
The following has been proposed for a training course spread over three days ...

I need to know whether this will be enough or should some more things be added on to the same (anything that has been missed)...

I have the option of removing and adding from the list.


Module 1: OLAP Review

OLAP Databases
OLAP Definitions
Warehouse Data Flow

Module 2: MDX Foundations

The Role of MDX
MDX Member Names
Using the Calculated Member Builder
Working with Calculated Members

Module 3: Using MDX Expressions

Displaying Member Information
Displaying Family Tree Relatives
Working with Member Properties
Using Conditional Expressions

Module 4: Retrieving Values from a Cube

Understanding Multidimensional Coordinates
Retrieving a Value from a Cube
Percent of Total Calculations
Growth Calculations

Module 5: Creating Simple MDX Queries

Understanding MDX Query Statements
Creating Simple MDX Query Statements

Module 6: Creating and Manipulating Sets

Using Set Creation Functions
Using Set Manipulation Functions
Using Subquery Set Functions
Working with Dimension Interactions

Module 7: Using Aggregation Functions

Understanding Aggregation Functions
Using Time Set Functions
Calculating a Trend

Module 8: Case Study - Implementing Budget Allocations

Allocating Values from a Grand Total
Allocating Values from a Subtotal
Allocating Values Across Multiple Dimensions

Module 9: Using Calculated Cells



Respose needed urgently since I have to get back to the training team by tomorrow morning

View 8 Replies View Related

Please Review This UPDATE Sql Statement For Me

Mar 27, 2008

Thanks for looking at this for me. Here is the SQL Script as it stands so far. 
UPDATE    TableImportHistorySET ImportStopTime = CONVERT(numeric, GETDATE(), 108), Elapsetime = CONVERT(numeric,GETDATE(), 108) - CAST((SELECT TOP 1 ImportStartTime FROM TableImportHistory  WHERE     TableName = 'ARCHRG'ORDER BY DataImportID DESC) AS numeric), Successful = 1WHERE (DataImportID = (SELECT TOP 1 DataImportID AS LastID FROM TableImportHistory WHERE TableName = 'ARCHRG') ORDER BY DataImportID DESC))
The Elapetime update portion of this statement is where I'm getting stuck (if I take it out the statement works) 
I get the error "ERROR converting Data type NVARCHAR to Numeric" I've changed the data type in the Table from numric to varchar, nvarchar, decemial nothing works and not sure what I should set the Starttime and StopTime datatypes in the table to (any suggestions please)
Elapsetime = CONVERT(numeric,GETDATE(), 108) - CAST((SELECT TOP 1 ImportStartTime FROM TableImportHistory  WHERE     TableName = 'ARCHRG'ORDER BY DataImportID DESC) AS numeric) 
Are there better ways to do this statement?
 
Thank you in advance
Rex

View 4 Replies View Related

Need Consultant Help For Architecture Review

Dec 18, 2007

Don't know if this is the appropriate forum. I am looking for an experienced SS consultant to review our setup, hardware architecture, recovery plan, and to provide high-level advice moving forward. My company is a CRM hosted software provider with a dynamic, metadata-based product built in Visual Studio 2005. Currently we run on SS 2000, but plan to migrate to SS 2005 or 2008. We anticipate quite a bit of growth and want to make sure that we are on the right path. Let me know if you are interested or know someone who is.

If I should post this elsewhere, let me know.

View 2 Replies View Related

1st Attempt, Designing, Would Like Somebody To Review And Critique It

Jan 23, 2001

Hello

This is my 1st attempt at designing a database, and I have not finished
it completely, but I would like somebody to review and critique for me.
I really don't want to make any mistakes with this and I would appreciate any expertise out there to direct, recommend, suggest improvements and/or changes, PLEASE.

Thank you for considering this,,,if you provide me with your e-mail, I can send you a script.

take care,
~Iris~
:)

View 1 Replies View Related

User Review Database Design

Apr 14, 2008

I involved in redesign a database for hotel review listing. My current hotel datatable below

Hotel
ID
HotelName
Description
Address
TotalRating

If I would like to extend the review feature in details based on each user comments for example
Overall 7
Rooms 6
Services 7
Food 8


Could anyone guide me how could I modify the table or add new table that allow me to do so.
Thank you

View 10 Replies View Related

Review Of DB Design - Normalized, Contraints, Foreign Keys, Etc.

Jul 2, 2004

First of all, this is my initial thread here on dbforums. I come from the land of Broadband Reports and would like to say, Hello fellow DB enthusiasts. :)

I'm not a novice to relational databases (Access MDBs), but new to implementing a db via SQL SERVER (2000 in this case) and using Access Data Projects.

My partial db schema is as follows:

participants
---DID (pk) char(1)
---LID (fk - schools) char(4)
---studentLast varchar(50)
---studentFirst varchar(25)

Sample Data would be
010191M001 | 5671 | SPARKS | JONATHAN
030495F283 | 5671 | DYLAN | CYNTHIA
=====================================

enrollhist (insert/update trigger for enrollactive)
---EID (pk - autonumber) bigint(8)
---EMID (fk - enrollmode) int(4)
---DID (fk - participants) char(10)
---LID (fk - schools) char(4)
---enrollactive bit(1)

Sample Data would be
38173 | 4 | 030495F283 | 9003 | 0
38266 | 3 | 010191M001 | 5671 | 0
39022 | 6 | 030495F283 | 9003 | 0
39036 | 5 | 030495F283 | 9003 | 0
39044 | 4 | 030495F283 | 5671 | 1
39117 | 4 | 010191M001 | 5671 | 1
=====================================

enrollmode
---EMID (pk) int(4)
---mode varchar(25)

Sample Data would be
1 | RECEIVED
2 | WAITING
3 | PENDING
4 | ENROLLED
5 | DROPPED
6 | TRANSFERRED
10 | ORPHANED
11 | DENIED
=====================================

schools
---LID (pk) varchar(4)
---CTID (fk - caltracks) char(1)
---AID (fk - agencies) char(1)
---SDID (fk - schooldist) char(1)
---COID (fk - countydist) char(1)
---sitename varchar(25)
---sitetitle varchar(75)

Sample Data would be
5671 | 3 | 2 | 1 | 4 | ASCOT | ASCOT AVENUE
9003 | 2 | 1 | 4 | 1 | ROWAN | ROWAN AVENUE
2865 | 1 | 3 | 2 | 3 | BRIGHT | BIRDELEE BRIGHT
=====================================

caltracks
---CTID (pk) char(1)
---legend char(4)
---trktitle varchar(15)
---trkcnt int(4)

Sample Data would be
1 | 9030 | 90/30 | 4
2 | CON6 | CONCEPT-6 | 3
3 | SNGL | SINGLE TRACK | 1
=====================================

agencies
---AID (pk) char(1)
---legend varchar(4)
---agencytitle varvhar(50)

Sample Data would be
1 | CRYS | CRYSTAL STAIRS
2 | MAOF | MEXICAN AMERICAN FOUNDATION
3 | PATH | PATHWAYS
4 | CCRC | CHILD CARE RESOURCE CENTER
5 | CHSC | CHILDREN'S HOME SOCIETY OF CALIFORNIA
==========================================

THE REMAINING "FKs" FROM SCHOOL ARE SIMILAR, as is other tables and their relationships. The design of the foreign keys were made using sql and the keyword "REFERENCES" and "FOREIGN KEY."

My questions are: :confused:
(1) Is the use of FK as a Constraint any different than using an INDEX and how?
(2) Should I Alter the Tables to include CASCADING Up/Down?
(3) Are the use of CHARs Ok for the Keys?
(4) Have I over/under-normalized any of the relationships?

View 4 Replies View Related

Creating Company's RDBMS Development Review Group

Feb 22, 2008

Hello,
I've proposed to the head of IT at my organisation to head an database development export group to:
- Provide assistance in improving the performance of existing relational databases
- Provide assistance for the development of new database, e.g. correct construction of indexes; data contention, etc.
- Creation of database development standards
- Enforce the above standards for new databases so that the database is not deployed to production servers until it passes the standards.

I'd really like this to be a success as it should improve our rather crappy databases, basically because the people currently creating the databases don't know much about relational design.

Can anyone please post their experiences of setting something like this up, or working on such an expert group where they work? I'd really like to hear the good and bad experiences and what and (what not) to avoid.

Thanks

View 2 Replies View Related

Is There A Way Using Sqlexpress To Review The Most Recent Set Of Sql Commands Submitted To A Database?

May 18, 2007

is there a way using sqlexpress to review the most recent set of sql commandssubmitted to a database?I remember something about setting up logging in sql server 2000, but don'tsee much about this on google or the news group for 2005.thanksJeff Kish

View 2 Replies View Related

Possible To Restore DB Files On Local Laptop To Review Code

Jun 29, 2015

I have an automation project to review the software. The software is using MSVS2012 and uses DBs from MSSQL2012.  Is it possible to restore the DB files on my local laptop to review the code completed thus far?  If so what other software would I need besides MSQLserver 2012 on my local laptop.   I'm able to use MSSQL server 2012 on my local laptop, but the DBs are on servers. 

View 4 Replies View Related

Please Test My Script To Analyze Table Keys (was Submitted For Your Review...:)

Feb 25, 2005

Here is a script I wrote that analyzes datasets and returns all the minimal composite and unary keys that uniquely identify records. I wrote it because I frequently have to analyze client spreadsheets and non-normalized data tables.

On my desktop server it took about two minutes to analyze 2000 permutations of a table with 50 columns and 5000 records.

Please try it out for me and let me know if it chokes on anything, or if you see any ways it could be improved!

View 8 Replies View Related

Need Tech Review Of MSSQL Backup Chapter For O'Reilly Book

May 28, 2006

My name is W. Curtis Preston, and I'm the author of "Backup & Recovery"(formerly "Unix Backup & Recovery") from O'Reilly & Associates.(http://www.oreilly.com/catalog/unixbr/ )We're updating the book for 2006 and adding a chapter on SQL Serverbackup and recovery. Someone has already written what appears to be astrong chapter. The problem is that I'm not qualified to review it,since I'm not that familiar with SQL ServerCan anyone in this group step up to the plate and review the SQL Serverchapter? You would be mentioned in the acknowledgments of the book andreceive an autographed copy of the book.We're looking for two tech reviewers.

View 1 Replies View Related

SSRS(2005) Print Review && Page Number Reset ?s

Sep 17, 2007

Hi,

I'm having 2 issues on my first "real" SSRS report.
1. How to do a print preview via the preview tab. For print rendering, I have no print preview button on the preview toolbar. Is this normal? MS documention said that there is a Print Preview button. (BOL May 2007 - Designing & Creating reports -> working with report designer -> debugging and Publishing reports (Print Preview)) This report will always be rendered via the printer and it is a "pain" to have to always print it to see changes. The print layout option comes up all black with nothing viewable.

2. How do I reset page numbers back to 1 for report groups? I see no option for this. My report group requires a new page and I want page numbering to start at 1 when the grouping changes.

Note: I'm running VS2005 via Vista (with VS2005 Vista fix installed). SQL2005 SP2 also installed.

Any advice on this will be appreciated. I've spent too much time already where this should be obvious.

View 2 Replies View Related

SQL PLUS Expert

Jun 14, 2002

I am looking into a position requiring "SQL PLUS Expert" - anbody out there heard of this - is it a querying tool a la query analyzer of PL SQL.

View 2 Replies View Related

SQL PLUS Expert

Jun 14, 2002

I am looking into a position requiring a "SQL PLUS Expert" - anybody out ther heard of this - is it a querying tool a la query analyzer or PL SQL ?

View 1 Replies View Related

SQL Expert Please Help!!

Dec 11, 2006

Hello,

Lets just say that I have really only logged into phpmyadmin once and messed up my forum.

What I was trying to do? Install a shoutbox (chatroom type software).
When I logged into phpmyadmin I clicked the phpbb_config tab on the left hand side. Then I clicked the SQL tab and pasted the code required for the shoutbox accordingly and hit the "Go" button. But what I did next is what created problems.

I thought I may have put extra spaces or loaded the code wrong in the SQL area because the shoutbox did not work properly after everything was installed. So while in phpmyadmin and after clicking phpbb_config agian, instead of hitting SQL, I hit the "Empty" button thinking that I could just erase what I had previously inserted and then try inserting it again to make sure the code was inserted properly.

If you havn't figured it out by now, I clearly don't have a clue what I am doing, what exactly I did, or what I can do to fix it.

Click on the link to see the error..

http://www.cflzone.com/forum/index.php

Can someone that knows what they are doing please help me???

thanks,

- Reider

View 3 Replies View Related

Need Expert Help And Advice. Thank You.

Feb 27, 2007

Hello,Consider I have a String:Dim MyString As String = "Hello"or an Integer:Dim MyInteger As Integer = 100or a class which its properties:Dim MyClass As New MyCustomClass
MyClass.Property1 = "Hello"
MyClass.Property2 = Unit.Pixel(100)
MyClass.Property3 = 100Or even a control:Dim MyLabel As Label
MyLabel.Id = "MyLabel"
MyLabel.CssClass = "MyLabelCssClass" Is there a way to save a String, an Integer, a Boolean, a Class, a Control in an SQL database?Something like:  Define something (Integer, String, Class, Control, etc)  Save in SQL 2005 Database  Later in code Retrive from database given its IDIs this possible?How should I do this?What type of SQL 2005 table field should be used to store the information?Thanks,Miguel 

View 1 Replies View Related

Expert Help Needed

Feb 20, 2001

Has anyone any suggestions how I might find the most recent of a series of dates from different tables? I am joining tables which all have a date_altered field and I am only interested in displaying the most recent of these. Eg.

select a.x,b.y,c.z, a.date_altered, b.date_altered, c.date_altered
from a inner join b on (a.id=b,id) inner join c on (b.id=c.id)

What I would like is in effect a function Highest() Eg.

select a.x,b.y,c.z, highest(a.date_altered, b.date_altered, c.date_altered) as last_alteration
from a inner join b on (a.id=b,id) inner join c on (b.id=c.id)

I am using SQL Server 7 so cannot write myself a function to achieve this - frustrating, as it is something I could have done 4 years ago when I used mostly Oracle.
Many thanks

View 2 Replies View Related

Need SQL-EXPERT, For My Problem

Jul 12, 2004

Fact is:

I have two tables Orderposreg and Temp1 (both in [My Database]), Orderposreg is from 1994, Temp1 from 1995 and i need to Update the old table with the new one.

This should my Query do: I need it to Update old primary keys, or if the row does not exist to insert the new primary key into the Orderposreg.

But if I start the Query i get this failure message:
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'dbo.Temp1' does not match with a table name or alias name used in the query.

It seems that the colums do not have the same name, but the column of both tables have exactly the same column name and data type just the table name is different.

For your information the whole Code:


Code:


declare @error varchar, @rowcount varchar

select count(*) from dbo.temp1
if (@@error <> 0)
begin
Print 'An error occurred reading the temporary import table'
goto exitpoint
end

begin transaction

update dbo.Orderposreg
set dbo.Orderposreg.Ordernr = dbo.Temp1.Ordernr,
dbo.Orderposreg.Pos = dbo.Temp1.Pos,
dbo.Orderposreg.Produktnr = dbo.Temp1.Produktnr,
dbo.Orderposreg.Artbenämn = dbo.Temp1.Artbenämn,
dbo.Orderposreg.Artikelgrupp = dbo.Temp1.Artikelgrupp,
dbo.Orderposreg.Förs_pris = dbo.Temp1.Förs_pris,
dbo.Orderposreg.Kvant = dbo.Temp1.Kvant,
dbo.Orderposreg.Total_Intäkt = dbo.Temp1.Total_Intäkt,
dbo.Orderposreg.SSort = dbo.Temp1.Sort,
dbo.Orderposreg.Datum = dbo.Temp1.Datum,
dbo.Orderposreg.Utskriven = dbo.Temp1.Utskriven,
dbo.Orderposreg.Levtid_Ö = dbo.Temp1.Levtid_Ö,
dbo.Orderposreg.Levtid_L = dbo.Temp1.Lev_kvant,
dbo.Orderposreg.Inköpskostnad = dbo.Temp1.Inköpskostnad,
dbo.Orderposreg.Vikt_tol = dbo.Temp1.Vikt_tol,
dbo.Orderposreg.AntalSt = dbo.Temp1.AntalSt,
dbo.Orderposreg.Spec_nr = dbo.Temp1.Spec_nr,
dbo.Orderposreg.Spec_utgåva = dbo.Temp1.Spec_utgåva,
dbo.Orderposreg.ID_Beräknad = dbo.Temp1.ID_Beräknad,
dbo.Orderposreg.Bredd = dbo.Temp1.Bredd,
dbo.Orderposreg.Tjocklek = dbo.Temp1.Längd,
dbo.Orderposreg.ValsnGrad_kod = dbo.Temp1.ValsnGrad_kod,
dbo.Orderposreg.Kant_Kod = dbo.Temp1.Kant_Kod,
dbo.Orderposreg.Planhets_kod = Temp1.Yt_kod,
dbo.Orderposreg.LevForm_kod = dbo.Temp1.LevForm_kod,
dbo.Orderposreg.Rakhets_kod = dbo.Temp1.Rakhets_kod,
dbo.Orderposreg.BreddTol_kod = dbo.Temp1.Breddtol_kod,
dbo.Orderposreg.TjocklTol_kod = dbo.Temp1.TjockTol_kod,
dbo.Orderposreg.LängdTol_kod = dbo.Temp1.LängdTol_kod,
dbo.Orderposreg.Stål_kod = dbo.Temp1.Stäl_kod,
dbo.Orderposreg.TotaltSek = dbo.Temp1.TotaltSek,
dbo.Orderposreg.Tullstatnr = dbo.Temp1.Tullstatnr,
dbo.Orderposreg.Fakturera = dbo.Temp1.Fakturera,
dbo.Orderposreg.Leveransstatus = dbo.Temp1.Leveransstatus,
dbo.Orderposreg.Momsbelopp = dbo.Temp1.Momsbelopp,
dbo.Orderposreg.Total_inkl_moms = dbo.Temp1.Total_inkl_moms,
dbo.Orderposreg.KloMPS = dbo.Temp1.KloMPS,
dbo.Orderposreg.ShopFloor = dbo.Temp1.ShopFloor,
dbo.Orderposreg.Status = dbo.Temp1.Status,
dbo.Orderposreg.Stålkod = dbo.Temp1.Stålkod,
dbo.Orderposreg.Kontonyckel = dbo.Temp1.Kontonyckel,
dbo.Orderposreg.PlanLevDat = dbo.Temp1.PlanLevDat,
dbo.Orderposreg.Legtillägg = dbo.Temp1.Legtillägg,
dbo.Orderposreg.StålGrp = dbo.Temp1.StålGrp,
dbo.Orderposreg.KundNr = dbo.Temp1.KundNr,
dbo.Orderposreg.FKundNr = dbo.Temp1.FKundNr,
dbo.Orderposreg.Godsmärke = dbo.Temp1.Godsmärke,
dbo.Orderposreg.LagerMtr = dbo.Temp1.LagerMtr,
dbo.Orderposreg.Sortkvant = dbo.Temp1.Sortkvant,
dbo.Orderposreg.Sortpris = dbo.Temp1.Sortpris,
dbo.Orderposreg.KundsProdNr = dbo.Temp1.KundsProdNr,
dbo.Orderposreg.Godsmärke2 = dbo.Temp1.Godsmärke2,
dbo.Orderposreg.RegDatum = dbo.Temp1.RegDatum,
dbo.Orderposreg.PlanBetDag = dbo.Temp1.PlanBetDag,
dbo.Orderposreg.Säkring = dbo.Temp1.Säkring
where dbo.Orderposreg.Ordernr_o_pos = dbo.Temp1.ordernr_o_pos

select @error = @@error,@rowcount=@@rowcount
if @error <> 0
begin
print ' Error updating - Error number '+@error+'. Rolling back'
--this reverses your updates
rollback
--this jumps to the end
goto exitpoint
end

print @rowcount+' rows updated'

insert into dbo.Orderposreg
(Ordernr, Pos, Ordernr_o_pos, Produktnr, Artbenämn, Artikelgrupp, Förs_pris, Kvant, Total_Intäkt, Sort, Datum, Utskriven, Levtid_Ö, Levtid_L, Lev_kvant, Inköpskostnad, Vikt_tol, AntalSt, Spec_nr, Spec_utgåva, ID_Beräknad, Bredd, Tjocklek, Längd, ValsnGrad_kod, Kant_kod, Planhets_kod, Yt_kod, LevForm_kod, Rakhets_kod, BreddTol_kod, TjocklTol_kod, LängdTol_kod, Stål_kod, TotaltSek, Tullstatnr, Fakturera_kvant, Leveransstatus, Fri_text, Momsbelopp, Total_inkl_moms, KloMPS, ShopFloor, Status, Stålkod_text, Kontonyckel, PlanLevDat, Legtillägg, StålGrp, KundNr, FKundNr, Godsmärke1, LagerMtr, Sortkvant, Sortpris, KundsProdNr, Godsmärke2, RegDatum, PlanBetDag, Säkring)
select
Ordernr, Pos, Ordernr_o_pos, Produktnr, Artbenämn, Artikelgrupp, Förs_pris, Kvant, Total_Intäkt, Sort, Datum, Utskriven, Levtid_Ö, Levtid_L, Lev_kvant, Inköpskostnad, Vikt_tol, AntalSt, Spec_nr, Spec_utgåva, ID_Beräknad, Bredd, Tjocklek, Längd, ValsnGrad_kod, Kant_kod, Planhets_kod, Yt_kod, LevForm_kod, Rakhets_kod, BreddTol_kod, TjocklTol_kod, LängdTol_kod, Stål_kod, TotaltSek, Tullstatnr, Fakturera_kvant, Leveransstatus, Fri_text, Momsbelopp, Total_inkl_moms, KloMPS, ShopFloor, Status, Stålkod_text, Kontonyckel, PlanLevDat, Legtillägg, StålGrp, KundNr, FKundNr, Godsmärke1, LagerMtr, Sortkvant, Sortpris, KundsProdNr, Godsmärke2, RegDatum, PlanBetDag, Säkring
from dbo.Temp1
where dbo.Temp1.Ordernr_o_pos not in (select Ordernr_o_pos from dbo.Orderposreg)
select @error = @@error,@rowcount=@@rowcount
if @error <> 0
begin
print ' Error inserting - Error number '+@error
print ' Rolling back updates and inserts'
--this reverses your updates and inserts
rollback
--this jumps to the end
goto exitpoint
end

print @rowcount+' rows were inserted'
--this saves your data
commit

exitpoint:




Thanks a million for somebody who helps me!!!

View 2 Replies View Related

Help Me Please ! My Question For An Expert !

Mar 16, 2004

Hi !
I have been worked with VC++, MS SQL SERVER, Transact-SQL for
3 years. I made an axtended stored procedure (xp_test) which returns
an recordset.
From Query Analizer, I can see the recordest : exec xp_test

I want to make an User Defined Function - MyTest which return
the recordset that it is returned by xp_test after its execution.
Something like that :

CREATE function dbo.MyTest ( )
RETURNS @table ...
AS
BEGIN
exec master.. xp_test table1 output -- can I do this ?

RETURN table1
END

Table and table1 are the same design.

Thank you very much !

View 4 Replies View Related

Need Expert Help And Advice. Thank You.

Feb 27, 2007

Hello,

I am using Enterprise Library Data Access and SQL 2005 application block and I need to know if it is possible to do the following:

Consider I have a String:

Dim MyString As String = "Hello"

or an Integer:

Dim MyInteger As Integer = 100

or a class which its properties:

Dim MyClass As New MyCustomClass
MyClass.Property1 = "Hello"
MyClass.Property2 = Unit.Pixel(100)
MyClass.Property3 = 100

Or even a control:

Dim MyLabel As Label
MyLabel.Id = "MyLabel"
MyLabel.CssClass = "MyLabelCssClass"

Is there a way to save a String, an Integer, a Boolean, a Class, a Control in an SQL database?

Something like:

Define something (Integer, String, Class, Control, etc)

Save in SQL 2005 Database

Later in code Retrive from database given its ID

Is this possible?

How should I do this?

What type of SQL 2005 table field should be used to store the information?

Thanks,
Miguel

View 4 Replies View Related

Is Ther An Expert?

Oct 16, 2007

Is there a expert here on full text indexing on 2005 sql server express????

View 8 Replies View Related

What Is Expert SQL Knowledge?

Jul 23, 2005

I do a lot of hiring for my company and a lot of the people I interviewsay that they are experts at SQL queries, but when I give them somethingsimple just beyond the typical SELECT type of queries, they choke.For example I have a table that looks like this:PK_ID - primary keyPARENT_ID - a FK to another row in the same tableThis essentially is a tree structure. I will ask interviewees to writea query that will return all the rows that have 2 direct children. Noone knows how to do this.I don't get it. I have done queries which boggle the mind and they arefar more complex than this.Am I asking too much?--* Don VaillancourtDirector of Software Development**WEB IMPACT INC.*phone: 416-815-2000 ext. 245fax: 416-815-2001email: Join Bytes! <mailto:donv@webimpact.com>web: http://www.web-impact.com/ This email message is intended only for the addressee(s)and contains information that may be confidential and/orcopyright. If you are not the intended recipient pleasenotify the sender by reply email and immediately deletethis email. Use, disclosure or reproduction of this emailby anyone other than the intended recipient(s) is strictlyprohibited. No representation is made that this email orany attachments are free of viruses. Virus scanning isrecommended and is the responsibility of the recipient./

View 15 Replies View Related

I Need Suggestions From Some Expert

Jan 28, 2008

Hi folks, I have a very typical database for an ASP.net application. There is a table which will contain a hierarchical data..much like files-folders structure of a file system.
But we know that the table will be a giant one in production. There will be a huge collection of data need to persist in it. we are already facing some performance problem with some queries during the QA/test machine.
Currently there is a table which is keeping all file and folder information and another table maintaing their hierarchy relation using two column namely, parentID and childID.
My first question is, would it be better to keep this hierarchy relation into the same table rather using a different one? (much like managerID and empID in AdventureWorks sample?)
My Second question, what is the best way to design this kind of structure to get the highest performance benifit?

All kind of thoughts will be appreciated much! thanks

View 26 Replies View Related

Expert Sql Query

Oct 26, 2007



Hi,

I have a table describing items with 3 rows:
ID : its an identity Primary key
Type : nvarchar string for itemtype
ItemData : numeric data for an item

I would like to create a query to get the results where each returned row contains
- Type
- number of items for the given type
- concatenated string of the ItemData numbers for all items for the given type

ex: Items
1,"Big",1
2,"Big",56
3,"Small",45
4,"Big",22
Expected result:
"Big",3,"1 56 22"
"Small",1,"45"

I started with this query:

SELECT Type , COUNT(Type) AS Amount FROM Items GROUP BY Type


but i cannot figure out how to do the string concatenation (its like SUM but we dont need to add the values but we need to concatenate). I was thinking some stored procedure but this query will run on Compact SQL so thats not possible according to Compact SQL specs. Can any SQL expert help, how to do this, or is it possible to do anyhow?

Thanks for the help.

View 1 Replies View Related

Dynamic SQL Expert Pleaaaaaaaase

Apr 15, 2004

First i am designing a small database fo similar types of books ( Stories table , Short stories table , ...etc ) so i the columns in each table of them is similar , so instead of using a Stored Procedure for every table to select the TOP book i used one SP with variable table name and it works well as i pass the table name from the page , here it is :
---------------------------------------------
CREATE PROCEDURE Top1
@tblname Varchar(255)
AS

EXEC ( 'SELECT TOP 1 *
FROM ' + @tblname + '
WHERE Status="OLD"
ORDER BY ID DESC')
GO
-----------------------------------------------
The Problem now that i want to make the same thing with the INSERT STATEMENT to input new books to the table by passing the table name from the page like the SELECT one , and i `ve tried this one but gives me errors :
--------------------------------------------------------------------------------------------------
CREATE PROCEDURE AddNewStory
@tblname varchar(50),
@title varchar(50),
@Content varchar(5000) ,
@Picture varchar(200) ,
@date datetime
AS

EXEC('INSERT INTO' + @tblname + '( Sttitle , StContent, StPic, StDate )
VALUES ( '+ @Title + ',' + @Content+ ',' + @Picture+ ',' + @date + ')' )
GO
----------------------------------------------------------------------------------------------------

& th error is

Server: Msg 128, Level 15, State 1, Line 2
The name 'Dickens' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Stored Procedure: db1sql.dbo.AddNewStory
Return Code = 0

SO PLEASE HELPPPPPPPPPPP

View 4 Replies View Related

Lecco Tech SQL Expert Pro

Jun 15, 2000

Is anybody out there using SQL Expert Pro? Can you give me some feedback please?

I've been evaluating it for two weeks now and am very pleased with the results but I'm a bit hesitant to spend $5000.

Thanks!

Pete Karhatsu

View 3 Replies View Related

Expert's Help Needed!! Sp_QueryToFile

Dec 20, 2004

Idea here is to output results of a stored proc to a text file..

I am trying to use this query to execute a stored proc which in turn accepts 3 parameters. Can some one help me as I am getting syntax errors when I try this way:

EXEC sp_querytofile 'MyDB', "exec sp_myproc ''11/03/04'', ''ABK'', ''TFC'", 'c:sp_myproc_out.txt'


I tried different combination of quotes but couldn't make it work! Any one to help?

--------code for sp_QueryToFile---------

Create PROCEDURE sp_QueryToFile
( @db sysname,
@query VARCHAR(1000),
@file VARCHAR(255)
)
AS

SET NOCOUNT ON
SET @Query = 'SET NOCOUNT ON ' + @Query

EXECUTE ('master..xp_cmdshell ''osql -w8000 -S sqldev14corpappsdev -r -s" ", -h-1 -o' + @file + ' -d'+ @db + ' -Q"' + @query + '" -E''')
/* Procedure Ends */

View 2 Replies View Related

Need Expert Help In Database Design..

Apr 4, 2007

Hello friends,I have to design a database for banking application,but it is my first db design so i need some expert advice.

Data base has some performance constraint i.e high output ,minimum query time,need to process 2 to 5 million transaction per day.

Further specification can be revealed if appropriate help is provided.

your advice will be of great help for me.

Thx

View 4 Replies View Related

Expert Question - Combining Tables And MAX()

Jul 17, 2006

I have two tables - T_Assets and T_Inspections.
I am trying to create a view where I see the date of the last inspection for each asset. Here is some sample SQL:
SELECT T_Assets.I_AssetID, T_Inspections.I_InspectionID, Max(T_Inspections.SDT_DateOfInspection)
FROM T_Assets
INNER JOIN T_Assets.InspectionID = T_Inspections.I_InspectionsID
GROUP BY T_Assets.I_AssetID, T_Inspections.I_InspectionID
 
Now, as anyone who is experienced in sql will know, this will not work. This is because the I_InspectionID is different - so the group by will not work. The results I get are basically the same as if the MAX() function was not applied.
 
Can anyone please tell me a way around this.
Jagdip

View 8 Replies View Related

Database Flexibility (Need Expert Advice)

Mar 13, 2008

Hi All Professionals Programmers,
I would like to ask a question that is very important for me. The question is how can i create a flexible data base in which i m able to create the inner levels as much as i can.
Like i have a table building, then i have another child table floor, then the floor become parent and i have its child rooms, then the rooms become parent and i have its child floor tiles etc.
you can see i am going to inner dept, so i need a flexible database because its very costly and intimadting to change the database and every time create a new table and relationships.
Hope you have understood what i am going to say and need advice of professional and expert user to resolve it.
Any concise quality material like articles, white paper etc will also be suitable for me.
Thanks in Advance

View 3 Replies View Related

Problem With Query, Looking For An Expert Solution

Dec 22, 2005

hello My SP is as follows


CREATE PROCEDURE SP_ProcessAdminResults(@UserID nvarchar(100)) As

Declare @ReqID as integer;
Declare @Assaignee as integer;
Declare @TechName as nvarchar(200);
Declare @OpenDate as datetime;
Declare @GroupID as integer;
Declare @DateActiontaken as datetime;
Declare @AssignedDate as datetime;
Declare @ActionDays as integer;
Declare @OpenDays as integer;

declare GroupCursor cursor local scroll static for select [ReqID],[Assignee],FullName,[OpenDate],[GroupID],[DateActionTaken] from V_ProcessRequestMaster where UserID=@UserID and [Status]<>'CL' order by ReqID
open GroupCursor
fetch first from GroupCursor into @ReqID,@Assaignee,@TechName,@OpenDate,@GroupID,@Da teActiontaken
while (@@fetch_status <>-1)
begin
select @AssignedDate= min(DateLogged) from LOGMASTER where
analyst=@Assaignee and reqMasterID=@ReqID and UserID=@UserID and Type='INIT'
If @AssignedDate is null
Begin
select @AssignedDate=dbo.GetActionDate(LTRIM(Rtrim(@TechN ame)),@ReqID,@UserID)
End

If @AssignedDate is null
BEGIN
set @ActionDays=0
END
Else
BEGIN
If @GroupID=438030
BEGIN
set @ActionDays=[dbo].GetBussinessdays(@AssignedDate,@DateActiontaken,5 ,6)
set @OpenDays=[dbo].GetBussinessdays(@OpenDate,getdate(),5,6)
END
Else
BEGIN
set @ActionDays=[dbo].GetBussinessdays(@AssignedDate,@DateActiontaken,1 ,7)
set @OpenDays=[dbo].GetBussinessdays(@OpenDate,getdate(),1,7)
END

END
If @ActionDays<>0 set @ActionDays=@ActionDays-1
If @OpenDays<>0 set @OpenDays=@OpenDays-1

update requestmaster set DateAssigned=@AssignedDate, ActionDays=@ActionDays, OpenDays=@OpenDays where ReqID=@ReqID and UserID=@UserID
fetch next from GroupCursor into @ReqID,@Assaignee,@TechName,@OpenDate,@GroupID,@Da teActiontaken
end
GO


The master table contains like 600,000 odd records and when i put a cursor and process the results where i need to get the business days between assigned date and action taken date the query take lot of time and eventually the front end crashes saying Time OUT expired.

Looking for an expert solution to simplify that query.

View 6 Replies View Related







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