Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Monday, March 19, 2012

Installing SQL Server 2005 Express Ed

Hi All,

I'm new to programming and I've got to develop a db for a uni project. However after downloading SQL Server 2005 express ed, I found that I could not find the command prompt to start writing scripts (black and white DOS screem). I only have the configuration tool option in my menu (within that server configuration manager, error & usage reporting and server surface area config).

How do I get started with creating my database, please help....................

I'm I not looking in the right place for the console (command prompt to run scripts) or have I not downloaded the right stuff.

I need help urgently!!!

Thanks, in advance

First thing, if you haven't already done so, download and install the Documentation and Samples for SQL Server 2005 Express Edition:

http://www.microsoft.com/downloads/details.aspx?familyid=9697AAAA-AD4B-416E-87A4-A8B154F92787&displaylang=en

There are a few ways to get started creating databases, run scripts, etc:

1. Install SQL Server Management Studio Express:

http://www.microsoft.com/downloads/details.aspx?familyid=82afbd59-57a4-455e-a2d6-1d4c98d40f6e&displaylang=en

2. Install a Visual Studio Express version

3. Open up a command shell and run sqlcmd -S <server\instance>

jeff.

|||

I downloaded SQL Server 2005 developers edition and in first go I could only install Server. The setup did not install client tools, BOL etc. I had to manually goto CD2 and setup.exe to install client tools and BOL.

|||

Thanks for the reply

I have installed the documentation and samples and the management studio, but when trying to work through the samples, I get this error message, for some reason I can't include the Adventure works db. What can I'm I not doing


1> SELECT name from sys.databases
2> Go
name

--

master

tempdb

model

msdb


1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> USE [master]
2> GO
Changed database context to 'master'.
1> CREATE DATABASE [AdventureWorks] ON
2> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.mdf' ),
3> (AdventureWorks = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
< AdventureWorks>.ldf' )
4> FOR ATTACH ;
5> GO
Msg 153, Level 15, State 1, Server YOUR-V7OY5L24PG\SQLEXPRESS, Line 2
Invalid usage of the option AdventureWorks in the CREATE/ALTER DATABASE statemen
t.
1> select name from sys.databases
2> go
name

--

master

tempdb

model

msdb


(4 rows affected)
1>

Monday, March 12, 2012

integrated authentication

Hi,

I am writing project in asp .net with sql server 2005. But I need support him by some applications like deamon in linux systems.(but it will be in windows) So i write it in java. I download jdbc driver and install it. I wrote simple project:

package MainW;

//import javax.mail.*;

//import javax.mail.internet.*;

//import com.sun.mail.smtp.*;

//import javax.swing.*;

//import java.awt.*;

//import java.awt.event.*;

//import java.io.*;

import java.sql.*;

//import java.text.DateFormat;

//import java.text.SimpleDateFormat;

//import java.util.*;

//import java.util.Date;

class Main

{

public static void main(String[] args)

{

String connectionUrl = "jdbc:" + "sqlserver://localhost;databaseName=ASPNETDB.MDF;IntegratedSecurity=True";

Connection con = null;

Statement stmt = null;

ResultSet rs = null;

try

{

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");

con = DriverManager.getConnection(connectionUrl);

String SQL = "SELECT * FROM aspnet_Users";

stmt = con.createStatement();

rs = stmt.executeQuery(SQL);

// Iterate through the data in the result set and display it.

while (rs.next())

{

System.out.println(rs.getString(4) + " " + rs.getString(6));

}

}

catch (Exception e)

{

e.printStackTrace();

}

finally

{

if (rs != null) try { rs.close(); } catch(Exception e) {}

if (stmt != null) try { stmt.close(); } catch(Exception e) {}

if (con != null) try { con.close(); } catch(Exception e) {}

}

}

}

But i have error:

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.AuthenticationJNI SNISecGenClientContext

WARNING: Initialize context failed

2007-08-20 15:20:59 com.microsoft.sqlserver.jdbc.SQLServerConnection SSPIData

WARNING: ConnectionID:1 TransactionID:0x0000000000000000 Authentication failed code-2146893052

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.SSPIData(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source)

at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)

at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at MainW.Main.main(Main.java:29)

I am googling about this error second day but i cannot find solve.

Please help.

The failure code -2146893052 is 0x80090304. Some results on the Internet mentions firewall blocking the SQL Server TCP port, but since you are connecting to the local machine it should not be a problem. I also heard of out of memory scenarios causing this error to be raised.

I think it would be helpful if you can mention the environment setup you are running the app under. Also, which SQL Server 2005 edition on you using?

Some things you may consider trying:

On the same machine, try running the "sqlcmd" tool that comes with SQL Server 2005 to see if you get the same error

sqlcmd -Slocalhost -E

integrate micosoft project into MS SQL

hi all, would like to ask for help...is anyone know how save the ms project into database, is it possible to save it into MSSQL.

i am just a new beginner..thanks in advanced.

-Myra-

Microsoft produce Project Central which does what you are asking for.

|||

thx for the reply...but how can we insert the value of microsoft project into MS SQL? have to use the tools?if not den how?

|||

actually what i want to do is that, i need to insert the value of microsoft project created into a database, then, i plan to use asp.net 2.0 to code it and manipulate the data of the microsoft project in database, like edit, delete and print, do u guys know the way?thx a lot again..

|||

Are you just trying to store it as a binary file? If so, you can easily save and restore it, hoever the manipulation of it will be very difficult.

Have you looked at Project Central? That stores the data as collection of data rather than as a single BLOB Other than the schema is non-intuitive, the data is in principal capable of being manipulated by an ASP.NET site.

|||

i have look through the project central, but my os is actually window xp which is incompatible with the requirement..

Integers in SQL Server

I'm having a problem with the way integers are stored internally and how they are returned with a SELECT statement. In the project I'm working on, I have to move data from an Excel file to a database so I'm using DTS and a group of stored procs to pull this off. What happens is:
    DTS pull data from Excel into temp tables Stored proc pulls from the first temp table into a supertype table IDENTITY column assigns primary keys Stored proc then loads primary keys into a cursor and, starting with the LAST record, moves the PK into the appropriate subtype table and assigns the correct foreign key enteries. Next stored proc pulls data from the second temp table into the supertype tabel Repeat process until all data is stored
I'm starting with the last record so I know that it will be from the most recent transfer from a temp table. Unfortunately the order of records that the cursor returns is not the order that they were inserted into the database. So when I go to transfer the records with PK numbers 258 and 257 (the last 2 inserted into the supertype) I end up moving the records with PK's 204 and 203 (the last 2 in the cursor). Is there any way to sort the records as they go into or come out of the cursor so the smallest number is first and the largets number last? Also, there are probably a thousand ways to do this more efficiently so suggestions there are also welcome. Thanks
I think I figured out a solution that doesn't use cursors and won't be affected by internal storage issues. However, comments and ideas are still welcome.|||Having staging table(s) is a very good thing when it comes to data import/export. If you can, try to eliminate dts from the process to save some cpu cycles. You'd want to look up linked server/openquery/openrowset/opendatasource in book online/google for some details.

Friday, February 24, 2012

Installing SQL Express - XP Home

Hi,

We're creating an installer package for SQL Express 2005 and I'm using the built-in setup project in VS 2005 to create my MSI.

Everything appears to be working well, excpet that on Windows XP Home the SQL Express package is exiting with an error code 70002. I've googled for several days now and simply can't find any help on the 70002 exit code. Can anyone help ?

The command line arguments (I've split them onto seperate lines for clarity) we're passing to "sqlexpr32.exe" are : -

/qn

INSTANCENAME=OurInstance

SAPWD="OurPassword"

ADDLOCAL=SQL_Engine,SQL_Data_Files,Client_Components,Connectivity

SQLBROWSERAUTOSTART=1

SQLACCOUNT="NT AUTHORITY\SYSTEM"

SQLBROWSERACCOUNT="NT AUTHORITY\SYSTEM"

AGTACCOUNT="NT AUTHORITY\SYSTEM"

ASACCOUNT="NT AUTHORITY\SYSTEM"

RSACCOUNT="NT AUTHORITY\SYSTEM"

SECURITYMODE=SQL

DISABLENETWORKPROTOCOLS=0

SQLAUTOSTART=1

Are you getting an error in the logs? Can you search your log folder for the text string "value 3" and post the 10 or so lines above it? This should give a more helpful message.

Thanks,
Sam Lester (MSFT)