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

Friday, March 30, 2012

I downloaded and installed SQLEXPR_ADV.EXE

This file is 240 Megabytes. What am I supposed to see on the start
menu after this is installed?
Is there a tool in here with which I can create a database?
in florida,
IanODepends on what you want to do. Go back to the download page:
http://msdn.microsoft.com/vstudio/express/sql/download/
and either download the Toolkit if you want the complete set of tools or
management studio Express if you just want to manage the relational database
part.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"iano" <IanONet@.gmail.com> wrote in message
news:1151882090.532700.166560@.75g2000cwc.googlegroups.com...
> This file is 240 Megabytes. What am I supposed to see on the start
> menu after this is installed?
> Is there a tool in here with which I can create a database?
> in florida,
> IanO
>

Wednesday, March 28, 2012

I do not have the option to create an Integration Service project in Business Management Studio

Hi,

I have installed the advanced toolkit for Microsoft Sql server 2005, with the SQL server Business Intelligence Development Studio but I don't have the option the create a Integration Service project. I only have the Report Server project option available.

Do I have to download something else to get it?

I do not have a SQL server instance installed on the machine I installed the toolkit on.

Thank you

What version of SQL Server do you have installed? You need Standard, Developer, or Enterprise.|||

Oh I see, I have the express edition.

I guess I'll get to play with that if we buy one of those editions some day

Thank you

|||Developer edition is $50, but cannot be used in a production environment.

i created a login in SQL SERVER 2005 EXPRESS, but cant login...

create login dave with password='abc', default_database=tempdb

when i use this account to login my sql2005, i got

Msg 18452, Level 14, State 1, Server DAVID-398113F7C\SQLEXPRESS, Line 1
Login failed for user 'dave'. The user is not associated with a trusted SQL Serv
er connection.
why?You have probably installed the server such that it only allows Windows Authentication, so you cannot connect with a SQL login.

See the "How to: Change Server Authentication Mode" topic in Books Online for additional information on how to allow SQL authentication.

Thanks
Laurentiu|||follow the How to instruction, on right-click my sql server, i got a error msg. indicating that my server is not correctly registed !

in the reg. properity dialog box, i see my auth. mode is Windows Authentication, is there anything wrong with this ?|||Windows authentication means you can only connect with a Windows login. The login dave that you created is a SQL login, so it will not work if you only enabled Windows authentication. There is nothing wrong here, this is how it works.

However, the error message that you are getting when you right click on your server looks like a problem. You should post to SQL Server Tools General to find out what is wrong. If you cannot get an answer, please open a bug at http://lab.msdn.microsoft.com/productfeedback/Default.aspx.

In the meantime, you can try to change the authentication mode manually by modifying the following registry information to contain value 2 instead of 1:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\MSSQLServer\LoginMode

1 means Windows authentication, this is the value you should find set. By changing this to 2, you'll set the mixed authentication mode. Be sure to restart the server for this change to take effect.

Thanks
Laurentiu|||thx! i changed the reg key, and it works fine now!

but, still, i cant get the server work, it popup a [SQL-DMO] errosTongue Tied|||Try posting on the SQL Server SMO/DMO forum with the text of the error and a description of the steps you took before you received it. There might be something wrong with your installation though. Have you tried installing on a different machine or reinstalling? Did you get any errors during the initial installation?

Thanks
Laurentiu

Monday, March 26, 2012

I could not set complete backup tag.

I tried to create "Database Maintenance Plan" for MSDE server by Enterprise
Manager. However I could not set complete backup tag. (see attachment)
Please give me advice to fix this. I want to take a back up correctry.
Yoyako.
hi,
Yoyako wrote:
> I tried to create "Database Maintenance Plan" for MSDE server by
> Enterprise Manager. However I could not set complete backup tag. (see
> attachment)
> Please give me advice to fix this. I want to take a back up correctry.
> Yoyako.
please excuse my poor english, but I was not able to understand your needs..
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thank you for you reply.
I want to make a "Dtabase Maintenance Plan" for our MSDE data base.
However I could not to complete the this plan. Because there is no
infomation of "Remove files older than:" and "Bckup files extention" in
Database Maintenance Plan Wizard.
Is it difficult to use "Dtabase Maintenance Plan" in SQL Enterprise Mgr to
create "Database maintenance Plan?
Yoyako
"Andrea Montanari" wrote:

> hi,
> Yoyako wrote:
> please excuse my poor english, but I was not able to understand your needs..
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
|||hi,
actually no Maintenace Plan Wizard is available for MSDE... I'd go for
standard SQL Server Agent managed jobs...
more... Maintenace Plan suffer from many headake "features"
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.11.1 - DbaMgr ver 0.57.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Yoyako wrote:[vbcol=seagreen]
> Thank you for you reply.
> I want to make a "Dtabase Maintenance Plan" for our MSDE data base.
> However I could not to complete the this plan. Because there is no
> infomation of "Remove files older than:" and "Bckup files extention"
> in Database Maintenance Plan Wizard.
> Is it difficult to use "Dtabase Maintenance Plan" in SQL Enterprise
> Mgr to create "Database maintenance Plan?
> Yoyako
> "Andrea Montanari" wrote:
|||Thank you for your quick response.
I will convert from MSDE to SQL next year.
"Yoyako" wrote:

> I tried to create "Database Maintenance Plan" for MSDE server by Enterprise
> Manager. However I could not set complete backup tag. (see attachment)
> Please give me advice to fix this. I want to take a back up correctry.
> Yoyako.

Friday, March 23, 2012

I cant restore a SQL7 Database to a New SQL2000 Server

I assume that you were given a database backup file. Then the instructions y
ou were given are
incorrect or at least confusing.
Do not create the database first, will only mess for you. You can delete you
r current database.
Then just create the backup device and do the restore. The database is creat
ed along with the
restore process.
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ls
erver
"Chris Coates" <ccoates@.gfs.com> wrote in message news:eAdEGRB5DHA.2760@.TK2MSFTNGP09.phx.gbl...[QU
OTE]
> I am replacing an old SQL7 Server with a new server that runs SQL 2000. I
> was given directions on how to do this and was told to restore the SQL7
> databases to the new server.
> In order to do this I created an empty database with the same name on the
> new server, created a backup device and ran a backup of the empty database
.
> I testes a restore of the empty database and it worked fine. I then replac
ed
> the empty database .BAK file with the latest .BAK database backup of the
> original database and attempted a restore.
> I get the following error.
>
>
> The SQL Error Log shows the following message:
> Bypassing recovery for database 'Continuum' because it is marked IN LOAD.
>
> What am I doing wrong?
>
> Thanks for your help.
>
> ccoates
>
>[/QUOTE]Also, unless you are going to restore additional transaction log backups,
make sure you check the option that says "Leave Database Operational. No
additional transaction log backups can be restored". That is on the Options
tab of Restore database.
You can restore over an existing database so long as no one is using it |
you check force restore over existing database on the options tab | and make
sure the destination file locations are correct.
****************************************
***************************
Andy S.
MCSE NT/2000, MCDBA SQL 7/2000
andymcdba1@.NOMORESPAM.yahoo.com
Please remove NOMORESPAM before replying.
Always keep your antivirus and Microsoft software
up to date with the latest definitions and product updates.
Be suspicious of every email attachment, I will never send
or post anything other than the text of a http:// link nor
post the link directly to a file for downloading.
This posting is provided "as is" with no warranties
and confers no rights.
****************************************
***************************
"Chris Coates" <ccoates@.gfs.com> wrote in message
news:eAdEGRB5DHA.2760@.TK2MSFTNGP09.phx.gbl...
quote:

> I am replacing an old SQL7 Server with a new server that runs SQL 2000. I
> was given directions on how to do this and was told to restore the SQL7
> databases to the new server.
> In order to do this I created an empty database with the same name on the
> new server, created a backup device and ran a backup of the empty

database.
quote:

> I testes a restore of the empty database and it worked fine. I then

replaced
quote:

> the empty database .BAK file with the latest .BAK database backup of the
> original database and attempted a restore.
> I get the following error.
>
>
> The SQL Error Log shows the following message:
> Bypassing recovery for database 'Continuum' because it is marked IN LOAD.
>
> What am I doing wrong?
>
> Thanks for your help.
>
> ccoates
>
>
|||Hi,
Add on to Tibers post, perform these steps
1. Copy the SQL 7 backup to D:\mssql\backup\dbname.bak
2. Execute the below command from Query analyzer
Restore filelistonly from disk='D:\mssql\backup\dbname.bak'
The above command will give you the details of Logical name and Physical
name
3. Create a folder in D drive (D:\mssql\data) where your .MDF and .LDF
resides
5. Execute the below command from Query Analyzer
restore database dbname from disk='D:\mssql\backup\dbname.bak' with
move 'logical_dataname' to 'd:\mssql\data\dbname.mdf',
move 'logical_logname' to 'd:\mssql\data\dbname.ldf',stats=10
The logical_dataname and Logical_logname should be taken based on the output
of Restore filelistonly command (Step 2)
6.Create your logins , similar to SQL 7
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:e3zY5UB5DHA.2656@.TK2MSFTNGP11.phx.gbl...
quote:

> I assume that you were given a database backup file. Then the instructions

you were given are
quote:

> incorrect or at least confusing.
> Do not create the database first, will only mess for you. You can delete

your current database.
quote:

> Then just create the backup device and do the restore. The database is

created along with the
quote:

> restore process.
> --
> Tibor Karaszi, SQL Server MVP
> Archive at:

http://groups.google.com/groups?oi=...ublic.sqlserver
quote:

>
> "Chris Coates" <ccoates@.gfs.com> wrote in message

news:eAdEGRB5DHA.2760@.TK2MSFTNGP09.phx.gbl...
quote:

I[QUOTE]
the[QUOTE]
database.[QUOTE]
replaced[QUOTE]
LOAD.[QUOTE]
>
|||Hi Chris,
Thank you for using MSDN Newsgroup! It's my pleasure to assist you with
your issue.
From you information provided, you encouter a error message 'Bypassing
recovery for database 'Continuum' because it is marked IN LOAD.' when you
were restoring a backup file which is from SQL 7 to SQL 2000, right?
Thanks to our MVP and other community members' replies. It is not necessary
to create a new database in backup and restore process and they have
provide the proper steps for backup and restore. Here I just want to add
something more that when restoring backup sets from an earlier version of
SQL Server, a database upgrade may be required. This upgrade is performed
automatically when WITH RECOVERY is specified. That is:
restore database database_name from disk='you_back.bak' with recovery
Hope this helps. If you still have questions about it, please feel free to
post new message here and I am ready to help!
Best regards
Baisong Wei
Microsoft Online Support
----
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only. Thanks.sql

I can't modify userdefinedfunction (not all object)

I can't modify userdefinedfunction (not all object) . this object create in sql 2000

===================================

Property QuotedIdentifierStatus is not available for UserDefinedFunction '[dbo].[GetFlightStatisticAll]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=QuotedIdentifierStatus&LinkId=20476


Program Location:

at Microsoft.SqlServer.Management.Smo.PropertyCollection.HandleNullValue(Int32 index)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropValueOptional(String propName)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropValueOptional[T](String propName, T defaultValue)
at Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase.CheckTextCorectness(String ddlText, Boolean enforceCreate, Boolean checkName, String[] expectedObjectTypes, DdlTextParserHeaderInfo& headerInfo)
at Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase.CheckAndManipulateText(String ddlText, String[] expectedObjectTypes, ScriptingOptions so, Boolean forCreate)
at Microsoft.SqlServer.Management.Smo.ScriptNameObjectBase.GetTextHeader(Boolean forAlter)
at Microsoft.SqlServer.Management.Smo.UserDefinedFunction.ScriptHeader(Boolean forAlter)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.ScriptExistingTextObjectToWindow(IManagedConnection mc)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.InvokeTextObject(IManagedConnection connection)
at Microsoft.SqlServer.Management.UI.VSIntegration.Editors.VsDocumentMenuItem.Invoke()

known issue ... it is fixed in SP2

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=126099

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=227291&SiteID=17

Madhu

I can't get rid of ExtentFragmentation on a few primary keys

I have many tables with primary keys that look like the one below. I've
tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
(with a fillfactor of 80). But nothing seems to correct it. There is a few
foreign keys against this primary key, so it's really hard to drop the index
totally and recreate it. Has anyone seen this before?
Thank you
John
DBCC SHOWCONTIG scanning 'Users' table...
Table: 'Users' (901578250); index ID: 1, database ID: 12
TABLE level scan performed.
- Pages Scanned........................: 2
- Extents Scanned.......................: 2
- Extent Switches.......................: 1
- Avg. Pages per Extent..................: 1.0
- Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 50.00%
- Avg. Bytes Free per Page................: 3789.0
- Avg. Page Density (full)................: 53.19%
The server is running SQL Server 2000 sp4
"John" wrote:

> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a few
> foreign keys against this primary key, so it's really hard to drop the index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%
|||Hi John
There seems to be only two extents in this index, the second of which is
only partially full (probably less than 20%)
John
"John" wrote:

> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a few
> foreign keys against this primary key, so it's really hard to drop the index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%
|||Just to add to Johns answer anything less than 8 pages will come from mixed
extents and will never be able to get 100% free from fragmentation.
Andrew J. Kelly SQL MVP
"John" <John@.discussions.microsoft.com> wrote in message
news:7470559B-3653-4F59-917B-758781E8568D@.microsoft.com...
>I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a
> few
> foreign keys against this primary key, so it's really hard to drop the
> index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%

I can't get rid of ExtentFragmentation on a few primary keys

I have many tables with primary keys that look like the one below. I've
tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
(with a fillfactor of 80). But nothing seems to correct it. There is a few
foreign keys against this primary key, so it's really hard to drop the index
totally and recreate it. Has anyone seen this before?
Thank you
John
DBCC SHOWCONTIG scanning 'Users' table...
Table: 'Users' (901578250); index ID: 1, database ID: 12
TABLE level scan performed.
- Pages Scanned........................: 2
- Extents Scanned.......................: 2
- Extent Switches.......................: 1
- Avg. Pages per Extent..................: 1.0
- Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 50.00%
- Avg. Bytes Free per Page................: 3789.0
- Avg. Page Density (full)................: 53.19%The server is running SQL Server 2000 sp4
"John" wrote:

> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a fe
w
> foreign keys against this primary key, so it's really hard to drop the ind
ex
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%|||Hi John
There seems to be only two extents in this index, the second of which is
only partially full (probably less than 20%)
John
"John" wrote:

> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a fe
w
> foreign keys against this primary key, so it's really hard to drop the ind
ex
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%|||Just to add to Johns answer anything less than 8 pages will come from mixed
extents and will never be able to get 100% free from fragmentation.
Andrew J. Kelly SQL MVP
"John" <John@.discussions.microsoft.com> wrote in message
news:7470559B-3653-4F59-917B-758781E8568D@.microsoft.com...
>I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a
> few
> foreign keys against this primary key, so it's really hard to drop the
> index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%

I can't get rid of ExtentFragmentation on a few primary keys

I have many tables with primary keys that look like the one below. I've
tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
(with a fillfactor of 80). But nothing seems to correct it. There is a few
foreign keys against this primary key, so it's really hard to drop the index
totally and recreate it. Has anyone seen this before?
Thank you
John
DBCC SHOWCONTIG scanning 'Users' table...
Table: 'Users' (901578250); index ID: 1, database ID: 12
TABLE level scan performed.
- Pages Scanned........................: 2
- Extents Scanned.......................: 2
- Extent Switches.......................: 1
- Avg. Pages per Extent..................: 1.0
- Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
- Logical Scan Fragmentation ..............: 0.00%
- Extent Scan Fragmentation ...............: 50.00%
- Avg. Bytes Free per Page................: 3789.0
- Avg. Page Density (full)................: 53.19%Hi John
There seems to be only two extents in this index, the second of which is
only partially full (probably less than 20%)
John
"John" wrote:
> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a few
> foreign keys against this primary key, so it's really hard to drop the index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%|||Just to add to Johns answer anything less than 8 pages will come from mixed
extents and will never be able to get 100% free from fragmentation.
--
Andrew J. Kelly SQL MVP
"John" <John@.discussions.microsoft.com> wrote in message
news:7470559B-3653-4F59-917B-758781E8568D@.microsoft.com...
>I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a
> few
> foreign keys against this primary key, so it's really hard to drop the
> index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%|||The server is running SQL Server 2000 sp4
"John" wrote:
> I have many tables with primary keys that look like the one below. I've
> tried Create index with (drop index), dbcc dbreindex and dbcc INDEXDEFRAG
> (with a fillfactor of 80). But nothing seems to correct it. There is a few
> foreign keys against this primary key, so it's really hard to drop the index
> totally and recreate it. Has anyone seen this before?
> Thank you
> John
> DBCC SHOWCONTIG scanning 'Users' table...
> Table: 'Users' (901578250); index ID: 1, database ID: 12
> TABLE level scan performed.
> - Pages Scanned........................: 2
> - Extents Scanned.......................: 2
> - Extent Switches.......................: 1
> - Avg. Pages per Extent..................: 1.0
> - Scan Density [Best Count:Actual Count]......: 50.00% [1:2]
> - Logical Scan Fragmentation ..............: 0.00%
> - Extent Scan Fragmentation ...............: 50.00%
> - Avg. Bytes Free per Page................: 3789.0
> - Avg. Page Density (full)................: 53.19%

I cant create a temp table

Hi everyone,

I saw a post of this, but i still can't solve it.
This is what i got:
SET @.sql = 'CREATE TABLE #SIAG_MatrizTemporal ...'
EXEC(@.sql)

this seems to work fine, but if i try to make a query on #SIAG_MatrizTemporal, the table doesn't exists, the error says: "Invalid object name '#SIAG_MatrizTemporal'."

If I add to @.sql a select statement the values are in there, but if i do it outside the same string, it just doesn't work.

Joseph Weinstein says that i should add "selectMode=cursor" where should i add it ?? I'm just working with the stored procedure, i'm not using VS, Java or any other programming language. Later i have to use it from SQL Reporting Services, but first i have to make it work from the Query Analyzer...

I think i have to activate or desactivate some property on the Server or the query, but i was looking in Internet and nothing... I really need to solve this, and i cant find anything that works.

If anyone can help me, i really appreciate it.
Thanks in advance :)

JoanSET @.sql = 'CREATE TABLE ##SIAG_MatrizTemporal ...'
EXEC(@.sql)

You can use ##SIAG_MatrizTemporal to Dispose.
我不懂英文!
这里你必须使用全局临时表。
follow is my code. ex:

IF EXISTS
(SELECT * FROM tempdb..sysobjects WHERE name LIKE '##fabtemp%')
DROP TABLE ##fabtemp

EXEC ('
SELECT GUID=NEWID(),MstGUID = ''' + @.MstGUID + ''',
iNumber = IDENTITY(int, 1,1),
sRollNo,MaterialGUID,sLotNo,
sStoragePlaceCD,sStkTypeCD,
sSupplySourceCD,
fAccountQty = fOnHandQty + fOnHoldQty,
fRealQty = fOnHandQty + fOnHoldQty,fProfitOrLossQty = 0,
sCtUid = ''' + @.sUserID + ''',
dCtDate = GETDATE() INTO ##fabtemp
FROM IMFabricRollStock
WHERE sStorageCD = ''' + @.sStorageCD + '''' + @.sCondition +
'ORDER BY sStoragePlaceCD ')

/*------------------
------------------*/

INSERT INTO imFabricCheckingDtl
SELECT * FROM ##fabtemp

Wednesday, March 21, 2012

I cant create a temp table

Hi all!
I have a problem with a temp table.
I start creating my table:

bdsqlado.execute ("CREATE TABLE #MyTable ...")

There is no error. The sql string has been tested and when it's
executed in the sql query analyzer it really creates the table.

After creating the table, I execute an insert statement:

bdsqlado.execute ("INSERT INTO #MyTable VALUES(...) "

It returns an error like this: "Invalid Object Name #MyTable"

I don't understand what's wrong. If I execute both sql sentences in
the SQL Query Analyzer it works perfectly.
I use the same connection to execute both statements and I don't close
it before the INSERT is executed.
I think it may be something related to dynamic properties of the
connection, but I'm not sure. It's just an idea.

Please I need help.

Thanks a lot,
Sergio wrote:

> Hi all!
> I have a problem with a temp table.
> I start creating my table:
> bdsqlado.execute ("CREATE TABLE #MyTable ...")
> There is no error. The sql string has been tested and when it's
> executed in the sql query analyzer it really creates the table.
> After creating the table, I execute an insert statement:
> bdsqlado.execute ("INSERT INTO #MyTable VALUES(...) "
> It returns an error like this: "Invalid Object Name #MyTable"

Hi. Let me play Kreskin... I'm guesing you're using JDBC, and MS's
free driver. If this is true, add the property selectMode=cursor to
your connection properties. What is happening is that the driver
*is spawning multiple actual DBMS connections* to support a
single logical connection having multiple concurrent open statements.
This means the spid of one statement will be different than another, and
therefore one statement will not be able to see another's temp table!

Joe Weinstein

>
> I don't understand what's wrong. If I execute both sql sentences in
> the SQL Query Analyzer it works perfectly.
> I use the same connection to execute both statements and I don't close
> it before the INSERT is executed.
> I think it may be something related to dynamic properties of the
> connection, but I'm not sure. It's just an idea.
> Please I need help.
> Thanks a lot,

I can't create a table in TEMPDB

I have a USER wich can Create tables in the production DB, but this USER
can't create tables in TEMPDB.
? What's grong ?Does the user have access to TEMPDB database?
"Eduardo6973" <Eduardo6973@.discussions.microsoft.com> wrote in message
news:DC6F4810-17F5-4E3E-A59B-EAE30255E02F@.microsoft.com...
>I have a USER wich can Create tables in the production DB, but this USER
> can't create tables in TEMPDB.
> What's grong ?|||It's unusual to create non-temporary tables in tempdb. Can you elaborate on
why you need to do this? Perhaps there is an alternate approach.
All users have permissions to create local or global temp tables in tempdb
but CREATE TABLE permission is needed to create 'permanent' tables.
Non-sysadmin role members access tempdb under the guest user security
context so you could grant CREATE TABLE to guest so that non-sysadmin users
can create permanent tables owned by guest in tempdb. Alternatively, you
could add users to tempdb and then grant CREATE TABLE permissions to those
users. However, note that tempdb is recreated at instance startup so all
users, permissions and objects created in tempdb will lost. You'll need to
either reapply those permissions at startup or add the permissions to the
model database.
Hope this helps.
Dan Guzman
SQL Server MVP
"Eduardo6973" <Eduardo6973@.discussions.microsoft.com> wrote in message
news:DC6F4810-17F5-4E3E-A59B-EAE30255E02F@.microsoft.com...
>I have a USER wich can Create tables in the production DB, but this USER
> can't create tables in TEMPDB.
> What's grong ?

i cant create a model

I try to create relational database but i cant develop a model. after i create a database i will create an OLAP cube for my project.i dont want to complex model but i cant create a simple database. it may be marketing, CRM or another. i dont know what fields and tables i should create. i saw sample databases such as northwind and foodmart but i must create original database for my project. please help meeeeeeWhat has the teacher covered so far? Do you have the original assignment (a URL or scanned copy would help us a lot)?

By the way, beware of asking other folks to actually do your homework for you... Asking for help is fine, but it is risky to let them actually do the assignment for you! :rolleyes:

-PatP

Monday, March 19, 2012

I cannot logon to Http://localhost/reports$sqlexpress

Hello,
I am completely stuck. I have installed SQL server express server
advanced with reporting services. I can create some reports in Visual
studio 2005 IDE (from Acces database) but I cannot login to subj
address to do something from the web
I get the following response from my browser:
The server has encountered an error while loading an application
during the processing of your request. Please refer to the event log
for more detail information. Please contact the server administrator
for assistance
What does it mean? I use Windows XP Pro, SP2, using IIS 5.1. IIS is
functioning. I am logged as a user with Administrator rights. I can
browse web pages hosted on my IIS.
Searc on Google on this reveals a lot of hits which I have gone
through but no avail.
Also, how can I check that I have ASP.NET enabled on IIS'
Thanks,
AivarsOn Mar 15, 5:52 pm, "Aivars" <aiva...@.apollo.lv> wrote:
> Hello,
> I am completely stuck. I have installed SQL server express server
> advanced with reporting services. I can create some reports in Visual
> studio 2005 IDE (from Acces database) but I cannot login to subj
> address to do something from the web
> I get the following response from my browser:
> The server has encountered an error while loading an application
> during the processing of your request. Please refer to the event log
> for more detail information. Please contact the server administrator
> for assistance
> What does it mean? I use Windows XP Pro, SP2, using IIS 5.1. IIS is
> functioning. I am logged as a user with Administrator rights. I can
> browse web pages hosted on my IIS.
> Searc on Google on this reveals a lot of hits which I have gone
> through but no avail.
> Also, how can I check that I have ASP.NET enabled on IIS'
> Thanks,
> Aivars
You may need to reinstall SSRS Express w/Advanced Services. I had a
similar issue a few months back and that seemed to resolve it. To
check if ASP.NET is enabled for IIS, do the following:
- Right click 'My Computer' and select 'Manage.'
- Select Services and Applications -> Internet Information Services ->
Default Web Site
- Right-click either the Reports or ReportServer virtual directory and
select Properties.
- There should be a tab at the end called 'ASP.NET'. If you select it,
it will show you the ASP.NET version, etc.
- Also, the Virtual Directory tab is where you would set up connection
pooling (in case you needed to run different versions of Visual
Studio/ASP.NET and need to control which .NET framework is used for
what).
Hope this helps.
Regards,
Enrique Martinez
Sr. ASP.NET/SQL Server Developer|||Running the following statement in your Framework\v2.0.50727 directory
might help:
aspnet_regiis -i -enable
Regards,
Thomas
Aivars schrieb:
> Hello,
> I am completely stuck. I have installed SQL server express server
> <SNIP>
> Also, how can I check that I have ASP.NET enabled on IIS'|||Thanks who responded. I am at dead end - I have reinstalled 5(!!!)
times all SSRS and Toolkit and still I am getting the following error
when logging to reportserver:
The server has encountered an error while loading an application
during the processing of your request. Please refer to the event log
for more detail information. Please contact the server administrator
for assistance.
No clue whatsoever.
Any more ideas?
Aivars
Thomas H=FCtter wrote:
> Running the following statement in your Framework\v2.0.50727 directory
> might help:
> aspnet_regiis -i -enable
> Regards,
> Thomas
>
> Aivars schrieb:
> > Hello,
> > I am completely stuck. I have installed SQL server express server
> > <SNIP>
> > Also, how can I check that I have ASP.NET enabled on IIS'|||Well, what do your event logs say around the time the error happens?
Aivars schrieb:
> Thanks who responded. I am at dead end - I have reinstalled 5(!!!)
> times all SSRS and Toolkit and still I am getting the following error
> when logging to reportserver:
> The server has encountered an error while loading an application
> during the processing of your request. Please refer to the event log
> for more detail information. Please contact the server administrator
> for assistance.|||Thomas, thank you very much.
I reinstalled windows(!). Now i can at least get the to the home page
of reportserver (it looks like it) but it responds with an error:
The report server is not responding. Verify that the report server is
running and can be accessed from this computer. But it is a home page
of report server.
It looks like I am closer. What is that last thing which I am
suppposed to do?
I think that is something to do with windows xp security?
Thanks,
Aivars
Thomas H=FCtter wrote:
> Well, what do your event logs say around the time the error happens?
>
> Aivars schrieb:
> > Thanks who responded. I am at dead end - I have reinstalled 5(!!!)
> > times all SSRS and Toolkit and still I am getting the following error
> > when logging to reportserver:
> >
> > The server has encountered an error while loading an application
> > during the processing of your request. Please refer to the event log
> > for more detail information. Please contact the server administrator
> > for assistance.|||Finally I did get it to work. I had tu use rskeymgmt utility to delete
encrypted contend. And do not ask me why because i do not know myself
how i had something encrypted on server.
maybe when configuring the report server there is an option to encrypt
and i had used it by accident.
Anyway, thanks to all who responded. There is a plethora of
information in Books online and Google is your friend!
Aivars
Aivars wrote:
> Thomas, thank you very much.
> I reinstalled windows(!). Now i can at least get the to the home page
> of reportserver (it looks like it) but it responds with an error:
> The report server is not responding. Verify that the report server is
> running and can be accessed from this computer. But it is a home page
> of report server.
> It looks like I am closer. What is that last thing which I am
> suppposed to do?
> I think that is something to do with windows xp security?
> Thanks,
> Aivars
> Thomas H=FCtter wrote:
> > Well, what do your event logs say around the time the error happens?
> >
> >
> > Aivars schrieb:
> > > Thanks who responded. I am at dead end - I have reinstalled 5(!!!)
> > > times all SSRS and Toolkit and still I am getting the following error
> > > when logging to reportserver:
> > >
> > > The server has encountered an error while loading an application
> > > during the processing of your request. Please refer to the event log
> > > for more detail information. Please contact the server administrator
> > > for assistance.

I cannot create a brand new MDF (sql server database) with Visual Basic 2005

Hi everybody:

I go to Server Explorer, right click on Data Connection, input the server name (that is, my own computer), give a new name to the database to create, and then inevitably get the error window saying:

An error occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Provider: Named Pipes Provider, error 40, could not open a conection to SQL Server)

So, how to open a connection to SQL server 2005? I looked in the msdn but found absolutely nothing.

Please help

Paolo

There is a great blog post that discusses common causes of connection errors and the errors that you get when that problem exists. This particular error suggests that SQL Express is not running. Launch SQL Server Configuration Manager and verify that the server is running.

Mike

I cannot create a brand new MDF (sql server database) with Visual Basic 2005

Hi everybody:

I go to Server Explorer, right click on Data Connection, input the server name (that is, my own computer), give a new name to the database to create, and then inevitably get the error window saying:

An error occurred while establishing a connection to the server. When connectiong to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (Provider: Named Pipes Provider, error 40, could not open a conection to SQL Server)

So, how to open a connection to SQL server 2005? I looked in the msdn but found absolutely nothing.

Please help

Paolo

There is a great blog post that discusses common causes of connection errors and the errors that you get when that problem exists. This particular error suggests that SQL Express is not running. Launch SQL Server Configuration Manager and verify that the server is running.

Mike

I can really use some help.Table structure

How can I setup a table structure for the diagram shown in the attached bitmap?

1) I need to create a product using labour and materials.
2) I need to create hardware using labour and materials.
3) I need to be able to include some hardware in some products.
4) Some materials in the product are made of a culmination of materials. E.G., Concrete is made of sand, stone, and cement.

Any suggestions?

So far I have :

USE NORTHWIND

Create Table tbProducts (
ProductID int NOT NULL,
Product varchar(50)
)

go

ALTER TABLE tbProducts
ADD CONSTRAINT tbProducts_pk PRIMARY KEY (ProductID)
GO

CREATE Table tbMaterials (
MaterialID int NOT NULL,
Material varchar (50)
)

GO

ALTER TABLE tbMaterials
ADD CONSTRAINT tbMaterials_pk PRIMARY KEY (MaterialID)
GO

CREATE Table tbLabour (
LabourCode char (2) NOT NULL,
Labour varchar(50)
)

GO
ALTER TABLE tbLabour
ADD CONSTRAINT tbLabour_pk PRIMARY KEY (LabourCode)
GO

CREATE Table tbProductMaterials (
fkProductID int NOT NULL,
fkMaterialID int NOT NULL,
Quantity Float NOT NULL
)

GO
ALTER TABLE tbProductMaterials
ADD CONSTRAINT tbProductMaterials_pk PRIMARY KEY (fkProductID, fkMaterialID)
GO

ALTER TABLE tbProductMaterials
ADD CONSTRAINT tbProductMaterils_fk FOREIGN KEY (fkMaterialID)
REFERENCES tbMaterials (MaterialID)

GO
ALTER TABLE tbProductMaterials
ADD CONSTRAINT tbProductMaterils_Product_fk FOREIGN KEY (fkProductID)
REFERENCES tbProducts (ProductID)
GO

CREATE TABLE tbProductLabour (
fkProductID int NOT NULL,
fkLabourCode char(2) NOT NULL,
Manpower int NULL DEFAULT(0),
Hours float NULL DEFAULT(0.0)
)

GO

ALTER TABLE tbProductLabour
ADD CONSTRAINT tbProductLabour_pk PRIMARY KEY (fkProductID, fkLabourCode)
GO

ALTER TABLE tbProductLabour
ADD CONSTRAINT tbProductLabour_fk FOREIGN KEY (fkLabourCode)
REFERENCES tbLabour (LabourCode)

GO

ALTER TABLE tbProductLabour
ADD CONSTRAINT tbProductLabour_Product_fk FOREIGN KEY (fkProductID)
REFERENCES tbProducts (ProductID)

GO

CREATE TABLE tbHardware (
HardwareID int NOT NULL,
Hardware varchar(50)
)

go

ALTER TABLE tbHardware
ADD CONSTRAINT tbHardware_pk PRIMARY KEY (HardwareID)
GO

CREATE Table tbHardwareMaterials (
fkHardwareID int NOT NULL,
fkMaterialID int NOT NULL,
Quantity Float NOT NULL
)

GO
ALTER TABLE tbHardwareMaterials
ADD CONSTRAINT tbHardwareMaterials_pk PRIMARY KEY (fkHardwareID, fkMaterialID)
GO

ALTER TABLE tbHardwareMaterials
ADD CONSTRAINT tbHardwareMaterials_fk FOREIGN KEY (fkMaterialID)
REFERENCES tbMaterials (MaterialID)

GO
ALTER TABLE tbHardwareMaterials
ADD CONSTRAINT tbHardwareMaterials_Hardware_fk FOREIGN KEY (fkHardwareID)
REFERENCES tbHardware (HardwareID)
GO

CREATE TABLE tbHardwareLabour (
fkHardwareID int NOT NULL,
fkLabourCode char(2) NOT NULL,
Manpower int NULL DEFAULT(0),
Hours float NULL DEFAULT(0.0)
)

GO

ALTER TABLE tbHardwareLabour
ADD CONSTRAINT tbHardwareLabour_pk PRIMARY KEY (fkHardwareID, fkLabourCode)
GO

ALTER TABLE tbHardwareLabour
ADD CONSTRAINT tbHardwareLabour_fk FOREIGN KEY (fkLabourCode)
REFERENCES tbLabour (LabourCode)

GO

ALTER TABLE tbHardwareLabour
ADD CONSTRAINT tbHardwareLabour_Product_fk FOREIGN KEY (fkHardwareID)
REFERENCES tbHardware (HardwareID)
GO

This table structure does not include anything about accounts and item 4) making materials from 1 or more other materials (E.G., Concrete).

Any hints how to incorporate these outstanding items?

Mike BSimple, Just add a ID field. You dont have to show the field in the a form or to a user. You know it's a field that can be used to reference info and link to the other tabls.

CREATE Table tbMaterials
(MaterialID int NOT NULL,
Material varchar (50)
ID int(4) etc|||Very sorry about my ignorance, but could you explain how the ID field(s) would help me or how your suggesting I use them? I don't think I understand what your suggesting.

Mike B|||Here is my solution. I am not sure how well it would work so if you (the gurus) could compile the tables I have and let me know your thoughs?

The whole structure has to meet the criterial outlined in my original post.

Please, I could use some advice?

CREATE TABLE [dbo].[tbAccountCategories] (
[CategoryID] [int] IDENTITY (1, 1) NOT NULL ,
[Category] [varchar] (50) NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbConcreteMixDesigns] (
[MixID] [int] NOT NULL ,
[Mix] [varchar] (50) NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHardware] (
[HardwareID] [int] NOT NULL ,
[Hardware] [varchar] (50) NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbLabour] (
[LabourID] [int] NOT NULL ,
[Labour] [varchar] (50) NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbMaterials] (
[MaterialID] [int] NOT NULL ,
[Material] [varchar] (50) NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbProductTypes] (
[TypeID] [int] NOT NULL ,
[Type] [varchar] (50) NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbAccounts] (
[AccountID] [char] (2) NOT NULL ,
[fkCategoryID] [int] NOT NULL ,
[Account] [int] NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHardwareLabour] (
[fkHardwareID] [int] NOT NULL ,
[fkLabourCode] [int] NOT NULL ,
[Manpower] [int] NULL ,
[Hours] [float] NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbHardwareMaterials] (
[fkHardwareID] [int] NOT NULL ,
[fkMaterialID] [int] NOT NULL ,
[Quantity] [float] NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbMixMaterials] (
[fkMixId] [int] NOT NULL ,
[fkMaterialID] [int] NOT NULL ,
[Quantity] [float] NOT NULL ,
[fkUnits] [char] (10) NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbProducts] (
[ProductID] [int] NOT NULL ,
[fkTypeID] [int] NOT NULL ,
[Product] [varchar] (50) NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbLabourAccounts] (
[fkAccountID] [char] (2) NOT NULL ,
[fkLabourID] [int] NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbMaterialAccounts] (
[fkAccountID] [char] (2) NOT NULL ,
[fkMaterialID] [int] NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbProductTemplates] (
[TemplateID] [char] (10) NOT NULL ,
[fkProductID] [int] NOT NULL ,
[Template] [char] (50) NOT NULL ,
[fkMixID] [int] NOT NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbProductLabour] (
[fkTemplateID] [char] (10) NOT NULL ,
[fkLabourCode] [int] NOT NULL ,
[Manpower] [int] NULL ,
[Hours] [float] NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbTemplateHardware] (
[fkTemplateID] [char] (10) NOT NULL ,
[fkHardwareID] [int] NOT NULL ,
[Quantity] [int] NULL
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tbTemplateMaterials] (
[fkTemplatetID] [char] (10) NOT NULL ,
[fkMaterialID] [int] NOT NULL ,
[Quantity] [float] NULL
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbAccountCategories] WITH NOCHECK ADD
CONSTRAINT [PK_tbAccountCategories] PRIMARY KEY CLUSTERED
(
[CategoryID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbConcreteMixDesigns] WITH NOCHECK ADD
CONSTRAINT [PK_tbConcreteMixDesigns] PRIMARY KEY CLUSTERED
(
[MixID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbHardware] WITH NOCHECK ADD
CONSTRAINT [tbHardware_pk] PRIMARY KEY CLUSTERED
(
[HardwareID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbLabour] WITH NOCHECK ADD
CONSTRAINT [tbLabour_pk] PRIMARY KEY CLUSTERED
(
[LabourID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbMaterials] WITH NOCHECK ADD
CONSTRAINT [tbMaterials_pk] PRIMARY KEY CLUSTERED
(
[MaterialID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbProductTypes] WITH NOCHECK ADD
CONSTRAINT [PK_tbProductTypes] PRIMARY KEY CLUSTERED
(
[TypeID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbAccounts] WITH NOCHECK ADD
CONSTRAINT [PK_tbAccounts] PRIMARY KEY CLUSTERED
(
[AccountID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbHardwareLabour] WITH NOCHECK ADD
CONSTRAINT [tbHardwareLabour_pk] PRIMARY KEY CLUSTERED
(
[fkHardwareID],
[fkLabourCode]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbHardwareMaterials] WITH NOCHECK ADD
CONSTRAINT [tbHardwareMaterials_pk] PRIMARY KEY CLUSTERED
(
[fkHardwareID],
[fkMaterialID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbMixMaterials] WITH NOCHECK ADD
CONSTRAINT [PK_tbMixMaterials] PRIMARY KEY CLUSTERED
(
[fkMixId],
[fkMaterialID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbProducts] WITH NOCHECK ADD
CONSTRAINT [tbProducts_pk] PRIMARY KEY CLUSTERED
(
[ProductID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbLabourAccounts] WITH NOCHECK ADD
CONSTRAINT [PK_tbLabourAccounts] PRIMARY KEY CLUSTERED
(
[fkAccountID],
[fkLabourID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbMaterialAccounts] WITH NOCHECK ADD
CONSTRAINT [PK_tbMaterialAccounts] PRIMARY KEY CLUSTERED
(
[fkAccountID],
[fkMaterialID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbProductTemplates] WITH NOCHECK ADD
CONSTRAINT [PK_tbProductTemplates] PRIMARY KEY CLUSTERED
(
[TemplateID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbProductLabour] WITH NOCHECK ADD
CONSTRAINT [tbProductLabour_pk] PRIMARY KEY CLUSTERED
(
[fkTemplateID],
[fkLabourCode]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbTemplateHardware] WITH NOCHECK ADD
CONSTRAINT [PK_tbTemplateHardware] PRIMARY KEY CLUSTERED
(
[fkTemplateID],
[fkHardwareID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbTemplateMaterials] WITH NOCHECK ADD
CONSTRAINT [tbProductMaterials_pk] PRIMARY KEY CLUSTERED
(
[fkTemplatetID],
[fkMaterialID]
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[tbHardwareLabour] ADD
CONSTRAINT [DF__tbHardwar__Manpo__0BC6C43E] DEFAULT (0) FOR [Manpower],
CONSTRAINT [DF__tbHardwar__Hours__0CBAE877] DEFAULT (0.0) FOR [Hours]
GO

ALTER TABLE [dbo].[tbProductLabour] ADD
CONSTRAINT [DF__tbProduct__Manpo__00551192] DEFAULT (0) FOR [Manpower],
CONSTRAINT [DF__tbProduct__Hours__014935CB] DEFAULT (0.0) FOR [Hours]
GO

ALTER TABLE [dbo].[tbTemplateHardware] ADD
CONSTRAINT [DF_tbTemplateHardware_Quantity] DEFAULT (0) FOR [Quantity]
GO

ALTER TABLE [dbo].[tbTemplateMaterials] ADD
CONSTRAINT [DF_tbTemplateMaterials_Quantity] DEFAULT (0) FOR [Quantity]
GO

ALTER TABLE [dbo].[tbAccounts] ADD
CONSTRAINT [FK_tbAccounts_tbAccountCategories] FOREIGN KEY
(
[fkCategoryID]
) REFERENCES [dbo].[tbAccountCategories] (
[CategoryID]
)
GO

ALTER TABLE [dbo].[tbHardwareLabour] ADD
CONSTRAINT [tbHardwareLabour_fk] FOREIGN KEY
(
[fkLabourCode]
) REFERENCES [dbo].[tbLabour] (
[LabourID]
),
CONSTRAINT [tbHardwareLabour_Product_fk] FOREIGN KEY
(
[fkHardwareID]
) REFERENCES [dbo].[tbHardware] (
[HardwareID]
)
GO

ALTER TABLE [dbo].[tbHardwareMaterials] ADD
CONSTRAINT [tbHardwareMaterials_fk] FOREIGN KEY
(
[fkMaterialID]
) REFERENCES [dbo].[tbMaterials] (
[MaterialID]
),
CONSTRAINT [tbHardwareMaterials_Hardware_fk] FOREIGN KEY
(
[fkHardwareID]
) REFERENCES [dbo].[tbHardware] (
[HardwareID]
)
GO

ALTER TABLE [dbo].[tbMixMaterials] ADD
CONSTRAINT [FK_tbMixMaterials_tbConcreteMixDesigns] FOREIGN KEY
(
[fkMixId]
) REFERENCES [dbo].[tbConcreteMixDesigns] (
[MixID]
),
CONSTRAINT [FK_tbMixMaterials_tbMaterials] FOREIGN KEY
(
[fkMaterialID]
) REFERENCES [dbo].[tbMaterials] (
[MaterialID]
)
GO

ALTER TABLE [dbo].[tbProducts] ADD
CONSTRAINT [FK_tbProducts_tbProductTypes] FOREIGN KEY
(
[fkTypeID]
) REFERENCES [dbo].[tbProductTypes] (
[TypeID]
)
GO

ALTER TABLE [dbo].[tbLabourAccounts] ADD
CONSTRAINT [FK_tbLabourAccounts_tbAccounts] FOREIGN KEY
(
[fkAccountID]
) REFERENCES [dbo].[tbAccounts] (
[AccountID]
),
CONSTRAINT [FK_tbLabourAccounts_tbLabour] FOREIGN KEY
(
[fkLabourID]
) REFERENCES [dbo].[tbLabour] (
[LabourID]
)
GO

ALTER TABLE [dbo].[tbMaterialAccounts] ADD
CONSTRAINT [FK_tbMaterialAccounts_tbAccounts] FOREIGN KEY
(
[fkAccountID]
) REFERENCES [dbo].[tbAccounts] (
[AccountID]
),
CONSTRAINT [FK_tbMaterialAccounts_tbMaterials] FOREIGN KEY
(
[fkMaterialID]
) REFERENCES [dbo].[tbMaterials] (
[MaterialID]
)
GO

ALTER TABLE [dbo].[tbProductTemplates] ADD
CONSTRAINT [FK_tbProductTemplates_tbConcreteMixDesigns] FOREIGN KEY
(
[fkMixID]
) REFERENCES [dbo].[tbConcreteMixDesigns] (
[MixID]
),
CONSTRAINT [FK_tbProductTemplates_tbProducts] FOREIGN KEY
(
[fkProductID]
) REFERENCES [dbo].[tbProducts] (
[ProductID]
)
GO

ALTER TABLE [dbo].[tbProductLabour] ADD
CONSTRAINT [FK_tbProductLabour_tbProductTemplates] FOREIGN KEY
(
[fkTemplateID]
) REFERENCES [dbo].[tbProductTemplates] (
[TemplateID]
),
CONSTRAINT [tbProductLabour_fk] FOREIGN KEY
(
[fkLabourCode]
) REFERENCES [dbo].[tbLabour] (
[LabourID]
)
GO

ALTER TABLE [dbo].[tbTemplateHardware] ADD
CONSTRAINT [FK_tbTemplateHardware_tbHardware] FOREIGN KEY
(
[fkHardwareID]
) REFERENCES [dbo].[tbHardware] (
[HardwareID]
),
CONSTRAINT [FK_tbTemplateHardware_tbProductTemplates] FOREIGN KEY
(
[fkTemplateID]
) REFERENCES [dbo].[tbProductTemplates] (
[TemplateID]
)
GO

ALTER TABLE [dbo].[tbTemplateMaterials] ADD
CONSTRAINT [FK_tbTemplateMaterials_tbProductTemplates] FOREIGN KEY
(
[fkTemplatetID]
) REFERENCES [dbo].[tbProductTemplates] (
[TemplateID]
),
CONSTRAINT [tbProductMaterils_fk] FOREIGN KEY
(
[fkMaterialID]
) REFERENCES [dbo].[tbMaterials] (
[MaterialID]
)
GO

Thanks in advance!

Mike B

I can not login SQL Server

Hi everybody,
I'm a newbe on SQL Server;
Here my problem is:
In Server Explorer I create a Data Connection to Nortwind. After Creating
the connection I can reach tables of this database.
But: When I want to configure the dataAdapter the problem occurs:
In the configure wizard "Data Soure Login" window comes.
Altought I know the user "sa" password This error comes:
"Login Failed:Not Associated With a Trusted SQL Server Connection. Invalid
Connection String Attribute."
How can I overcome with this problem.
What may be the reason of this problem.
Thanks for any help.
Arif imen
Prowise Software.The most likely reason is that your server is configured for
Windows Authentication only. When you try to use the sa
login for the data source login, you are using SQL Server
authentication. Use Windows Authentication for your
connection. If you need to connect with a SQL login, you
need to change SQL Server's authentication mode to use
Windows and SQL authentication.
-Sue
On Wed, 16 Mar 2005 18:28:53 +0200, "news.microsoft.com"
<arif_cimen@.hotmail.com> wrote:

>Hi everybody,
>I'm a newbe on SQL Server;
>Here my problem is:
>In Server Explorer I create a Data Connection to Nortwind. After Creating
>the connection I can reach tables of this database.
>But: When I want to configure the dataAdapter the problem occurs:
>In the configure wizard "Data Soure Login" window comes.
>Altought I know the user "sa" password This error comes:
>"Login Failed:Not Associated With a Trusted SQL Server Connection. Invalid
>Connection String Attribute."
>How can I overcome with this problem.
>What may be the reason of this problem.
>Thanks for any help.
>Arif imen
>Prowise Software.
>|||Thaks a lot. It works.
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:tdmh31llcr09lvf0pa3ihh0d7oiolv0v1c@.
4ax.com...
> The most likely reason is that your server is configured for
> Windows Authentication only. When you try to use the sa
> login for the data source login, you are using SQL Server
> authentication. Use Windows Authentication for your
> connection. If you need to connect with a SQL login, you
> need to change SQL Server's authentication mode to use
> Windows and SQL authentication.
> -Sue
> On Wed, 16 Mar 2005 18:28:53 +0200, "news.microsoft.com"
> <arif_cimen@.hotmail.com> wrote:
>
>

Monday, March 12, 2012

i am unable to trieve the date in ms-access

hi friends,

I am trying to create alert system in which i can able to retrieve the date while configure the OleDbDataAdapter1 itself the

problem occurs this is the code i tired

select * from table name (username=?) and (date=)

after entering this error occurs

You haven't mentioned about SQL Server version you are using, refer to this http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/ link in this case where it explains how you can achieve from SQL Server side.

IN SQL Server 2000 you can use DTS to get (import) the data from any other data provider and you can schedule the DTS package too.

|||

hi

i am not using MS SQL server but i am using ms access

i am unable to trieve the date in ms-access

hi friends,

I am trying to create alert system in which i can able to retrieve the date while configure the OleDbDataAdapter1 itself the

problem occurs this is the code i tired

select * from table name (username=?) and (date=)

after entering this error occurs

You haven't mentioned about SQL Server version you are using, refer to this http://www.aspfree.com/c/a/Microsoft-Access/Configuring-a-Linked-Microsoft-Access-Server-on-SQL-2005-Server/ link in this case where it explains how you can achieve from SQL Server side.

IN SQL Server 2000 you can use DTS to get (import) the data from any other data provider and you can schedule the DTS package too.

|||

hi

i am not using MS SQL server but i am using ms access