Planning On Going With Dynamic SQL, But...

Jun 13, 2007

I've read a few posts on the stored procedure vs dynamic sql debate. I ran a few performance test for myself and it appears to be a wash.



Given that, I'm leaning toward dynamic sql mostly because it would mean one fewer place to have things.



But, before we go that route we wanted to ask the question:



Is there any compelling reason why we shouldn't abandon all of our stored procs and just write the SQL inside inside our functions in our business layer (essentially our data access layer)?



Or, is it just preference these days?



I was leaning toward procs, but I have to admit it would be nice not to have to keep up with all of them per all of our functions that call them.



Thanks,
Ron

View 3 Replies


ADVERTISEMENT

DR Planning Help....

Mar 8, 2007

I was told that my company is thinking about inplementing a "backup" server for out content loading server (aka load server)... this server loads files from several companies and then replicates the data out to our production environment to be seen. This server has serveral DTS/IS packages that do all this data movement and manipulation... I am not too up to date on technology for what they are asking so I thought I would ask here for some recommendations to head in the right direction...

I am not sure if clustering will work or maybe mirroring the database...

The server now is a publisher so the backup server would have to pick up if the #1 failed and then give command back to #1 once it is good... this is the part I have no idea about...

The #2 server would not have to really do anything but keep its data up to date unless #1 fails so you could say it would be fine to be a passive server...

Any ideas on what direction I should look into???

Thanks ahead of time.

View 8 Replies View Related

Planning To Install SP3

Jan 8, 2001

Hi All

I am planning to install SP3, anyone have suggestion before installation what are the precaution I need to take. please post your comments. Thanks in advance.

Thanks

Regards
Leong

View 1 Replies View Related

Capacity Planning

Nov 4, 2000

hi, can any one tell me what is the meaning of capacity planning and where do I get info about it,and how does this help me in sql server admin role
thanks

Ahmed

View 1 Replies View Related

Replication Planning

Feb 8, 2001

Hi every body,

my company wants implements transactional replication. We have three servers one in chicago(production)
second server in chicago, third server in kansas city.Can give me plan for implementing the replication.

Thanks

View 1 Replies View Related

Capacity Planning

Dec 11, 2000

What si capacity planning?
Where can i find more stuff on it?

View 1 Replies View Related

New SQLSERVER Planning?

May 26, 2004

Hi Guys,

We are planning for a new SQLSERVER for one of our application. The database will receive around 58 million events/year is roughly 160,000 messages/day

Making the assumption that an average message size is 2K. The messages comes to database through edi processes.

Any suggestion about database server configuration, and any other steps that need to be take care of before even thinking about creating a database??

help is greatly appericated..

View 3 Replies View Related

Capacity Planning !!!

May 28, 2001

Hi Everybody,

Can anybody explain me, what is Capacity Planning and what is Load Balancing?

tks in advance
sri

View 1 Replies View Related

Planning A Database

Aug 7, 2007

Hi all,

I'm very new to SQL and am learning via books and whilst on the job. I'm putting together my logical design at the moment and was wondering if anyone could suggest any websites that might give me an insight into the best way to go about this in an effective manner.

TIA,

SamuelT

View 1 Replies View Related

Project Planning

Feb 13, 2007

HelloBased on three tables (Projects, Tasks and UserCalender) I would liketo work out the total amount of available resources (UserCalendertable contains a entry for each user for each day, day being 7.5hours) and total required effort (sum of Tasks.EstimateLikley) splitover 12 months.For example:Jan:Available Resources: (4 Users, 7.5 hours per day, 5 working days perweek, 23 Working days in Jan) = (23 x 4) = (92 * 7.5) = 690 AvailableHoursRequired Resources:Project Start Date: 1/1/2007Project End Date: 1/6/2007Total Required effort (Sum of Tasks.Hours for above project): 500Hours Average over 6 months = 83.33 Hours per month, so in Jan I needto deduct 83.33 from 600 = 516.67 Hours.etcHow could I do this, I have tried several ways but finding it hard.Thanks

View 1 Replies View Related

Planning A Replication

Aug 5, 2006

hallo
we have a sql2000 in the headquarter, and 3 new remote branches opening in few weeks with no sql servers installed yet.
We plan to setup a merge replica. The headquarter will have the highest activity on the replicated tables.
Shall we use all SQL2000 in the remote branches? Or could we use SQL2005, using a 2005 as a publisher and distributor?
TIA

View 3 Replies View Related

Planning Ahead W/ SQL Server...

Jan 3, 2004

With the current web app that I am writing, I am starting to plan ahead to the scalability problems that I am planning on encountering with the number of users that I may have...

My hosting plan now allows for a 50MB SQL Server database, but, I know that will not last long, each user will be using 3-5MB each of the database, so I am going to outgrow my space fast.

Would looking into (until i have enough subscribers to get a dedicated host), SQL Hosting be a good idea? Atleast to start off with something like http://www.alentus.com/hosting/sqlserver.asp ?

But then again, would a SQL Database growing to large get bad? Within a few years, i expect to have at max 5,000 users, so that could grow to a 25GB database... with millions of rows.

Would breaking it up into smaller databases for each N amount of users be a wise idea? Or would it not really matter?

Any help is much appreciated

Happy New Year
Harold.

View 1 Replies View Related

Need Advice On Planning For DataBase Changes

May 16, 2005

Hello;

View 8 Replies View Related

Database Capacity Planning

Sep 27, 2001

Does any one know where I can locate a document or template for database capacity planning on the web? Any help would be greatly appreciated. thanks.

View 1 Replies View Related

Planning For Creating A Database

Nov 16, 2007

Dear Experts,
now i was allotted as a complete DBA for one client and i've to take care from the creation itself.

we've understood the data will be around 20 GB initially, and from there onwards, 1GB data will grow in the database. total number of tables are around 1400. and we have primary key on each table.

Now you Experts, please guide me that how can i take the Fragmentation levels for best performance? or i need to give you more information regarding that.....

i need your valuble suggesions and guidence

View 2 Replies View Related

Planning Multiple Queries

Dec 2, 2005

I'm cleaning data which involves updating ~12 million rows with threedifferent models, progressively. First clean values using the modelwith finest granularity, then the remainder with the next model,finally what's left using the last model. The first model sets ~1/2 ofthe rows, the second ~1/4, the third ~1/5, and the remaining 5% don'tget updated.It's something like this:UPDATE t SET value=value*m.AdjustmentFactor, updateFlag='updated'FROM Table t JOIN Models m ON ....WHERE m.ModelID='first model' AND t.updateFlag IS NULLStart with 'first model' then 'second model' etc.I'm wondering what happens if I submit all three queries together, oras three separate submissions, waiting for the one before to complete.If I do them all as one group, the query planner might plan for thesecond and third updates based on the initial distribution of values.However, the first update removes half of the rows from consideration,so it seems to me a new plan should be prepared for the second query,based on the distribution at that time. If I highlight the queries inQuery Analyzer and execute, are all three plans created at thebeginning? Does putting GO between them (which I do) make anydifference?This is SQL Server 2000.Thanks,Jim

View 2 Replies View Related

SSRS Hardware Planning

Oct 18, 2007

I've done a fair amount of hardware planning for the SQL Server Database Engine. Now I'm doing so for SSRS which I don't have as much experience with. I haven't been able to find much information, especially around RAM capacity and have a few questions. Any responses or pointers to resources are appreciated.

Scenario: 2 load-balanced SSRS 2005 App servers with an independent back-end SQL DB for the config database. Total userbase is about 2000 (not simultaneous), and I'm still trying to get statistics for per hour requests. May also install multiple SSRS instances on these boxes with one of them in Sharepoint Integrated mode (don't anticipate high volume here). Load-balancing is for both performance and availability goals.

I'm looking at the SSRS App servers only and am analyzing amount of RAM, 32 vs 64 bit, and perhaps CPU core count.

1. Does 32-bit Enterprise SSRS benefit from more than 4 GB on a server, using AWE or other memory extension? Or is anything > 4 GB unused at 32 bit?
2. Are there material benefits to going to 64-bit OS / SSRS and increasing memory above 4 GB? (does IIS handle this?), Perhaps to 8 or 16 GB.
3. The boxes will be 2-way, dual core, with possibility of going to quad core. Is increasing core count a better use of budget than increasing RAM above 4 GB?


I've read the white paper, "Planning for Scalability and Performance with Reporting Services" (http://www.microsoft.com/technet/prodtechnol/sql/2005/pspsqlrs.mspx) which briefly (but incompletely) discusses 32 vs 64 bit, and really doesn't touch on RAM at all.


Thanks for any pointers,

Scott

View 2 Replies View Related

Planning Database On SQL Server 2005

Apr 30, 2007

Hello,
We are establishing a database server for our product suite containg 14 products- these products is basically intended to be used by CAs and Accountants.

my databaseserver will have 14 databases-
4 are very small, 4 are complex and 6 are Very complex- there is a close intraction between all these databases.
at any time there will be around 500 users using these products but since these products are seasonal there is a chance that all 500 users are connected to one database only.(but there is also a possiblity that load is equally distributed on all the databases)
My product will run on intranat.

My requirement is:
1. What is best server configuration for hosting such type of database.(sqlserver 2005)
2. How many concurrent users sqlserver supports(MSaccess supports 15 concurrent users)
3. I want that if user has license for 10 users my Database should bear load of only 10 user.

View 1 Replies View Related

Sql Server Sizing Planning - Architecture Help

Jul 20, 2005

HiI joined a project where 100,000 rows were added everyday. Now due toadditional customers the expectation is 2 million reocrds/day ie 10 GB worthof textfiles. We have to estimate the hard disk, memory, # of CPUs etc.Wewill have one yearworth of data in the db. Rest will be in tapes etc.We will be using WIN2000, SQL Server2000.- Any comparable server sizing willbe appreciated.1. Tohandle every day load, I thought that we will have a table for each day(pre created in the database )and have a view with union all selectingfromall these 365 tables. (This is the only way to partition in MSSQL Serverright?).2. The requirement is to populate datawarehouse tables with all the data.However there will be only inserts mostly but there can be updates too whichhappenned in the past 12 days.Hence we have to use the data from the last12 days and massage it etc and populate into datawarehouse tables.How can I do this so that I will have the datawarehouse tables with n-12days of data and I will alwys add the last 12 days data to it.Do you have any suggestions?Ragu

View 3 Replies View Related

SQL Server Capacity Planning Best Practice

Aug 8, 2007

Hello,

I have been working on SQL Server Capacity Planning for a few weeks now and have gathered a lot of materials, but non of thes materials contain recommended best practices on SQL Server capacity planning and also they do not contain operational guidelines.

I would be glad if anyone can recommend a website or book that contain information on SQL Server Capacity Planning Best Practices.

Thanks,
Jide

View 3 Replies View Related

Model Database Recovery Planning

Mar 29, 2007

I cannot think of any reason, in our environment, why I would recover the model database. Change framework has all databases coming from DEV & QA before landing on PROD. We have never used the model database as framework of new databases either.

So, if I discontinued backup of the database, what is my recovery method if it become corrupt? Since mine is not used, can I simply copy it from another server?

View 5 Replies View Related

Planning For SQL Server 2005: 64-bit, OS, Processor, Memory

Jul 23, 2005

I was browsing Microsoft's SQL Server site, looking forsome details about SQL Server 2005. Didn't find whatI was looking for...I'm thinking about moving an existing SQL Server 2000workload to a new box, using SQL Server 2005, andmaybe the 64-bit version.My questions are:1. What is the current target date for release of SQL Server 2005?Will 64-bit ship when 32-bit ships?2. Will 64-bit SQL Server 2005 require a special versionof Windows Server 2003 (e.g. Windows Server 2003 Enterprise x64)?Will it work with both Intel and AMD processors?3. How many CPUs, and how much memory, will be supported bySQL Server 2005, 32-bit and 64-bit, on each OS that can runSQL Server 2005.I'm looking for a chart here, something like the chart onpage 117 of Kalen Delaney's "Inside SQL Server 2000" book.SQL Server 2005 SQL Server 2005Feature Enterprise 32-bit Enterprise 64-bit------------------- ----------------- -----------------CPUs supportedWin Srvr 2003:Win Srvr 2003 Adv:Win Srvr 2003 Ent x64:Physical memorysupportedWin Srvr 2003:Win Srvr 2003 Adv:Win Srvr 2003 Ent x64:Has Microsoft published this info, and I just can find it?

View 1 Replies View Related

Planning Database Storage For SQL Server 2005

Feb 13, 2008

Here are my planning details:

RAID 1:

2 disks RAID 1 for OS and BINS
2 disks RAID 1 for Backups.

RAID 10

4 disks RAID 10 for data
4 disks RAID 10 for log
4 disks RAID 10 for TEMPDB

Should i put the master and other system database on RAID 10 along with TempDB.

Or what else a guru fellow will advise in above setup.

thanks,

View 5 Replies View Related

SQL 2012 :: TempDB - Tlog Sizing / Capacity Planning?

Nov 18, 2014

I am in the process of formulating recommendations with respect to the purchase of additional storage for our current SQL 2012 SharePoint (2013) instance. My recommendation is to purchase separate storage (i.e, 15k disks) for the TempDB and Tlogs respectively (two sets of raid 10 disks). Currently, this server is hosting several instances, including SP, using two arrays (one for database and the other for Tlogs).

I am attempting to find information/recommendations on how to go about projecting the amount of storage for each of these while factoring in for growth.

Additional Details:

how to best formulate a reasonable estimate. Our largest content database belongs to IT and is currently ~80GB. That said, this is currently an outlier. The remaining content databases are less than 10GB (most are less than 2-3 GB). However, SharePoint will be used for digital document imaging in addition to, eventually, replacing file shares as our primary document storage medium once we roll it out.

Our current tempDB is ~400MB, but the instance was recently started a few days ago, as we had to failover to our backup server for hardware maintenance. I do not have any historical data on TempDB growth at this time. Also, I don't know how useful this would be given we have not fully deployed yet.

View 0 Replies View Related

Analysis :: SSAS Planning / Forecast Copy Data In Cube

Oct 2, 2015

Is there any way to copy my Data of 2015 to the Planning/Forecasting Value of 2016?

My question is based on that we use INFOR ION BI right now and there we can just add an Button in our reports wich physically copies the value from one year to the next year based on some other rules in the cube.

Now I need to make this example work with SSAS and Excel PivotTables but I cant figure out how.

I have absolutely no clue where and how to accomplish it. Do I use Calculations, do I use Actions, do i make it in the Dataview, Cube or directly in Excel?

View 4 Replies View Related

Using Visual Studio 2003 With Sql Server 2000 And Planning To Switch To Sql Server 2005

Aug 24, 2006

We have a project already developed iusing VS 2003 Enterprise architect edition using sql server 2000(have lots of table and stored procs etc.)
Now planning to switch to Sql server 2005 are there any issues associated with the switch.
 
I mean front end programming wise asp.net and vb.net front end codes do they work straight away or need to make any changes to all the front end codes, we are using datasets, data readers calling stored procs and also using lot of hash tables and XML object to make bulk loads to sql server via sqlxml3.0 sp3.
Please help thank you very much for the information.

View 1 Replies View Related

Importing Excel Sheet Which Have Dynamic Column Name And Dynamic Number Of Columns

Aug 25, 2007

Hi Craig/Kamal,

I got your email address from your web cast. I really enjoyed the web cast and found it to be
very informative.

Our company is planning to use SSIS (VS 2005 / SQL Server 2005). I have a quick question
regarding the product. I have looked for the information on the web, but was not able to find
relevant information.

We are getting Source data from two of our client in the form of Excel Sheet. These Excel sheets
Are generated using reporting services. On examining the excel sheet, I found out that the name
Of the columns contain data itself, so the names are not static such as Jan 2007 Sales, Feb 2007 Sales etc etc.
And even the number of columns are not static. It depends upon the range of date selected by the user.

I wanted to know, if there is a way to import Excel sheet using Integration Services by defining the position
Of column, instead of column name and I am not sure if there is a way for me to import excel with dynamic
Number of columns.

Your help in this respect is highly appreciated!

Thanks,


Hi Anthony, I am glad the Web cast was helpful.

Kamal and I have both moved on to other teams in MSFT and I am a little rusty in that area, though in general dynamic numbers of columns in any format is always tricky. I am just assuming its not feasible for you to try and get the source for SSIS a little closer to home, e.g. rather than using Excel output from Reporting Services, use the same/some form of the query/data source that RS is using.

I suggest you post a question on the SSIS forum on MSDN and you should get some good answers.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=80&siteid=1
http://forums.microsoft.com/msdn/showforum.aspx?forumid=80&siteid=1

Thanks



Craig Guyer
SQL Server Reporting Services

View 12 Replies View Related

SSRS 2005 - Email Report On Execution To Dynamic List With Dynamic Parameters = No Schedule

Nov 23, 2007

Hi,
I have a need to display on screen AND email a pdf report to email addresses specified at run time, executing the report with a parameter specified by the user. I have looked into data driven subscriptions, but it seems this is based on scheduling. Unfortunately for the majority of the project I will only have access to SQL 2005 Standard Edition (Production system is Enterprise), so I cannot investigate thoroughly.

So, is this possible using data driven subscriptions? Scenario is:

1. User enters parameter used for query, as well as email addresses.
2. Report is generated and displayed on screen.
3. Report is emailed to addresses specified by user.

Any tips on how to get this working?

Thanks

Mark Smith

View 3 Replies View Related

Merge Replication W/ Dynamic Row Filter - Not 'dynamic' After First Initial Sync?

May 2, 2007

If anyone could confirm...

SQL Server 2000 SP4 to multiple SQL Server 2005 Mobile Edition on PDAs. My DB on SQL2k is published with a single dynamic row filter using host_name() on my 'parent' table and also join filters from parent to child tables. The row filter uses joins to other tables elsewhere that are not published to evaluate what data is allowed through the filter.

E.g. Published parent table that contains suppliers names, etc. while child table is suppliers' products. The filter queries host_name(s) linked to suppliers in unpublished table elsewhere.

First initial sync with snapshot is correct and as I expected - PDA receives only the data from parent (and thus child tables) that matches the row filter for the host_name provided.

However - in my scenario host_name <--> suppliers may later be updated E.g. more suppliers assigned to a PDA for use or vice versa. But when I merge the mobile DB, the new data is not downloaded? Tried re-running snapshot, etc., no change.

Question: I thought the filters would remain dynamic and be applied on each sync?

I run a 'harmless' update on parent table using TSQL e.g. "update table set 'X' = 'X'" and re-sync. Now the new parent records are downloaded - but the child records are not!

Question: I wonder why if parent records are supplied, why not child records?

If I delete existing DB and sync new, I get the updated snapshot and all is well - until more data added back at server...

Any help would be greatly appreciated. Is it possible (or not) to have dynamic filters run during second or subsequent merge?

View 4 Replies View Related

T-SQL (SS2K8) :: How To Add Inline TVF With Dynamic Columns From CRL Dynamic Pivot

Mar 9, 2015

I have tried building an Inline TVF, as I assume this is how it would be used on the DB; however, I am receiving the following error on my code, I must be missing a step somewhere, as I've never done this before. I'm lost on how to implement this clr function on my db?

Error:
Msg 156, Level 15, State 1, Procedure clrDynamicPivot, Line 18
Incorrect syntax near the keyword 'external'.
CREATE FUNCTION clrDynamicPivot
(
-- Add the parameters for the function here
@query nvarchar(4000),
@pivotColumn nvarchar(4000),

[code]....

View 1 Replies View Related

Mixing Dynamic SQL With Non-Dynamic In Stored Proc

Mar 24, 2007

I have a Stored Procedure for processing a Bill of Material.

One column on the Assembly Table is a Function Name that contains some busniess rules.

OK, now I'm doing a Proof of Concept and I'm stumped.

Huuuuh!

I will ultimately have about 100 of these things. My plan was using Dynamic SQL to go execute the function.

Note: The function just returns a bit.

So; here's what I had in mind ...

if isnull(@FnNameYN,'') <> ''
exec spinb_CheckYN @FnNameYN, @InvLineID, @FnBit = @FnBit output




CREATE PROCEDURE dbo.spinb_CheckYN
@FnNameYN varchar(50),
@InvLineID int,
@FnBit bit output
AS

declare @SQL varchar(8000)

set @SQL = '
if dbo.' + @FnNameYN + ' (' + convert(varchar(31),@InvLineID) + ')) = 1
set @FnBit = 1
else
set @FnBit = 0'

exec (@SQL)
GO



Obviously; @FnBit is not defined in @SQL so that execution will not work.
Server: Msg 137, Level 15, State 1, Line 4
Must declare the variable '@FnBit'.
Server: Msg 137, Level 15, State 1, Line 5
Must declare the variable '@FnBit'.


So; is there a way to get a value out of a Dynamic SQL piece of code and get that value INTO my OUTPUT variable?


My many thanks to anyone who can solve this riddle for me.
Thank You!


Sigh: For now, it looks like I'll have a huge string of "IF" statements for each business rule function, as follows:
Hopefully a better solution comes to light.

------ Vertical Build1 - Std Vanes -----------
if @FnNameYN = 'fnb_YN_B1_14'
BEGIN
if dbo.fnb_YN_B1_14 (convert(varchar(31),@InvLineID) ) = 1
set @FnBit = 1
else
set @FnBit = 0
END

------ Vertical Build1 - Scissor Vanes -----------
if @FnNameYN = 'fnb_YN_B1_15'
BEGIN
if dbo.fnb_YN_B1_15 (convert(varchar(31),@InvLineID) ) = 1
set @FnBit = 1
else
set @FnBit = 0
END
.
.
.
etc.

View 10 Replies View Related

Dynamic Cursor/ Dynamic SQL Statement

Oct 24, 2004

I've looked up Books Online on Dynamic Cursor/ Dynamic SQL Statement.

Using the examples given in Books Online returns compilation errors. See below.

Does anyone know how to use Dynamic Cursor/ Dynamic SQL Statement?

James



-- SQL ---------------

EXEC SQL BEGIN DECLARE SECTION;
char szCommand[] = "SELECT au_fname FROM authors WHERE au_lname = ?";
char szLastName[] = "White";
char szFirstName[30];
EXEC SQL END DECLARE SECTION;

EXEC SQL
DECLARE author_cursor CURSOR FOR select_statement;

EXEC SQL
PREPARE select_statement FROM :szCommand;

EXEC SQL OPEN author_cursor USING :szLastName;
EXEC SQL FETCH author_cursor INTO :szFirstName;



--Error--------------------
Server: Msg 170, Level 15, State 1, Line 23
Line 23: Incorrect syntax near ';'.
Server: Msg 1038, Level 15, State 1, Line 24
Cannot use empty object or column names. Use a single space if necessary.
Server: Msg 1038, Level 15, State 1, Line 25
Cannot use empty object or column names. Use a single space if necessary.
Server: Msg 170, Level 15, State 1, Line 27
Line 27: Incorrect syntax near ';'.
Server: Msg 170, Level 15, State 1, Line 30
Line 30: Incorrect syntax near 'select_statement'.
Server: Msg 170, Level 15, State 1, Line 33
Line 33: Incorrect syntax near 'select_statement'.
Server: Msg 102, Level 15, State 1, Line 35
Incorrect syntax near 'author_cursor'.
Server: Msg 170, Level 15, State 1, Line 36
Line 36: Incorrect syntax near ':'.

View 2 Replies View Related

Dynamic Source And Dynamic Destination

Apr 15, 2008

I have a requirment which i have partly accomplished , but could not get through completely

i have a file which comes in a standard format ending with date and seq number ,

suppose , the file name is abc_yyyymmdd_01 , for first copy , if it is copied more then once the sequence number changes to 02 and 03 and keep going on .

then i need to transform those in to new file comma delimited destination file with a name abc_yyyymmdd,txt and others counting file counting record abc_count_yyyymmdd.txt. and move it to a designated folder. and the source file is then moved to archived folder


what i have taken apprach is

script task select source file --------------------> data flow task------------------------------------------> script task to destination file

dataflow task -------------------------> does count and copy in delimited format



what is happening here is i can accomlish a regular source file convert it to delimited destination file --------> and move it to destination folder with script task .

but cannot work the dynamic pick of a source file.


please advise with your comments or solution you have

View 14 Replies View Related







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