Showing posts with label newbie. Show all posts
Showing posts with label newbie. Show all posts

Monday, March 19, 2012

[sql] is anyone using/familiar with godaddy hosting?

Hi all,

I'm a newbie of SQL.

I built a website using SQL 2005, and the data control was using a dataset and wizard,

now when I'm uploading the website + database,I learned godaddy doesn't support database uploading.

I have to create an empty SQL database on godaddy's sql server, and reDir the connection in config file.


my question is, where should I copy my dataset commands to godaddy's sql server?

2nd, how do I invoke them in asp.net?

thanks in advance

yonk

You would have to use DTS

Thursday, March 8, 2012

[newbie] SQL-query with SUM() doesnt work. :(

Hi NG,

I have two tables:

TABLE1 (id1 INTEGER NOT NULL, id2 INTEGER NOT NULL, value INTEGER, PRIMARY KEY (id1, id2))

TABLE2 (id1 INTEGER NOT NULL, text CHAR(4), PRIMARY KEY (id1))

And this is the query, that I'm trying to run on this tables:

select TABLE1.id1, TABLE2.text, sum(TABLE.value)
from table1, table2
where TABLE1.id1=TABLE2.id1
group by TABLE1.id1
order by TABLE1.id1 asc

Well - it doesn't work at all! :(
That is the reason?!

Appreciate everyone's help!!!

S.B.well when doing aggregates you must have everything in the select statement that is not being summed in the group by clause.

Example:

select t1.id1, t2.text, sum(t1.value)
from table1 t1, table2 t2
where t1.id1 = t2.id1
group by t1.id1, t2.text
order by t1.id1 asc|||Hello,

select TABLE1.id1, TABLE2.text, sum(TABLE.value)
from table1, table2
where TABLE1.id1=TABLE2.id1
group by TABLE1.id1
order by TABLE1.id1 asc

DROP the TABLE2.text field cause this is not a group field or
use

select TABLE1.id1, TABLE2.text, sum(TABLE.value)
from table1, table2
where TABLE1.id1=TABLE2.id1
group by TABLE1.id1, TABLE2.text
order by TABLE1.id1 asc

Hope that helps ?

Manfred Peter
Alligator Company Software GmbH
http://www.alligatorsql.com|||Thanks, mkkmg and alligatorsql.com !!! :)

"group by TABLE1.id1, TABLE2.text" works perfectly!

S.B.

Originally posted by alligatorsql.com
Hello,

select TABLE1.id1, TABLE2.text, sum(TABLE.value)
from table1, table2
where TABLE1.id1=TABLE2.id1
group by TABLE1.id1
order by TABLE1.id1 asc

DROP the TABLE2.text field cause this is not a group field or
use

select TABLE1.id1, TABLE2.text, sum(TABLE.value)
from table1, table2
where TABLE1.id1=TABLE2.id1
group by TABLE1.id1, TABLE2.text
order by TABLE1.id1 asc

Hope that helps ?

Manfred Peter
Alligator Company Software GmbH
http://www.alligatorsql.com

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-Erland
Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegro ups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>
|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
> how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
:)I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-ErlandEasiest in the login run is to read about the RESTORE command in Books Online. After you understand
how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegroups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> :)I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Online. After you understand
> how that RESTORE command work, you will find it natural how to work the GUI dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command in Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

[Newbie] Restoring.............

Hi,
I am very new to Microsoft Technologies, infact new to database world
I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
restore this backup by using SQL-Server 2000Enterprise edition, how
should i go about it?
Any help or comments will be highly appreciated.
-ErlandEasiest in the login run is to read about the RESTORE command in Books Onlin
e. After you understand
how that RESTORE command work, you will find it natural how to work the GUI
dialog in Enterprise
Manager (if you chose to use it instead of executing the RESTORE command in
Query Analyzer).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Erland" <Erland.Erikson@.gmail.com> wrote in message
news:1132234090.437642.38470@.f14g2000cwb.googlegroups.com...
> Hi,
> I am very new to Microsoft Technologies, infact new to database world
> I have a SQL-Server 7.0 back. How can i restore it? Moreover , can i
> restore this backup by using SQL-Server 2000Enterprise edition, how
> should i go about it?
> Any help or comments will be highly appreciated.
> -Erland
>|||Tibor Karaszi wrote:
> Easiest in the login run is to read about the RESTORE command in Books Onl
ine. After you understand
> how that RESTORE command work, you will find it natural how to work the GU
I dialog in Enterprise
> Manager (if you chose to use it instead of executing the RESTORE command i
n Query Analyzer).
>
osql
restore database blah from disk = 'c:\blah.dat'
something like that

[NEWBIE] Replication with MSDE 2000

Hi everybody,
can someone help me about replication ?
I want to install msde2000 on two machines (identical) and keep database
updated like mirroring, so my users can connect to mirrored data if primary
server crashed down.
The two machines are in my LAN with their own IP number
Is it Possible ?
Thanks in advance and sorry of my poor knowledge of MSDE features
Merlinweb
Hi Merlinweb,
Merge replication goes close to doing what you want if you keep it
synchronizing constantly. There is some latency with the updates but that's
ok in many scenarios. It works very well when the servers are on the same
LAN. You will need to consider though, how to make schema changes, etc. as
that introduces quite a few issues.
HTH,
Greg Low [MVP]
MSDE Manager SQL Tools
www.whitebearconsulting.com
"il_Leva" <il_levaMACIAO@.hotmail.com> wrote in message
news:41c97bf0$1@.x-privat.org...
> Hi everybody,
> can someone help me about replication ?
> I want to install msde2000 on two machines (identical) and keep database
> updated like mirroring, so my users can connect to mirrored data if
> primary
> server crashed down.
> The two machines are in my LAN with their own IP number
> Is it Possible ?
> Thanks in advance and sorry of my poor knowledge of MSDE features
> Merlinweb
>
|||"Greg Low [MVP]" <greglow@.lowell.com.au> ha scritto nel messaggio
news:uDw9mGI6EHA.2584@.TK2MSFTNGP10.phx.gbl...
> Hi Merlinweb,
> Merge replication goes close to doing what you want if you keep it
> synchronizing constantly. There is some latency with the updates but
that's
> ok in many scenarios. It works very well when the servers are on the same
> LAN. You will need to consider though, how to make schema changes, etc. as
> that introduces quite a few issues.
Thank you very much !
Now I go and search something useful on the net about merge replication.
Cheers
Merlinweb

[Newbie] Microsoft Analysis Server: Database not visible via remote XMLA

Hi,

I am trying to install the Adventure Works DW MS SQL Server 2005 Demo. I followed the instructions I found here and here (almost) to the letter. And lo and behold, I can actually see the Adventure Works DW Database in the Microsoft SQL Server Management Studio.

Moreover, when I execute the XMLA-Queries _in the SQL Server Management Studio_ to discover the datasources and then to list all catalogs, it displays all available catalogs just fine.

When I perform the exact same queries from a remote computer, only a previously installed Database (called "TestDB") is returned. No hint that Adventure Works could also exist.

I tried comparing the two databases (properties seem to be identical), but since I don't know anything about that "TestDB", it's really hard to see relevant differences.

Do I have to set certain access rights? I tried restarting the IIS service, but to no effect.

Now, above I stated that I followed the desciptions _almost_ to the letter. The step I could not reproduce was in the second link. It stated that I had to create an "Application Pool", but when I browsed to the IIS Node in the Computer Management console, I expanded it, but could not find "Application Pool" anywhere near it. So I did not create a new application pool -- it may, however, very well be that an Application Pool already existed.

Any ideas as to where I might look for errors?
Thanks in advance!
Philipp

Are you connecting using the same account? If not you would need to add the account to a role in Adventure Works.

The application pools only exist in IIS 6 which comes with Win2003 server, so if you are using WinXP or Win2000 you will not have application pools.

You could run SQL profiler and see what account SSAS is seeing when you ask it for a list of catalogs.

|||Thanks. Adding my user to a rule did the trick.

[newbie] Execute SQL task bypassed, why ?

Hi!

I meet a strange behaviour which is probably caused by my SSIS newbie nature.

I have a Execute SQL Task, used to drop and create some temporary tables. It works when invoked manually.

I have chained a Data Flow Task behind, but when I launch the whole process, although the Execute SQL tasks goes green, it is not executed (then the Data Flow fails because the required tables are missing).

Would anyone have any hint on why the execute sql task seems to be bypassed ?

kind regards

Thibaut

hi Thibaut,

how odd! Have you defined a log file for your package? If so, what kind of info is providing to you?

|||

Is that a package that you strated from scratch? If not; make sure there is not an expression or package configuration that changes the SQL Statement or the connection strings. If you are getting green on the SQL task I bet the object is actually being created, perhaps in the wrong side (server, schema, DB, etc)

Rafael Salas

|||I am now restarting the package from scratch, and making it configurable ("keeping it in the dark"). I'll report back if I meet the same issue again.

thanks!|||Hi!

I finally found out what is happening. The Data flow task is using a XML source to load the data into tables which are created by the Execute SQL task.

The XML source was trying to validate the schema provided at run time against tables which are not created yet... I just disabled the validation on the XML source and everything went fine.

thanks for all the replies.

cheers!

Thibaut

[newbie] dbcc showcontig

Hello.

Can you point me to books or good documentation that could help me in
understanding in detail the dbcc showcontig output (and the output of
other command that analize the status of a DB) and permit me
understanding what is going on and taking appropriate action?

Do you think a Microsoft Courses could help in this, or is it necessary
to just study/work to become good in this? If it can be useful, which
Microsoft courses?

Best Regards,
Mamo<mamo74@.gmail.com> wrote in message
news:1106796688.136298.283920@.z14g2000cwz.googlegr oups.com...
> Hello.
> Can you point me to books or good documentation that could help me in
> understanding in detail the dbcc showcontig output (and the output of
> other command that analize the status of a DB) and permit me
> understanding what is going on and taking appropriate action?
> Do you think a Microsoft Courses could help in this, or is it necessary
> to just study/work to become good in this? If it can be useful, which
> Microsoft courses?
> Best Regards,
> Mamo

http://www.sql-server-performance.c..._showcontig.asp

Simon|||This is a good guide but leaves out a huge amount of relevant information
(most significantly a discussion of logical fragmentation, DBCC INDEXDEFRAG
and the effects of multiple files on the DBCC SHOWCONTIG algorithms). You
should also read our whitepaper on the subject (it also deals with when you
should bother to reduce fragmentation).

http://www.microsoft.com/technet/pr...n/ss2kidbp.mspx

Regards

--
Paul Randal
Dev Lead, Microsoft SQL Server Storage Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

"Simon Hayes" <sql@.hayes.ch> wrote in message
news:41f8cfb0_2@.news.bluewin.ch...
> <mamo74@.gmail.com> wrote in message
> news:1106796688.136298.283920@.z14g2000cwz.googlegr oups.com...
> > Hello.
> > Can you point me to books or good documentation that could help me in
> > understanding in detail the dbcc showcontig output (and the output of
> > other command that analize the status of a DB) and permit me
> > understanding what is going on and taking appropriate action?
> > Do you think a Microsoft Courses could help in this, or is it necessary
> > to just study/work to become good in this? If it can be useful, which
> > Microsoft courses?
> > Best Regards,
> > Mamo
> http://www.sql-server-performance.c..._showcontig.asp
> Simon

Saturday, February 11, 2012

@local variable (newbie)

I am trying to run a query.

Declare ColNames_Csr Cursor
-- Open Cursor that contains all column names
for
Select Column_Name from Information_Schema.columns where Table_Name = @.TableName

Open ColNames_csr

Fetch Next From ColNames_csr into @.FieldName

While ...

Begin
.
.
.
Select @.FieldValue = (Select @.FieldName from Contacts)
Print @.FieldValue
.
.
.
end

@.SomeValue always returns the FieldName (EMail) not @.FieldName (name@.somewhere.com).

I am trying to roll through all the columns and see what the value is for @.fieldname

What am i missing?

Thanks
LJOriginally posted by LittleJonny
I am trying to run a query.

Declare ColNames_Csr Cursor
-- Open Cursor that contains all column names
for
Select Column_Name from Information_Schema.columns where Table_Name = @.TableName

Open ColNames_csr

Fetch Next From ColNames_csr into @.FieldName

While ...

Begin
.
.
.
Select @.FieldValue = (Select @.FieldName from Contacts)
Print @.FieldValue
.
.
.
end

@.SomeValue always returns the FieldName (EMail) not @.FieldName (name@.somewhere.com).

I am trying to roll through all the columns and see what the value is for @.fieldname

What am i missing?

Thanks
LJ

Query below returns value of @.FieldName - no field in table. Think about dynamic query ...

(Select @.FieldName from Contacts)|||Dynamic Query? Im not sure I understand.

@.FieldName = 'Name'

Select @.FieldValue = (Select @.FieldName from Contacts where contactid = 32)

Print @.FieldValue

Always Prinst "Name"

How do I get the data in Contacts.@.FieldName?

Thanks
LJ|||Originally posted by LittleJonny
Dynamic Query? Im not sure I understand.

@.FieldName = 'Name'

Select @.FieldValue = (Select @.FieldName from Contacts where contactid = 32)

Print @.FieldValue

Always Prinst "Name"

How do I get the data in Contacts.@.FieldName?

Thanks
LJ

Dynamic query is something like this:

create table test(id int, code varchar(10))
go
insert test values(1,'A')
insert test values(2,'B')
insert test values(3,'C')
go
create proc retvalue(@.sql varchar(8000),@.result varchar(50) output)
as
declare @.res varchar(50)
create table #tmp(res varchar(50))
insert #tmp exec(@.sql)
select @.result=res from #tmp
return
go
declare @.res varchar(50),@.sql varchar(8000),@.field varchar(50)
set @.field='code'
set @.sql='select '+@.field+' from test'
exec retvalue @.sql,@.res output
select @.res