all groups > sql server (alternate) > september 2007
Filter by week: 1 2 3 4 5
web database question
Posted by Sue at 9/30/2007 11:21:26 PM
Hi, we are thinking of installing sql server as a backend to our
website.
Q.1. What is the best way to do this - should we host the database on
the same IIS server where the website is hosted, or would it be better
to put the database on a server on it's own, separate from the IIS
server?
... more >>
replication
Posted by aleu NO[at]SPAM vp.pl at 9/29/2007 1:38:48 PM
Hi everybody,
Could you please advise me what would be the best method to synchronize
MSSQL data in the following scenario:
SiteA (live site) ----- T1 link ----- SiteB (redundant site)
Each site consists of web server and MSSQL 2005 server. SiteA is the
site that my customers normally u... more >>
dumb question
Posted by news at 9/28/2007 8:43:16 PM
Sorry about this. But I've worked primarily in access for years.
Does SQL Server have a boolean or a yes/no data type for its table columns?
Thanks in advance,
Bill
... more >>
Users Logged In
Posted by RogueIT at 9/28/2007 4:25:41 PM
Is there a way in 2005 to tell what user is logged into what database
on the SQL Server?
thanks,
Scott
... more >>
I want to parse @ArrayOfDays into @d1 through @d5
Posted by bobc at 9/28/2007 2:36:56 PM
In my stored procedure, I want to parse @ArrayOfDays into @d1 through
@d5.
@ArrayOfDays is a varchar input parameter containing,
for example, "1.7.21.25.60." - five elements.
Most active vars:
@i - loop counter
@char - current char in string
@tempVal - contains the current element as it ... more >>
Comparing two tables
Posted by JJ297 at 9/28/2007 6:28:10 AM
What is the correct syntax to do so.
I have the same fields in the table.
Tables called Books and Titles
Fields are TitleID and Titles
Using SQL 2000
Please assist.
Thanks.
... more >>
strategies for paging
Posted by Nick Chan at 9/28/2007 3:12:25 AM
hello, what are the strategies when designing tables that needs
paging?
in the past i used to use
select top 200 * from table
where id not in (select top 100 id from table)
with SQL 2005, would u guys recommend using CTE and/or ROW_NUMBER?
or any other advice?
thanks
... more >>
The best way to use the Database Engine Tuning Advisor
Posted by Tommy Hayes at 9/27/2007 3:58:11 PM
Hello all,
I want to use the SQL Server 2005 Tuning Advisor on our database, and
I'm hoping someone here can just confirm the steps for me. We have a
10GB database that has a number of applications hitting it constantly,
all performing many SELECTs, INSERTs and UPDATEs. Are the following
the ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
I want to return a string to a wrapper from a subordinate stored procedure
Posted by bobc at 9/27/2007 12:36:03 PM
Using SQL Server 2000...
I wrote a wrapper to call a sub proc (code provided below). The
intended varchar value returned in the output parameter of each proc
is a string implementation of an array.
(The string separates elements by adding a period after each value.
e.g. 1. 2. 3. 4. 5. etc., ... more >>
isqlw won't start
Posted by Andre Ma NO[at]SPAM ss at 9/27/2007 12:32:28 PM
Hi there,
I tried to install MS SQL Server 2000 on my desktop computer after
uninstalling a version 7 instance. Everything worked fine. Using
Enterprise Manager I can manage databases and the database enginge itself.
My problem is now, that ISQLW.exe, i.e Query Analayzer won't start. The
... more >>
Set default schema in code - possible?
Posted by aj at 9/27/2007 9:44:20 AM
==SQL Server 2005 SP2==
Is it possible to set the default schema in code?
I know that, for a particular DB user, I can set the default schema
statically in Mgmt Studio. However, I want to do this dynamically
in source code.
I am using JDBC if that matters.
Any help appreciated.
TIA... more >>
Network Packet Size
Posted by kmounkhaty NO[at]SPAM gmail.com at 9/27/2007 8:57:26 AM
Hi Guru,
After we moved from old server (windows 2000, SQL 2000 and SP3a) to a
new server (windows 2003, SQL 2000 and SP4) that cutting down maximum
network packet size to a half, we run into a new issue below:
Message : General network error. Check your network documentation.
Source : .... more >>
Select Into across Linked Servers
Posted by Jennifer at 9/27/2007 8:38:02 AM
Hi. I'm trying to copy from one table to another across 2 different
servers with the following:
select *
into #Tmp_Hdr
from parsaleshdr
where businessday = '9/20/07'
select *
into [pdsqla01\pdsqla01].impact_exec.dbo.parsaleshdr
from #Tmp_Hdr
This gives me an error:
The object name '... more >>
a small SQL Puzzle
Posted by Fiori at 9/26/2007 8:37:12 PM
Hi,
Probable there is a simple solution for this, hopefully someone can
direct me in the right direction.
I have a table with a persons firstname, lastname, birthdate and
address. However, I want to select only one person per address, namely
the eldest of all persons living on the same a... more >>
autoincrement question sql 2005 server
Posted by info at 9/25/2007 3:06:32 PM
How add column autoincrement in sql server 2005 use SQL Server Management
Studio?
Tom
... more >>
Clustered index on the identity column or a datetime column
Posted by Tommy Hayes at 9/25/2007 1:57:37 PM
Hello all,
We have a table with about 2 million rows that is used to store log
events. The table has an identity column and also a datetime column to
record the event time. It is expected to at least double in size over
its lifetime. Because the datetime records the current time, the value
of... more >>
Is it worth partitioning?
Posted by Tommy Hayes at 9/25/2007 3:37:11 AM
Hello all,
We're currently upgrading to SQL Server 2005 and we're trying to
figure out if we should partition some of the tables in the database.
Specifically the two largest tables - both have around 1.5 million
rows and are expected to at least double in size over the lifetime of
the syst... more >>
SQL Query from Access to SQL Server
Posted by rune NO[at]SPAM totalweb.no at 9/25/2007 3:00:48 AM
Hi
I'm trying to convert an SQL Query from Access to SQL Server. The
Access Query goes like this:
SELECT Format(EntryDate, 'ddd mm dd') AS [Day]
FROM JournalEntries
This query returns the name of the day followed by month and date (Su
aug 21)
What would this be like in SQL Server ? Wh... more >>
Moving DB from one drive to another
Posted by Piero 'Giops' Giorgi at 9/24/2007 11:04:13 PM
Hi!
I'm using SQL Server 2005.
The DB has one table partitioned on 50 Filegroups (One per state)
The DB is right now on my drive G: as are the filegroups (But in
separate directories), and for a number of reasons, I have to move the
DB to drive F: but I need to keep the filegroups (With t... more >>
subtraction of different precision values
Posted by ibcarolek at 9/24/2007 10:17:15 AM
We have a field which is decimal (9,2) and another which is decimal
(9,3). Is there anyway to subtract the two and get a precision 3
value without changing the first field to 9,3?
For instance, retail value is 9,2, but our costs are at 9,3 due to
being averaged. To calculate margin (retail-c... more >>
Conn. Prob. contd: 'logon restricted' [Mngm. Studio]
Posted by Daniel Loose at 9/22/2007 12:09:25 PM
Hello again,
and thanx again -
I now found something unexpected - that hopefully is the cause of my
problem? :
In Man. studio > security > anmeldungen (engl. login names or users or
accounts or so?) > right clicking on any user and properties, > status
> sql server authentication is grey... more >>
Strange Connect Problem
Posted by Daniel Loose at 9/22/2007 2:49:43 AM
Hello,
I try to get an asp site to work on my local machine. Using ASP Studio
2005 and mssql server 2005 eval on win xp, and ms management studio.
I'm new to mssql and asp and just want to get the site to run (not
edit). have a simple connect script like
set conn = server.CreateObject("adod... more >>
find unique identifier through multiple tables
Posted by hugues.morel NO[at]SPAM gmail.com at 9/22/2007 2:34:05 AM
Hi,
I need to do a report from data in a database that was provided by a
third party where there is no documentation at all. It contains more
than hundred tables and each table has different GUID fields.
In one table there is GUID as a primary key and another GUID as
foreign key. But there is... more >>
PHP code to Stored Procedure
Posted by aCe at 9/21/2007 11:57:49 PM
hi all,
i need to convert these simple PHP code into stored procedure :
<?php
$result = mssql_query( "SELECT whid, whcode FROM warehouse" );
while( $wh = mssql_fetch_object( $result ) )
{
$result = mssql_query( "SELECT plid, nopl FROM packlist WHERE whid =
'" . $wh->whid . "'";
while(... more >>
connect string problem
Posted by Daniel Loose at 9/21/2007 10:22:21 PM
hello,
i use ms sql server 2005 evaluation version. i just want to get an asp
project to work. not to edit, just to work, on my local machine. for
that i use asp studio 2005. (which processes the asp files). i am
almost done, asp is processed, runs, even server connection is up.
but for ho... more >>
Do foreign keys generate implicit indexes?
Posted by at 9/21/2007 7:51:14 PM
If i create a simple table with a foreign key constraint, does it
create an implicit index on that given ID? I've been told this is
done in some databases, but i need to know for sure if SQL Server does
it. Has anyone heard of this before, on any other databses perhaps?
Heres an example of h... more >>
Audit table, finding first change for each item
Posted by rdraider at 9/21/2007 6:01:45 PM
I have an audit table that tracks changes to inventory items. I am trying
to find the first change in avg_cost per item. The table will contain 1 row
for the before record and another row for the changed to record. The table
tracks everything change to items, not just avg_cost.
'B' in wher... more >>
running status for jobs
Posted by Andy.H.Kwok NO[at]SPAM gmail.com at 9/21/2007 2:34:52 AM
Hello all,
I would like to know how to how to know through sql queries if a job
that was processed is still running...
I tried to use msdb..systasks but it doesn't seem to help (status not
running and status running only).
Thanks in advance for your answer.
Andy
... more >>
number of databases in sql server 2005
Posted by sledge at 9/20/2007 5:49:52 PM
Hello,
If I have a database of 5 GB with only 20 tables in it, how many of
those can we put in how many database servers on a high end machine
(Dual Xeon 8 GB on windows 2003)?
It is to maka a quotation and an estimation of the cost.
TIA
Mario
... more >>
Create Function permission...
Posted by Matthew Wells at 9/20/2007 4:56:27 PM
How do I give a Windows group complete rights (including create) to all
stored procedures and user defined functions without giving them dbo access
in SQL Server 2005? If I have to I can do it from the Management Console,
but I would also like to know the commands.
Thanks
Matthew Wells
... more >>
CREATE Table permission
Posted by Sharif Islam at 9/20/2007 11:20:39 AM
I gave a user explicit permission to create table, but still getting
this error:
Property Default Schema is not available for database[DBNAME]. This
property may not exist for this object or may not be recoverable due to
insufficient access right. Microsoft.SQLServer.Express.SQLEditors
D... more >>
Delete or detach a Suspect database
Posted by rdraider at 9/20/2007 10:02:38 AM
Everything I read about sp_resetstatus says you must restart SQL after. Is
there a way around that (don't want to shut down production). The suspect
db is just an empty db that is not needed. I need to create another db with
the same name.
Thanks.
... more >>
Super Function II
Posted by steve at 9/20/2007 9:32:42 AM
When tables are 'variables' you can create what I called
a 'Super Function'. Pass any table of the appropriate 'type'
to the function, it's that simple. The example was a function
that returned a dense rank including when the target column
of the rank repeats. The function assumed a single prima... more >>
Select statement help
Posted by krusz10 NO[at]SPAM hotmail.co.uk at 9/20/2007 8:47:24 AM
I have a table (tableA) that lists a number of other tables on the
same database. I want to search each table listed in tableA for an
existence of an known entry and then display that entry and the table
its in
I can do it in other scripting languages but I'm new to SQL. Can you
help
I sort ... more >>
How Do I give EXECUTE Permissions on Stored Procedures?
Posted by at 9/20/2007 7:14:34 AM
Hey guys,
I'm pretty new to SQL configuration, and I need to give EXECUTE
persmissions for one of the SQL user roles. I am running SQL 2005
Management Studio Express - free version. I found the list of my
stored procedures, but I can not locate any permissions screen. Can
someone help poin... more >>
How to select count records that "contain" data?
Posted by Terry Olsen at 9/19/2007 9:45:55 PM
I have a table in SQL Server that looks like this:
Name Status
---------------------------
Steve Complete
Steve In Queue
John Pending
John Complete
John Complete
Tim In Queue
I need to throw a query at this that will return t... more >>
Creating a View from a Stored procedure
Posted by apothecary at 9/19/2007 2:43:04 PM
Hello
Newbie here.
Is there a way of creating a VIEW...using a stored procedure. I am
basically trying to create a view to return some data that I am
getting using a stored procedure.
I have created the procedure and when I execute this its working ok.
The stored procedure uses a datefro... more >>
Nightly Refresh
Posted by rohini.srigiriraju NO[at]SPAM gmail.com at 9/19/2007 2:40:12 PM
Please help.
I have Database A (Archived data), Database B (Transactional data).
Both A and B do not have any timestamps in any tables.
I need to bring A (only once because it is archived data) and B with
only differentials into Database C for reporting purposes.
Currently C is cleared before... more >>
How do I view table information such as constraints?
Posted by ben_cameron00 NO[at]SPAM hotmail.com at 9/19/2007 1:40:49 AM
I remember once using a command in Query Analyser that gave me all the
information about a table. It showed details about the columns,
constraints, keys, indexes etc.
I can't remember how I did this? Can anyone help me?
It could of been a stored proc that I called or a query on the system
t... more >>
Comparing databases
Posted by ByB at 9/18/2007 11:25:28 PM
Hello,
I would like to make a comparison between two databases in SQL server,
to find differences between tables, procedures and so on.
I have searched the web and found several softwares able to perform the
task, but none able to compare a database with a backup otained from a
SQL Serve... more >>
Using ASP.NET to login to SQL Server 2005 Database
Posted by AMD_GAMER at 9/18/2007 8:42:15 PM
Hi,
I am running the following configuration:
Windows Server 2003 Enterprise Edition SP2
ASP.NET 2.0
SQL Server 2005
I currently have a website in IIS that has ASP.NET enabled. I have a
login.aspx page which has the login box with the username and
password. When I cli... more >>
Using Scalar functions in views
Posted by mcleana NO[at]SPAM sympatico.ca at 9/18/2007 7:21:43 PM
I have a view that contains a complex query. A few of the columns
call a function that returns a specific output. I also use a function
to do a join as well.
For example:
SELECT l.ID, dbo.getStatus(l.ID) AS statusID
FROM tableName A
LEFT OUTER JOIN dbo.Status_LKP s ON dbo.getStatus(l.Leg... more >>
How to work with time in format 'hhh:mm:ss' (more than 24 hours)
Posted by at 9/18/2007 4:28:44 PM
Hello,
I need to create a column that will store hours bigger than 24. For
example '25:00:00', '129:23:12', etc).
That column will be used too, for perform calculations between
datetime intervals: 'time'.
In MySQL there is a datatype that perfect fits that necessity.
Does anyone know wha... more >>
win2k3 sp2 and sql server 2k
Posted by mmark751969 NO[at]SPAM yahoo.com at 9/18/2007 3:13:55 PM
I have a win2k3 server that i am going to need to upgrade to service
pack 2. It is running sql server 2000(sem reports version 8.0 - i
think that is sql server 2000). It has profiler and query analyzer
running as well. Are there any caveats i need to be concerned about
before installing win2k... more >>
Design Table; Columns/Description get with SP???
Posted by vesta at 9/18/2007 9:29:46 AM
Hi,
I'm using stored procedures to create an online data dictionary for
all of our dbs and I thought it would be very cool if there was a way
that I could somehow pull the columns description entered in the table
design view (lower pane) of EM. I have poked around, but have not
found a way. ... more >>
Retrieve ONLY first/max
Posted by Mark at 9/18/2007 4:03:37 AM
So, I have a query
SELECT type
FROM order, product
WHERE order.id = product.id
GROUP BY type
ORDER BY sum(units) DESC
but I only want the first row. MS SQL 2005 doesn't seem to support
"LIMIT" or "FIRST" which is unfortunate. I can shove that whole query
into another one that checks the... more >>
time conversion hiccup
Posted by DonLi2006 NO[at]SPAM gmail.com at 9/18/2007 3:09:52 AM
Hi,
ddl & dml
project varchar(10) start char(5) stop char(5)
------------------------- ----- -----
hey now 21:00 19:25
new test 20:25 20:30
t 10 21:00 NULL
t 11 21:10 21:35
t 12 21:30 22:... more >>
ODBC & Remote SQL Server
Posted by pradeep at 9/17/2007 10:07:19 PM
Hello,
How to create system DSN (ODBC) on windows 2003 for SQL Server located
on remote machine ?
Please, guide me.
Bye.
... more >>
MS SQL compare columns to generate display name
Posted by Yas at 9/17/2007 4:32:33 AM
Hello, I have the following table with 4 columns....
firstname, lastname1, lastname2, EMAIL
Table has user names and email, I would like to generate a 5th column
called DisplayName.
The email Id is sometimes firstname.lastname1.lastname2@ and others
just firstname.lastname1@
I would like... more >>
Require Solution for this SQL problem
Posted by Nick at 9/15/2007 3:53:08 AM
Hi,
I have two tables TableA and TableB. I have a stored procedure which
runs every morning and based on some logic dumps rows from TableA to
TableB. In Table B there are two additional colums ID and RunID. ID is
a normal sequence applied for all rows. But the RunId should be
constant for a r... more >>
|