Problems Creating Database On SQL Srvr. 2005 Ent. Edtn.

Dec 17, 2006

Posted - 12/17/2006 : 07:23:22



Hi,

I have just started to learn SQL Server 2005, and am currently using the MCTS SQL Server 2005 Self-Paced Training Kit. I am literally at the very start, and already seem to have hit a snag and can't figure it out. From browsing here in the past I recall people here seemed quite clued up, and I was hoping someone might be able to assist.

I am using SQL Server 2005 Ent. Edtn. (trial) on Win XP Pro (SP2). I am basically trying to run a sample script copied from book to create a database and primary, secondary and log files. Whilst I have the theory down, and thought I understood the SQL (have used other DBMSs in the past, MySQL/ACCESS etc.) I am getting an error when trying to run the following code when connected to the default instance on my PC. The code I am trying to run is:


create database Sales

ON

primary

(name = SalesPrimary,

filename = E:Sales_DataSalesPrimary.mdf,

size = 50mb,

MAXSIZE = 200,

filegrowth = 20),

Filegroup SalesFG

( name = SalesData1,

filename = F:Sales_DataSalesData1.ndf,

size = 200mb,

maxsize = 800,

filegrowth = 100),

( name = SalesData2,

Filename = F:Sales_DataSalesData2.ndf,

Size = 400mb,

Maxsize = 1200,

Filegrowth = 300),

Filegroup SalesHistoryFG

( name = SalesHistory1,

filename = F:Sales_DataSalesHistory1.ndf,

size = 100mb,

maxsize = 500,

filegrowth = 50)

LOG ON

(name = Archlog1,

Filename = G:Sales_DataSalesLog.ldf,

size = 300mb,

maxsize = 800,

filegrowth = 100)

I find I get the following error message:

Msg 102, Level 15, State 1, Line 5
Incorrect syntax near 'E'.
Msg 132, Level 15, State 1, Line 16
The label 'F' has already been declared. Label names must be unique within a query batch or stored procedure.
Msg 132, Level 15, State 1, Line 22
The label 'F' has already been declared. Label names must be unique within a query batch or stored procedure.

Anyone have any ideas? Your help is greatly appreciated!

Thanks,

Will

View 8 Replies


ADVERTISEMENT

SQL Svr Standard Edtn 2005 Win32 Sngl OLP NL

Mar 25, 2008

From where can i findout the import and export wizard in SQL 2005 express edition?

View 1 Replies View Related

Reg SQL Svr Enterprise Edtn 2005 Win32 English MVL 1 Proc

Mar 30, 2007

Hi,



I have purchased
SQL Svr Enterprise Edtn 2005 Win32 English MVL 1 Proc does it mean that its 32 bit software? and its 1 processor based license ?

Also will it run on HP DL580 G4/(1) Dual-Core 64-bit Intel® Xeon„¢ 7110M Processor (2.60 GHz, 95 Watts, 800MHz FSB) successfully ?

Pls reply urgently

Thanks

View 3 Replies View Related

Installaing SQL Srvr 2005 Developer Edition - Problem With Report Server

Dec 30, 2005

The install went smoth with no error messages.  But when I try to open report manager, I am getting the following message:

"The report server is not responding...."

When I try to access the report server, I get:

"The report server has encountered a configuration error.  Access denied to the path c:program filesmicrosoft sql servermssql.3
eporting services
eportserver
sreportserver.config' is denied"

I have two partitions on win xp.  These are C and D.  C is a system drive and this is where sql server 2005 is installed as well.

Any ideas?

 

 

 

View 2 Replies View Related

Creating New SQL Server 2005 Database

Feb 10, 2008

Hello all,
I am new to MS SQL Server and am having troubles figuring out how to create a new database file. I have installed everything I can and and still cannot find any where to add a database file. I am upgrading from Access to SQL and feel like I am missing something... I will eventually need to create a couple of SQL databases and connect from Classic ASP and ASP.net in different applications. Before I worry about how to connect I need ot create something to connect to.

Any help would be greatly appreciated.
Thanks
Panhead

View 1 Replies View Related

Creating A Database In SQL 2005 - Using Windows 2003

Nov 3, 2006

when i try to create a new database i get a error: The server could notload DCOMwhat is wrong and how can i fix it?i have updated mssql/win 2003 with the lates updatesRgdsBobby

View 1 Replies View Related

Creating A Unicode SQL Server 2005 Database

Nov 14, 2007

Hi,

We have recently been looking into creating our SQL Server 2005 database as a unicode database using UTF-8 encoding. However initial search's suggest that SQL Server 2005 does not support the creation of UTF-8 db's and only supports UCS-2. Is this the case? If so then why is it not supported as most other vendors (Oracle, IBM) support it. If it is possible to create a UTF-8 database could you provide some details on how to go about this?

Thanks,
Cathal

View 1 Replies View Related

How To Start Creating DataBase Diagram In SqlServer 2005?

Feb 29, 2008

HI,
How can i start to create database diagram in Sqlserver 2005.
Please provide any URL(s).
 
Thanks and Regards,
Rafeeq

View 1 Replies View Related

SQL Server 2005: Question About Creating A User For A Database

Dec 12, 2005

I'm not a DBA, so I don't know where to look for information on this.

In SQL Server 2005, I can simply no longer create a user for the database I created. It asks that the user be associated with a login. That login is found in the Security folder of the database instance.

The question is: what is this instance security folder for? I don't recall having to do this in SQL Server 2000.

Any elaboration or links to such information would be appreciated.

View 3 Replies View Related

SQL 2005: Creating Correct And Incorrect Versions Of A Database

Jun 20, 2006

I work at a place which is currently running SQL 2000, but they areplanning to migrate to 2k5. I was thinking that this is the perfectopportunity to fix all the weaknesses we have had in our data model forthe longest: primary keys and foreign keys with different names, use ofcharacter columns for boolean fields, use of integer columns fortoggles, no referential integrity, etc.So, even if I create my Utopian perfect data model and modify all ofour data loaders to use it, our live website must use the old incorrectversion because there is way too much work involved in redoing thecode.My question then becomes: if I have a correct version, how easy andwith what approach would one take the data in the correct one andmirror it to the poorly designed schema?

View 4 Replies View Related

SQL SRVR 2008 And Vb6

Dec 3, 2007


Hi
i am new to sql2008 and coming from vb6,sql2000 background. We tried Orcas. we dont want to move our project to dotnet for atleast one year. we want to makie it tune with windows vista also. so kindly tell us which version of adodb can be used with vb6 and sql2008. i am pasting our old code from vb6 here.




Code Block
dim cn as new adodb.connection
cn.open "Provider=SQLOLEDB.1;password=NETECH0507;Persist Security Info=False;User ID=sa;Initial Catalog=" & dbname & ";Data Source=" & gStrSQLServerName






Let me know what are the changes required while connecting with vb6 and sql 2008 express edition
Rgds
Pramod

View 6 Replies View Related

Installing SQL Srvr On Win98

Sep 24, 2001

Hi!
I have tried installing SQL Server 7.0 on my Win 98 machine. My machine has all the latest service packs and I think it is reasonably up to date. I've tried installing from the disc 3 times and it fails to install:
the Server Network Utility and Service Manager.
As a result, I am unable to register my local machine as a SQL server.
Any ways around this? Quick fixes?
Thanks!
--Michelle

View 4 Replies View Related

HELP: Renamed Machine Now SQL SRVR 7 Won't Recognize

Sep 19, 2000

Our network people changed our machine name one character without our permission, they say their naming standards can't handle an "underscore" we put in our name...now the SQL Server won't run because it doesn't recognize the name of the machine.

Is there a way of bypassing or telling SQL server that we changed the name without having to reload all of our information?

View 2 Replies View Related

Sql Srvr 6.5 Only Runs From Command Prompt

Oct 11, 1999

We have a development server that will only run SQL Server from a DOS command prompt. Each time I reboot the server the services don't autostart, and I am unable to start them manually using Service Manager. Does anyone know what I can do to fix this problem?
Thanks

View 1 Replies View Related

LogShipping Cant Make Sec Srvr Operational

Feb 12, 2004

Whenever I am trying to put my secondary server operational as my primary (primary is not available) by running

sp_change_secondary_role

@db_name = 'TX_ACCT',

@final_State = 1,

@access_level = 1,

@terminate = 1



I am repeatedly getting this message



Server: Msg 3021, Level 16, State 1, Procedure sp_change_secondary_role, Line 124

Cannot perform a backup or restore operation within a transaction.

Server: Msg 3013, Level 16, State 1, Procedure sp_change_secondary_role, Line 124

RESTORE DATABASE is terminating abnormally.

Server: Msg 226, Level 16, State 1, Line 1

ALTER DATABASE statement not allowed within multi-statement transaction.



Can you please help? This is urgent

View 6 Replies View Related

Srvr Permissions: Public Gone, Need It Back!

Jun 3, 2008

Hi all,

Hope someone can help: by default, there's an entry for 'public' in server permissions (right-click server in Management Studio > Properties > Permissions), which has 1 selection: 'View All Databases' is set to 'grant'. I wanted to disable this permission, and so unfortunately unchecked the 'grant' tickbox but forgot to tick the 'deny' tickbox. What appears to have happened is the entire 'public' entry has been removed, meaning I can't go back and reselect 'grant' (or 'deny') for 'View All Databases'. I'd really like to get the 'public' role to reappear... Is that possible?

A very big thanks for any help!

View 1 Replies View Related

Non-techie Interface To SQL Srvr 05 DM Functionality For 500,000 Rows?

Jan 15, 2008

Dear all,

We've a denormalised database (SQL Server 05) with around half a million rows, feeding a fairly simple Analysis Services cube. We were hoping to use the Excel 07 DM add-in as a user-friendly interface to lots of people, but as far as I can tell we need to first import the data into an Excel 07 worksheet. I realise 2007 has a 1mn limit, but the rows are wide, downloading GBs is not possible, and I have concerns about Excel performance and reliability at these volumes, especially on a desktop.

Is there any way to use the data mining functionality without having the data in Excel?

If not, what would be the simplest/quickest/cheapest way of providing this functionality (or subsets of it) to people who know Excel but not data mining?

Thanks for any guidance or corrections,
Chris

PS. Would downloading subsets of the data work, along the lines of the article entitled Sampling Nested Tables ( http://www.sqlserverdatamining.com/ssdm/Default.aspx?tabid=102&Id=14 )?

View 8 Replies View Related

Problem With Creating New SQL Server Database In VWDExpress Using SQL Server 2005 Express

Jul 1, 2006



I have two problems on creating new SQL server database in Visual Web Developer 2005 Express using SQL server 2005 Express.

The 1st problem: (It is resolved)

After installed SQL Server 2005 express and Visual Web Developer 2005 Express. When I tried to create a SQL server database in VWD the following error occurred:

"connection to SQL Server files (*.mdf) require SQL server express 2005 to function properly. please verify the installation of the component or download from the URL: go.microsoft.com/fwlink/?linkId=49251"

I was stuck with this problem for few days. I did several times of install/reinstall of VWPExpress and SQL server Express, made very sure following proper de-installation sequence as specified in the release readme. But it did not resolve the problem.

Latter I found out that if I login with another Windows XP user account, I don't get the problem.

Changing the security authority of XP file systems and IIS didn't help.

And to prove that I was doing the installation correctly, I tried a new installation of the VWDExpress with SQL server 2005 express in another machine, it worked and I could create new empty SQL database.

After 2 days of frustrating changing of options, parameters, server names, messing with the registry etc.... Finally, I found a way to overcome this problem.

The solution is:

In Visual Web Developer 2005 Express, select:

Tools -> Options -> Database Tools -> Data Connections,

Change the setting: "SQL Server Instance Name (blank for default)" to "SQLEXPRESS". (where SQLEXPRESS is the default server instance name)

That solved this 1st problem.

I still don't know the exact reason for this problem. But I recalled I did installed the VWDExpress few weeks ago, I might have installed it without selecting SQL server 2005 express at that point. I guess the subsequent install/re-install did not clean up those junk in the registry.

I still have the 2nd problem:

The "Create new SQL database..." option is always grayed out when I right click on the Data connections in the "Database Explorer" tab.

I have a bypass for this difficulty for time being:

I have to do it by using the "Add connection....", put in the server name: "myserver/SQLEXPRESS" and a new database name.

Any input form anyone ? Appreciated!

View 3 Replies View Related

Error Creating First SQL Express Database Via VWD 2005 Express: User Does Not Have Permission To Perform This Action

Aug 18, 2006

I get an error dialog when I try to create a new SQL database, both via the Add New Item dialog and the property wizard of a new SqlDataSource control. The error is:


Local Database File:

User does not have permission to perform this action.

I've searched for help with this.

I ensured the App_Data folder exists and I added the local ASP.NET account to the group that have R/W access to it (although the RO flag is in an unchangeable tri-state on the folder).
The SQL Server Express error log is clean and indicates full functionality.
Everything is running locally.
No VWD installation errors.

Any ideas?

Thank you!

View 3 Replies View Related

Creating A New Connection With Microsoft SQL Server 2005 Compact Edition From Visual Studio 2005 IDE

Jul 25, 2007



Hello, How are you?
I have a problem when I try to create a new connection with Microsoft SQL Server 2005 Compact Edition from Visual Studio 2005 IDE. When I€™m going to choose the data source, the SQL Server 2005 Compact Edition provider doesn€™t appear in the list. I installed the SQL Server 2005 Compact Edition from this page http://www.microsoft.com/downloads/details.aspx?FamilyId=%2085E0C3CE-3FA1-453A-8CE9-AF6CA20946C3&displaylang=en. In the additional information says by installing SQLServerCE31-EN.msi installs the provider (System.Data.SqlServerCe.dll) in the GAC (global assembly cache) and registers the OLEDB provider (sqlceoledb30.dll). So, I don€™t understand why couldn€™t I create a new connection with Microsoft SQL Server 2005 Compact Edition from Visual Studio 2005 IDE?



I appreciate your help€¦

View 6 Replies View Related

A .NET Framework Error Occurred During Execution Of User-defined Routine Or Aggregate -While Creating A SQL SERVER 2005 Stored Prodecure In VS.NET 2005

Aug 15, 2007

 Running [dbo].[insertlogin] ( @log = hiten, @pas = hiten ).A .NET Framework error occurred during execution of user-defined routine or aggregate "insertlogin": System.Data.SqlClient.SqlException: Must declare the scalar variable "@Log".System.Data.SqlClient.SqlException:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnectionSmi.EventSink.ProcessMessagesAndThrow(Boolean ignoreNonFatalMessages)   at Microsoft.SqlServer.Server.SmiEventSink_Default.ProcessMessagesAndThrow(Boolean ignoreNonFatalMessages)   at System.Data.SqlClient.SqlCommand.RunExecuteNonQuerySmi(Boolean sendToPipe)   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()   at SqlServerProject1.StoredProcedures.insertlogin(SqlString log, SqlString pas).No rows affected.(0 row(s) returned)@RETURN_VALUE = Finished running [dbo].[insertlogin]. ***************************************************************all i am trying to do is :  creating a SP in VS using managed code and then trying to execute it. But every time i get the above error. If you can tell me how to edit connection string in this that would be very helpful. At present i am using :   Using conn As New SqlConnection("context connection=true") I tried to do "" ALTER ASSEMBLY SqlServerProject1 WITH PERMISSION_SET=EXTERNAL_ACCESS""but i get this error  ""  Msg 10327, Level 14, State 1, Line 1ALTER ASSEMBLY for assembly 'SqlServerProject1' failed because assembly 'SqlServerProject1' is not authorized for PERMISSION_SET = EXTERNAL_ACCESS.  The assembly is authorized when either of the following is true: the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission. If you have restored or attached this database, make sure the database owner is mapped to the correct login on this server. If not, use sp_changedbowner to fix the problem.""" *********************************************************************Plz help 

View 13 Replies View Related

Creating Database From Stored Proc With Variable Holding The Database Name

Aug 16, 2007

Here is my code


ALTER PROCEDURE Test
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @From varchar(10)
DECLARE @To varchar(10)
DECLARE @DBName varchar

SELECT TOP 1 @From = CONVERT(char,CreateDate,101) FROM CustomerInfo
WHERE TicketNum =
(SELECT TOP 1 TicketNum FROM CustomerInfo
WHERE CreateDate <= DATEADD(mm, -30, CURRENT_TIMESTAMP)
ORDER BY CreateDate DESC)
SELECT @To = CONVERT(char,GETDATE(),101)

SET @DBName = 'Archive_SafeHelp'
CREATE DATABASE @DBName + ' ' + @From + ' ' + @To
END


I am trying to create a database based on the name contained in the variables. I get the error 'Incorrect syntax near '@DBName'. How do i accomplish this?

Thanks
Ganesh

View 2 Replies View Related

Guidelines For Creating A Database Snapshot On A Mirror Database

Nov 24, 2006

Hi guys, can I know the steps on creating a database snapshot on a mirror database? Thx for the assistance. :)



Best Regards,

Hans

View 1 Replies View Related

Creating Alerts In Sql 2005

Feb 6, 2007

Hello,

Does anyone have a sample of an alert they created which would fire when a (backup database) maintenance plan fails?

I am unsure of the type, error number, and/or severity for an event of this type.

Thanks Alot!

View 1 Replies View Related

Creating Views In SQL 2005

Jun 17, 2008

can anyone tell me why when I create a view if I do this in my select statement "CAST(CrewNo AS char(10)) AS CrewNo" and then save the view the above CAST statement will be changed to this "CAST(CrewNo AS char(10)) AS Expr1". After I have it saved and then go back and change it back to "CAST(CrewNo AS char(10)) AS CrewNo" it will stay that way. Just looking for a reason why this is happening as I don't know if I'm doing something wrong or not.

View 2 Replies View Related

Creating A Login In 2005

Jun 13, 2007

I like to create a new login for an user. He has to logon without typing in a password. How do i do this in 2005?

=============================
http://www.sqlserverstudy.com

View 1 Replies View Related

Creating Database

Jun 26, 2006

How do you create a SQL database (Sql Express 2005) in real time using VB.Net 2005 ASP.net 2.0?

View 2 Replies View Related

Creating Database

Dec 4, 2007

I am working on site in asp.net with c# and using database sql server 2000 and managing all  the data on server i have created one database on server and in that i have created 15 table.  should i continue with the same or create another database for table.
tell me how many tables should i maintain in  one database. and what precausion should i take while mainting database to increse the speed of site.and what precausion should i take to avoid serverload
please guide me i dont have an idea.
thanks for spending ur valuable time for me.

View 8 Replies View Related

Need Help On Creating A Database

Nov 21, 2003

Sorry, I'm a newbie out there when it comes to creating database. I currently have an ASP.Net project which requires a database. I spent the past few days thinking about how to create a proper database for the application but to no avail. I think tis thread might be out of point for tis forum, but i am really in need of help.

Here goes the storyline of my database:

The project is an online project management system, meant for students to submit their deliverables (reports, eg. Minutes, agenda, project monitor chart) Lecturers will access the web application to grade the student’s submission. The application must allow administrators to add in new subjects. When a new subject is added, the subject leader will set a dateline for a particular module to be submitted. Eg, minutes dateline. Once the dateline is due, the system will inform the lecturers in charge of who/which group did not submit the module. Lecturers and subject leaders can then generate warning letters to be sent via email to the students involved. Lecturers and subject leaders will be able to make announcements through the system as well.

A student can either submit his/her work as an individual or as a group.
A student will be studying more than 1 subject.
A subject will consist of more than 1 module.
Every module will have a dateline for its submission.
Students can make more than 1 submission for each module.
Students belong to different groups/classes for different subjects.
For different modules, there will be different fields to be inserted into the database.
Example, in the “Minutes module�, the student will have to be able to key in the objectives, the date of the meeting, the venue, its members, absent members, actual minutes, action by and meeting end time.

In the “Project monitor chart module�, the student will have to key in the week/date, the name of the member, task involved, as well as the status.

When a new subject is created, the subject leader will have to specify the percentage of each different module. (Eg, Exams – 40%, Term test 15%, and so on.)

A subject will also be taught by more than 1 lecturer. So subject leader will specify the lecturers teaching that particular subject.


I hope someone out there can help me out on the construction of a database for the above storyline. Thanks a lot.

View 1 Replies View Related

Creating A Database Using ASP.NET

Jan 14, 2004

Hi All,

Can anybody help me/does anybody have the code to create a database on ms sql server 2000 using asp.net?

This needs to be done without being asked for the sql server login credentials (i.e the sa username/password can be inserted in the code)

View 8 Replies View Related

Creating A Database With A GUI

Aug 19, 2005

Is there any tools to create a database with tables, views, and all that jazz with a GUI. I went through the exammle on beta.asp.net but the way they created their db was with a script. I want to create everything with a GUI app. If this gui app doesn't exist can someone point me to where I can find more info about creating db, tables etc with sql server 2005 express? Thanks in advance.-Daticus

View 2 Replies View Related

Creating A Database

Oct 14, 2006

I have an excel document that Imported to access database. That database should count the number of tickets created by each tech rep; list the area, sub area and description of call created by a the tech rep. Can access perform this task and if yes, any idea I to approach that project or should i use SQL, And if access won't be able to do it. please make a suggestion how to approach this project. it will be nice if i can get the steps.


EXAMPLE
Request Id SRS Started Call Description Area Sub Area Request Status Closed Date Assign To Created By

View 2 Replies View Related

Creating A New Database

Apr 12, 2004

I created a database using the following command :

create database krish on (Name='krish', filename='C:Program FilesMicrosoft SQL ServerMSSQLdatakrish.mdf', size=25, maxsize=50,filegrowth=5%)

This actually created the database. Now, I wanted to view this database info being stored inside the SQL Server system tables. I looked at "sysdatabases" table and found an entry as expected for "krish" but I could not trace where the info corresponding to the size of the database was stored ie.25MB . (I looked ad "sysdevices" but couldn't find any entry for the newly created database).

In which table is it stored ?

Any help is appreciated.

View 2 Replies View Related







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