Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Friday, March 30, 2012

mdb file support UTF8

i create mdb file in VB.NET project in vs2005 . i want that it support UTF8 for arabic language.

thanks .

There are two ways to do that you can create typed dataset with UTF8 or use some configuration provided by Microsoft, so there is no standard way to do it. Hope this helps.

http://msdn2.microsoft.com/en-us/library/aa662944(office.11).aspx

http://office.microsoft.com/en-us/ork2003/HA011402281033.aspx

Friday, March 23, 2012

MCMS Content inventory

Hi,

I would like to know how does CMS stores content inventory in SQLserver.?

Example-If I create or migrate an application to CMS in sqlDB how does information is stored ?

Regards

T.Gunaseelan

what is MCMS? is this part of the "Dynamics" platform? And how does this related to SQLCLR technology?

Derek

|||

Hi,

MCMS stands for Microsoft Content Management Server.

The MCMS handles all the web contents using SQL2000 DataBase . I would like to know how it is handling or managing the content repsitory or inventory in the DB?

Regards,

Guna

|||

"I would like to know how it is handling or managing the content repsitory or inventory in the DB?"

This questions sounds more specific to the MCMS product than SQL Server.

Wednesday, March 21, 2012

May I have your purmisshun?


Hi;

I'm a novice, and I need to set permissions in SQL Server 2005 (with Server Mgmt Studio)
so that I can create, modify, and delete tables in a database through my ASP.NET application.
I can't seem to find anything that spells this out - step-by-step - so that any idiot can follow it.

This is my error message:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
### Exception Number : 262
### (CREATE TABLE permission denied in database "MyDBase''.)
### Message: CREATE TABLE permission denied in database "MyDBase''. Number: 262
### Procedure: Server: SYS-EML8V3\SQL2005D01
### Source: .Net SqlClient Data Provider State: 1 Severity: 14 LineNumber: 1
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Does anyone have a link to something that might give me a clue?

THANKS!

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:

(under Databases -> Your Database -> Security -> Users)

|||

Dejan Vesic:

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:

(under Databases -> Your Database -> Security -> Users)

Hi Dejan;

I tried this with the ASPNET user, but it didn't work - I got the same error.

I must be missing something. Is there another user that I'm supposed to be setting this for?

THANKS!

|||

wASP:

Dejan Vesic:

Well, use some kind of tool, for example,Microsoft SQL Server Management Studio Express, and give to your user used in connection string appropriate right:


(under Databases -> Your Database -> Security -> Users)

Hi Dejan;

I tried this with the ASPNET user, but it didn't work - I got the same error.

I must be missing something. Is there another user that I'm supposed to be setting this for?

THANKS!

UPDATE ...

I've given the ASPNET user the "sysadmin" Server role - and it seems to have worked.

My next question is: Have I done something stupid (in terms of compromising security)?

THANKS!

|||

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

|||

Caddre:

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

Hi Caddre;

I think I've gotten everything set OK now - thanks to yourself and Dejan - and the link to that article (which I will save).

THANKS AGAIN!


|||

wASP:

Caddre:

The answer is yes you can use either DBO(database owner) which is still risky but less so than Sysdamin or DDL admin. Try the link below for details. Hope this helps.

http://msdn2.microsoft.com/en-us/library/ms189612.aspx

Hi Caddre;

I think I've gotten everything set OK now - thanks to yourself and Dejan - and the link to that article (which I will save).

THANKS AGAIN!

I am glad I could help.

May I create not unique clustered index?

Hi,
When create clustered index, the column must be unique? Or
I can do Create Clustered index index_name ON table
(column_name)?
Any input much appreciate!
JennyThere is nothing that stops you from having a clustered index on a
non-unique column. By having your clustered index on a unique column we get
a narrowed selectivity when quering on that column ...
--
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
"Jenny" <jyu@.iseoptions.com> wrote in message
news:0cfc01c3a473$01686900$a301280a@.phx.gbl...
> Hi,
> When create clustered index, the column must be unique? Or
> I can do Create Clustered index index_name ON table
> (column_name)?
> Any input much appreciate!
> Jenny|||The column does not need to be unique.
"Jenny" <jyu@.iseoptions.com> wrote in message
news:0cfc01c3a473$01686900$a301280a@.phx.gbl...
> Hi,
> When create clustered index, the column must be unique? Or
> I can do Create Clustered index index_name ON table
> (column_name)?
> Any input much appreciate!
> Jenny|||no, they do not need to be unique
CREATE CLUSTERED INDEX IXNAME ON TABLENAME(COLUMNLIST)
Kevin Connell, MCDBA
----
The views expressed here are my own
and not of my employer.
----
"Jenny" <jyu@.iseoptions.com> wrote in message
news:0cfc01c3a473$01686900$a301280a@.phx.gbl...
> Hi,
> When create clustered index, the column must be unique? Or
> I can do Create Clustered index index_name ON table
> (column_name)?
> Any input much appreciate!
> Jenny

Maximum Worker Threads

SQL Server had reached it's maximum (255) worker threads during the
transaction log creation.
SQL Server was unable create to worker thread to create the transaction log
file.
The database had several blocked processes but no deadlocks.
The next time period the database transaction log file was created without a
problem.
This is the first time the maximum threads has been reached.
This system has run for 2 years know.
Should I change the Maximum Worker Theads?
Thanks,What exactly do you mean by "SQL Server had reached it's maximum (255) worker
threads during the transaction log creation" ? Was this is the error message?
And what OS and SQL server version are you using?
Thanks
GYK
"Joe K.." wrote:
> SQL Server had reached it's maximum (255) worker threads during the
> transaction log creation.
> SQL Server was unable create to worker thread to create the transaction log
> file.
> The database had several blocked processes but no deadlocks.
> The next time period the database transaction log file was created without a
> problem.
> This is the first time the maximum threads has been reached.
> This system has run for 2 years know.
> Should I change the Maximum Worker Theads?
> Thanks,
>|||Yes, I reached the default maximum worker threads of 255.
The SQL Server errorlog messages is:
2004-12-08 10:31:12.88 spid239 startsubprocess: Limit on 'Max worker
threads' reached.
Thanks,
"Joe K.." wrote:
> SQL Server had reached it's maximum (255) worker threads during the
> transaction log creation.
> SQL Server was unable create to worker thread to create the transaction log
> file.
> The database had several blocked processes but no deadlocks.
> The next time period the database transaction log file was created without a
> problem.
> This is the first time the maximum threads has been reached.
> This system has run for 2 years know.
> Should I change the Maximum Worker Theads?
> Thanks,
>

Monday, March 19, 2012

Maximum Worker Threads

SQL Server had reached it's maximum (255) worker threads during the
transaction log creation.
SQL Server was unable create to worker thread to create the transaction log
file.
The database had several blocked processes but no deadlocks.
The next time period the database transaction log file was created without a
problem.
This is the first time the maximum threads has been reached.
This system has run for 2 years know.
Should I change the Maximum Worker Theads?
Thanks,
What exactly do you mean by "SQL Server had reached it's maximum (255) worker
threads during the transaction log creation" ? Was this is the error message?
And what OS and SQL server version are you using?
Thanks
GYK
"Joe K.." wrote:

> SQL Server had reached it's maximum (255) worker threads during the
> transaction log creation.
> SQL Server was unable create to worker thread to create the transaction log
> file.
> The database had several blocked processes but no deadlocks.
> The next time period the database transaction log file was created without a
> problem.
> This is the first time the maximum threads has been reached.
> This system has run for 2 years know.
> Should I change the Maximum Worker Theads?
> Thanks,
>
|||Yes, I reached the default maximum worker threads of 255.
The SQL Server errorlog messages is:
2004-12-08 10:31:12.88 spid239 startsubprocess: Limit on 'Max worker
threads' reached.
Thanks,
"Joe K.." wrote:

> SQL Server had reached it's maximum (255) worker threads during the
> transaction log creation.
> SQL Server was unable create to worker thread to create the transaction log
> file.
> The database had several blocked processes but no deadlocks.
> The next time period the database transaction log file was created without a
> problem.
> This is the first time the maximum threads has been reached.
> This system has run for 2 years know.
> Should I change the Maximum Worker Theads?
> Thanks,
>

Maximum Row Size in SQL Server 2000

Using this code:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (8000) NULL ,
[COMMENT2] [varchar] (8000) NULL
) ON [PRIMARY]
GO
I get the error: Warning: The table 'test' has been created but its maximum
row size (16029) exceeds the maximum number of bytes per row (8060).
However, I can create a table with smaller field lengths:
CREATE TABLE [dbo].[test] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[COMMENT1] [varchar] (10) NULL ,
[COMMENT2] [varchar] (10) NULL
) ON [PRIMARY]
GO
I can then alter the field lengths in Enterprise Manager back to 8000 and
not get the error. I also notice I can import data from a text file and a
table will be created with numerous varchar fields that are each 8000 in
size. Why cannot I create the table with multiple 8000 length fields but SQL
Server allows me to modify an existing table or import into a table that has
multiple 8000 length fields?
Thank you.Hi,
like you said, you get a "Warning" no error. SQL Server just wants to
keep you informed that the data *might* be truncated, if you insert
more than 8000 characters, but the table *will* be created.
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--|||The warning you get is only a warning. The table is still created. Read the warning text carefully.
The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
UPDATE), then that operation will fail.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
> Using this code:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (8000) NULL ,
> [COMMENT2] [varchar] (8000) NULL
> ) ON [PRIMARY]
> GO
> I get the error: Warning: The table 'test' has been created but its maximum
> row size (16029) exceeds the maximum number of bytes per row (8060).
> However, I can create a table with smaller field lengths:
> CREATE TABLE [dbo].[test] (
> [ID] [int] IDENTITY (1, 1) NOT NULL ,
> [COMMENT1] [varchar] (10) NULL ,
> [COMMENT2] [varchar] (10) NULL
> ) ON [PRIMARY]
> GO
> I can then alter the field lengths in Enterprise Manager back to 8000 and
> not get the error. I also notice I can import data from a text file and a
> table will be created with numerous varchar fields that are each 8000 in
> size. Why cannot I create the table with multiple 8000 length fields but SQL
> Server allows me to modify an existing table or import into a table that has
> multiple 8000 length fields?
> Thank you.
>
>
>|||Thank you for the information. So I can have a table with numerous varchar
8000 fields and I'm ok as long as a single inserted row does not contain more
than 8060 characters. Is this correct?
"Tibor Karaszi" wrote:
> The warning you get is only a warning. The table is still created. Read the warning text carefully.
> The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
> UPDATE), then that operation will fail.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
> > Using this code:
> >
> > CREATE TABLE [dbo].[test] (
> > [ID] [int] IDENTITY (1, 1) NOT NULL ,
> > [COMMENT1] [varchar] (8000) NULL ,
> > [COMMENT2] [varchar] (8000) NULL
> > ) ON [PRIMARY]
> > GO
> >
> > I get the error: Warning: The table 'test' has been created but its maximum
> > row size (16029) exceeds the maximum number of bytes per row (8060).
> >
> > However, I can create a table with smaller field lengths:
> >
> > CREATE TABLE [dbo].[test] (
> > [ID] [int] IDENTITY (1, 1) NOT NULL ,
> > [COMMENT1] [varchar] (10) NULL ,
> > [COMMENT2] [varchar] (10) NULL
> > ) ON [PRIMARY]
> > GO
> >
> > I can then alter the field lengths in Enterprise Manager back to 8000 and
> > not get the error. I also notice I can import data from a text file and a
> > table will be created with numerous varchar fields that are each 8000 in
> > size. Why cannot I create the table with multiple 8000 length fields but SQL
> > Server allows me to modify an existing table or import into a table that has
> > multiple 8000 length fields?
> >
> > Thank you.
> >
> >
> >
> >
> >
> >
>
>|||Try it :
INSERT INTO TEST VALUES (REPLICATE('*', 80000), REPLICATE('*', 44))
A +
Brian P a écrit :
> Thank you for the information. So I can have a table with numerous varchar
> 8000 fields and I'm ok as long as a single inserted row does not contain more
> than 8060 characters. Is this correct?
> "Tibor Karaszi" wrote:
>> The warning you get is only a warning. The table is still created. Read the warning text carefully.
>> The table is created, but if you , for a row, try to have > 8060 bytes (when you do INSERT or
>> UPDATE), then that operation will fail.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
>> news:7F71DB7B-6F5E-4ABC-90AA-A988691D095A@.microsoft.com...
>> Using this code:
>> CREATE TABLE [dbo].[test] (
>> [ID] [int] IDENTITY (1, 1) NOT NULL ,
>> [COMMENT1] [varchar] (8000) NULL ,
>> [COMMENT2] [varchar] (8000) NULL
>> ) ON [PRIMARY]
>> GO
>> I get the error: Warning: The table 'test' has been created but its maximum
>> row size (16029) exceeds the maximum number of bytes per row (8060).
>> However, I can create a table with smaller field lengths:
>> CREATE TABLE [dbo].[test] (
>> [ID] [int] IDENTITY (1, 1) NOT NULL ,
>> [COMMENT1] [varchar] (10) NULL ,
>> [COMMENT2] [varchar] (10) NULL
>> ) ON [PRIMARY]
>> GO
>> I can then alter the field lengths in Enterprise Manager back to 8000 and
>> not get the error. I also notice I can import data from a text file and a
>> table will be created with numerous varchar fields that are each 8000 in
>> size. Why cannot I create the table with multiple 8000 length fields but SQL
>> Server allows me to modify an existing table or import into a table that has
>> multiple 8000 length fields?
>> Thank you.
>>
>>
>>
>>
Frédéric BROUARD, MVP SQL Server, expert bases de données et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modélisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Correct. And, btw, this restriction has been removed in SQL Server 2005 ("page overflow").
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brian P" <BrianP@.discussions.microsoft.com> wrote in message
news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
> Thank you for the information. So I can have a table with numerous varchar
> 8000 fields and I'm ok as long as a single inserted row does not contain more
> than 8060 characters. Is this correct?
>|||Brian
But be aware that SQL Server 2005 row_overflow data only applies to variable
length fields.
You cannot have multiple char(8000) columns, for example.
--
HTH
Kalen Delaney, SQL Server MVP
www.solidqualitylearning.com
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...
> Correct. And, btw, this restriction has been removed in SQL Server 2005
> ("page overflow").
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
>> Thank you for the information. So I can have a table with numerous
>> varchar
>> 8000 fields and I'm ok as long as a single inserted row does not contain
>> more
>> than 8060 characters. Is this correct?|||Thanks everyone for the good information. I appreciate the feedback.
Brian
"Kalen Delaney" wrote:
> Brian
> But be aware that SQL Server 2005 row_overflow data only applies to variable
> length fields.
> You cannot have multiple char(8000) columns, for example.
> --
> HTH
> Kalen Delaney, SQL Server MVP
> www.solidqualitylearning.com
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ecx6jdYXGHA.4132@.TK2MSFTNGP04.phx.gbl...
> > Correct. And, btw, this restriction has been removed in SQL Server 2005
> > ("page overflow").
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "Brian P" <BrianP@.discussions.microsoft.com> wrote in message
> > news:4AA95B81-5246-470E-A270-11810106F346@.microsoft.com...
> >> Thank you for the information. So I can have a table with numerous
> >> varchar
> >> 8000 fields and I'm ok as long as a single inserted row does not contain
> >> more
> >> than 8060 characters. Is this correct?
> >>
>
>

Monday, March 12, 2012

maximum number of views

What is the maximum number of views that you can create
for a SQL Server 2000 database?Only limited by the maximum number of objects you can create in a =database - which is huge (documented in BOL) under "maximum capacity =specifications". If i remember right it is about 2 billion in theory =but something else will get you first, so for sake of argument I would =sy there is no practical limit.
I'm interested why this would be an issue?
Mike John
"Derek Ruesch" <anonymous@.discussions.microsoft.com> wrote in message =news:31c901c470fa$1c952d90$a301280a@.phx.gbl...
> What is the maximum number of views that you can create > for a SQL Server 2000 database?|||Mike,
I have 31 views currently in my database and I plan on
adding another 20 views or so. I just wanted to make sure
that I could have this many views.
Derek
>--Original Message--
>Only limited by the maximum number of objects you can
create in a database - which is huge (documented in BOL)
under "maximum capacity specifications". If i remember
right it is about 2 billion in theory but something else
will get you first, so for sake of argument I would sy
there is no practical limit.
>I'm interested why this would be an issue?
>Mike John
>"Derek Ruesch" <anonymous@.discussions.microsoft.com>
wrote in message news:31c901c470fa$1c952d90
$a301280a@.phx.gbl...
>> What is the maximum number of views that you can create
>> for a SQL Server 2000 database?
>.
>|||No problem whatsoever from a system limit point of view. I was a bit =concerned you planned on creating the odd 10000 or so, which would have =impled a very odd design!
Mike John
"Derek Ruesch" <anonymous@.discussions.microsoft.com> wrote in message =news:321101c47101$615f7b90$a301280a@.phx.gbl...
> Mike,
> > I have 31 views currently in my database and I plan on > adding another 20 views or so. I just wanted to make sure > that I could have this many views.
> > Derek
> > >--Original Message--
> >Only limited by the maximum number of objects you can > create in a database - which is huge (documented in BOL) > under "maximum capacity specifications". If i remember > right it is about 2 billion in theory but something else > will get you first, so for sake of argument I would sy > there is no practical limit.
> >
> >I'm interested why this would be an issue?
> >
> >Mike John
> >
> >"Derek Ruesch" <anonymous@.discussions.microsoft.com> > wrote in message news:31c901c470fa$1c952d90
> $a301280a@.phx.gbl...
> >> What is the maximum number of views that you can create > >> for a SQL Server 2000 database?
> >.
> >

Wednesday, March 7, 2012

Maximum date with a twist

Please help.
I have this query which works fine to get the maximum create date between 6
tables:
create table #temp1 (create_date datetime,call_stat char(30))
insert into #temp1 (create_date,call_stat)
(SELECT create_dt,'Disposition' as call_stat FROM tblotherdisposition where
scp_seqno = @.scpseqno
union all
SELECT create_dt,'Pending' as call_stat FROM Tblpendings where scp_seqno =
@.scpseqno
union all
SELECT create_dt,'Referred to CompanyA' as call_stat FROM
tblreferredtoCompanyA where scp_seqno = @.scpseqno
union all
SELECT create_dt,'Referred to CompanyB' as call_stat FROM
TblReferredToCompanyB where scp_seqno = @.scpseqno
union all
SELECT create_dt,'Appointment' as call_stat FROM t_appointment where
scp_seqno = @.scpseqno
union all
SELECT create_dt,'Unknown' as call_stat FROM tblsurvey where scp_seqno =
@.scpseqno)
select call_stat as status from #temp1
where create_date = (select max(create_date) from #temp1)
**Recent testing shows that the Appointment create date is always less than
the
create date of tblsurvey by a few minutes. When this happens, I still want
call status = Appointment rather than "Unknown". How can I change my query
to reflect this discovery.
TIA,
--
LynPlease post table structures with sample data along with expected results
for others to better understand you requirements. For details refer to:
www.aspfaq.com/5006
Do you just want to display call_stat as 'Appointment'? Then you can use a
CASE directly in your SELECT list. If you are concerned about the create_dt
value, then you can write something along the lines of:
SELECT TOP 1 call_stat
FROM ( < your union-ed query > ) D
ORDER BY create_date DESC
If you are using the #temp table, use your subquery like:
WHERE create_date = ( SELECT MAX( create_date )
FROM #temp1 WHERE call_stat <> 'Unknown' ) ;
If this has to be done in the inner query, use a CASE expression like:
MAX( CASE WHEN call_stat <> 'unknown' THEN create_date )
Anith|||Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, data types, etc. in
your schema are. Sample data is also a good idea, along with clear
specifications. It is very hard to debug code when you do not let us
see it.
There is a common newbiew design flaw called attribute splitting. You
take an attribute and make each value into a separate table. It is
like using a card sorter back when we had punch card (aka "unit
record") data systems.
CREATE TABLE Survey
(create_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, -- screw the
SOX audit rule!
call_status CHAR(30) NOT NULL -- code is too long!
CHECK (call_stat IN ('Pending', 'Referred to Company A', 'Referred
to Company B', 'Appointment', 'Unknown')),
..);
Now the query is simple:
SELECT create_dt, call_stat
FROM Survey
WHERE scp_seq = @.my_scpseq;
But the code implies that this is really screwed up. What you probably
want is a history under the contorl a transition table. Go to
DBAzine.com to learn what a transition constraint table is; I have a
short article there. Google aroudn here for history table.
You are at the point in your education where you still put those
stupid, redudant "tbl-" prefixes on table names. Do not expect
learning how to do it right is going to be quick or easy. And you all
you will get on Newsgroup is stinking dirty kludges.|||I am sorry, I forget to mention that yoru call_status needs to be put
into a well-designed encoding scheme. Get a copy of SQL PROGRAMMING
STYLE for details.|||Please share some details. Heck, if you share some of the details here it
might make a few more people buy your book. Shoot, I might even buy a copy
or two. :) As it stands now, with the title in all caps I halfway expect
that the book will yell at me for 272 pages. If I want yelled at for a few
hours, I will call my wife stupid and it won't cost 30 buck:)
----
Louis Davidson - http://spaces.msn.com/members/drsql/
SQL Server MVP
"Arguments are to be avoided: they are always vulgar and often convincing."
(Oscar Wilde)
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1139275655.490414.101310@.f14g2000cwb.googlegroups.com...
>I am sorry, I forget to mention that yoru call_status needs to be put
> into a well-designed encoding scheme. Get a copy of SQL PROGRAMMING
> STYLE for details.
>|||> CREATE TABLE Survey
> (create_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, -- screw the
> SOX audit rule!
> call_status CHAR(30) NOT NULL -- code is too long!
> CHECK (call_stat IN ('Pending', 'Referred to Company A', 'Referred
> to Company B', 'Appointment', 'Unknown')),
> ..);
Where is the PRIMARY KEY?
Again, another fundemental mistake.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@.earthlink.net> wrote in message
news:1139275517.755904.323520@.o13g2000cwo.googlegroups.com...
> Please post DDL, so that people do not have to guess what the keys,
> constraints, Declarative Referential Integrity, data types, etc. in
> your schema are. Sample data is also a good idea, along with clear
> specifications. It is very hard to debug code when you do not let us
> see it.
> There is a common newbiew design flaw called attribute splitting. You
> take an attribute and make each value into a separate table. It is
> like using a card sorter back when we had punch card (aka "unit
> record") data systems.
> CREATE TABLE Survey
> (create_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, -- screw the
> SOX audit rule!
> call_status CHAR(30) NOT NULL -- code is too long!
> CHECK (call_stat IN ('Pending', 'Referred to Company A', 'Referred
> to Company B', 'Appointment', 'Unknown')),
> ..);
> Now the query is simple:
> SELECT create_dt, call_stat
> FROM Survey
> WHERE scp_seq = @.my_scpseq;
> But the code implies that this is really screwed up. What you probably
> want is a history under the contorl a transition table. Go to
> DBAzine.com to learn what a transition constraint table is; I have a
> short article there. Google aroudn here for history table.
> You are at the point in your education where you still put those
> stupid, redudant "tbl-" prefixes on table names. Do not expect
> learning how to do it right is going to be quick or easy. And you all
> you will get on Newsgroup is stinking dirty kludges.
>|||"Louis Davidson" <dr_dontspamme_sql@.hotmail.com> wrote in message
news:uOb4zp5KGHA.3396@.TK2MSFTNGP10.phx.gbl...
> If I want yelled at for a few hours, I will call my wife stupid and it
> won't cost 30 buck:)
How much does a dozen roses go for these days...|||Thank you for the input. I would have appreciated your help without
sabotaging
my coding and throwing insults at me. I posted here to understand where I
am doing wrong. You might be an excellent SQL programmer but your character
needs a lot of fine tuning.
--
lyn
"--CELKO--" wrote:

> Please post DDL, so that people do not have to guess what the keys,
> constraints, Declarative Referential Integrity, data types, etc. in
> your schema are. Sample data is also a good idea, along with clear
> specifications. It is very hard to debug code when you do not let us
> see it.
> There is a common newbiew design flaw called attribute splitting. You
> take an attribute and make each value into a separate table. It is
> like using a card sorter back when we had punch card (aka "unit
> record") data systems.
> CREATE TABLE Survey
> (create_date DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, -- screw the
> SOX audit rule!
> call_status CHAR(30) NOT NULL -- code is too long!
> CHECK (call_stat IN ('Pending', 'Referred to Company A', 'Referred
> to Company B', 'Appointment', 'Unknown')),
> ...);
> Now the query is simple:
> SELECT create_dt, call_stat
> FROM Survey
> WHERE scp_seq = @.my_scpseq;
> But the code implies that this is really screwed up. What you probably
> want is a history under the contorl a transition table. Go to
> DBAzine.com to learn what a transition constraint table is; I have a
> short article there. Google aroudn here for history table.
> You are at the point in your education where you still put those
> stupid, redudant "tbl-" prefixes on table names. Do not expect
> learning how to do it right is going to be quick or easy. And you all
> you will get on Newsgroup is stinking dirty kludges.
>|||Lyn,
Don't take it personally, Celko attacks everyone like that. If you can wade
through the insults you can often find some useful suggestions. Truth is,
this post was actually quite civil, I truely think he was trying to be nice.
The "newbie design flaw" and "stupid, redudant "tbl-" prefixes" comments are
just part of how he talks here.
"stinking dirty kludges" refers to the solutions that you will get from
others on the newsgroup. I may be able to post one myself, if I can quite
figure out what you need, although I suspect it will involve a couple
subqueries with exists or not exists.
One simple solution is to select each date as a seperate column (outer joins
on scp_seqno), then you will be able to compare all the columns at once to
determine which is the maximum based on whether one column or another is
populated.
He is correct that the database design could probably use some changes.
Whatever help you get here will solve the problem for now, but at the risk
of leaving more complicated code to work with later.
"Lyn" <pablomb@.optonline.net> wrote in message
news:B7C59EFA-7B3B-43BB-BEB6-207A7966F326@.microsoft.com...
> Thank you for the input. I would have appreciated your help without
> sabotaging
> my coding and throwing insults at me. I posted here to understand where I
> am doing wrong. You might be an excellent SQL programmer but your
character
> needs a lot of fine tuning.
> --
> lyn
>
> "--CELKO--" wrote:
>|||Thanks Jim but if someone wanted to teach instead of insult -they
are more likely to learn and be inspired to change rather than kick them
when they are already down.
Anyway, what I'm trying to do is here:
I wanted to get the call status from the 6 tables where create date is the
latest.
Parent/Main table is - tblSurvey
The rest of the tables are just child/related tables.
In Access, I have the main form bound to tblSurvey
and the rest of the subforms are either - Appointment,Pending,
Other Disposition, Referred to CompanyA or Referred to CompanyB.
When a dept. gets a call they either select from one of the subforms
and then I write the call status in tblSurvey.
If the subforms are not filled in - it will be "Unknown".
In the case of Appointments, tblAppointments gets committed first before
tblsurvey by a few minutes or even seconds. We want the status to be as
"Appointment" instead of "Unknown".
tblSurvey:
PK - scp_seqno
create_dt
call_status
other fields
tblAppointments
Pk-Appt_seqno
FK-scp_seqno
create_dt
other fields
tlbPendings
pk-Pending_seqno
fK - scp_seqno
create_dt
other fields
tblReferredtoCompanyA
Pk-companyA_seqno
fk- scp_seqno
create_dt
other fields
and the same goes for the rest of the child tables.
Hopefully this is clear. Thanks for any ideas.
"Jim Underwood" wrote:

> Lyn,
> Don't take it personally, Celko attacks everyone like that. If you can wa
de
> through the insults you can often find some useful suggestions. Truth is,
> this post was actually quite civil, I truely think he was trying to be nic
e.
> The "newbie design flaw" and "stupid, redudant "tbl-" prefixes" comments a
re
> just part of how he talks here.
> "stinking dirty kludges" refers to the solutions that you will get from
> others on the newsgroup. I may be able to post one myself, if I can quite
> figure out what you need, although I suspect it will involve a couple
> subqueries with exists or not exists.
> One simple solution is to select each date as a seperate column (outer joi
ns
> on scp_seqno), then you will be able to compare all the columns at once to
> determine which is the maximum based on whether one column or another is
> populated.
> He is correct that the database design could probably use some changes.
> Whatever help you get here will solve the problem for now, but at the risk
> of leaving more complicated code to work with later.
> "Lyn" <pablomb@.optonline.net> wrote in message
> news:B7C59EFA-7B3B-43BB-BEB6-207A7966F326@.microsoft.com...
> character
>
>

Maximum Database in an SQL 2005 Intance

Hi I would like to know, what is the maximum number of database that you can create in one SQL 2005 Instance?

Hi,

The answer is 32767.

http://msdn2.microsoft.com/en-us/library/ms143432.aspx

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--

|||I thought 48 Databases? So it depends on the total size of all the database in an instance? Im a bit confused?|||

Hi,

Total no. of instances per computer = 50 (on a stand-alone server for all SQL Server 2005 editions except Workgroup)

Total no. of database per instance = 32767

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--

|||okay. thanks a lot.

Saturday, February 25, 2012

Max. number of databases

Hello,
anybody knows what's the maximum number of databases i can create on a SQL
Server 2000 instance?
thanks.
AndresLook in the BOL under 'SQL Server Architecture' -> 'Implementation
Details' -> 'Maximum Capacity Specifications' It's documented as 32,767.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"andsilva" <andsilva@.hotmail.com> wrote in message
news:OEqcrb8gDHA.3784@.tk2msftngp13.phx.gbl...
> Hello,
> anybody knows what's the maximum number of databases i can create on a SQL
> Server 2000 instance?
> thanks.
>
> Andres
>|||Hi Andres,
This is documented in Books Online, under "Maximum Capacity Specifications" article
Maximum number of databases per server instance is 32767
Sincerely,
Yih-Yoon Lee [Microsoft]
Microsoft SQL Server Support
This posting is provided "AS IS" with no warranties, and confers no rights. Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
--
| From: "andsilva" <andsilva@.hotmail.com>
| Subject: Max. number of databases
| Date: Thu, 25 Sep 2003 19:37:57 -0500
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OEqcrb8gDHA.3784@.tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.sqlserver.server
| NNTP-Posting-Host: 64.76.52.225
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:308434
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| Hello,
|
| anybody knows what's the maximum number of databases i can create on a SQL
| Server 2000 instance?
|
| thanks.
|
|
| Andres
|
|
||||In theory 32,767. Practically, you probably want to test thoroughly perf, maint etc if you go above
about 100.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"andsilva" <andsilva@.hotmail.com> wrote in message news:OEqcrb8gDHA.3784@.tk2msftngp13.phx.gbl...
> Hello,
> anybody knows what's the maximum number of databases i can create on a SQL
> Server 2000 instance?
> thanks.
>
> Andres
>