Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Monday, March 19, 2012

Dummy Table?

Hi!

I'm new in SQL SERVER 2000 and i'm looking for some kind of predefined dummy table. You know something like the "dual"-Table in Oracle. I want to use it for queries like that:

Select 1, 'auto' from dummy_table

Does anyone know, if something like that in SQL SERVER 2000 exists?

NickOriginally posted by nick792
Hi!

I'm new in SQL SERVER 2000 and i'm looking for some kind of predefined dummy table. You know something like the "dual"-Table in Oracle. I want to use it for queries like that:

Select 1, 'auto' from dummy_table

Does anyone know, if something like that in SQL SERVER 2000 exists?

Nick

There is no dummy table in sql server.
you can just use
select 1,'auto'
it will select 1 and the literal 'auto'
what is 'auto'?
regards,
harshal.|||U don't have to mention the "from dummytable" part.

Just
"select '123' " would be fine in SQL Server, as opposite to Oracle
where u need to have it as
"select '123' from dual"|||Thanks!
It works!

"auto" is german for "car"!

Nick|||I was wondering...Oracle, DB2, ect all have this 1 Row system table so you can do like sql server does, but without the FROM clause...

The question is...does ANSI consider this a "malformed" query syntax without the FROM?

Just curious.|||seems to me i've heard someone say that the FROM clause is not required in some recent sql standard, however, when i test a sample query in the various sql versions of the Mimer SQL Validator (http://developer.mimer.se/validator/index.htm), they all come back with an error

Sunday, March 11, 2012

Dumb permissions question

Hi
I'm running SQL Server 2000 on a Windows 2003 SBS server. Much to my
horror I notice that that the SQL data directory has permissions set
for:
Domain\Administrator (full accesss)
Domain\Administrators (full accesss)
Authenticated users (read,list, read). I guess this isn't a good idea
at all!
What are the optimum permissions here (I can't seem to get a straight
answer). Do I set it for the SQL service to have full control only (at
the moment MSSQLSERVER service is logging on using
Domain\Administrator). Do I change this account? What about the other
SQL Server related services? Please also note I am also using Backup
Exec 9 to backup the databases.
Any suggestions you may have will be greatly appreciated!
Many thanks
Alex<postings@.alexshirley.com> wrote in message
news:1133285607.162678.51170@.g14g2000cwa.googlegroups.com...
> Hi
> I'm running SQL Server 2000 on a Windows 2003 SBS server. Much to my
> horror I notice that that the SQL data directory has permissions set
> for:
> Domain\Administrator (full accesss)
> Domain\Administrators (full accesss)
> Authenticated users (read,list, read). I guess this isn't a good idea
> at all!
> What are the optimum permissions here (I can't seem to get a straight
> answer). Do I set it for the SQL service to have full control only (at
> the moment MSSQLSERVER service is logging on using
> Domain\Administrator). Do I change this account? What about the other
> SQL Server related services? Please also note I am also using Backup
> Exec 9 to backup the databases.
> Any suggestions you may have will be greatly appreciated!
> Many thanks
> Alex
On my SQL Server 2000 database running on Windows 2003 standard server, the
permissions on the SQL data directory are just for Domain\Administrators,
full access. The MSSQLServer service is set to use the local system account.
If your authenticated users have access then you should be able to revoke
that without problem.
I don't know where Backup Exec fits into the picture - I don't use it - but
it shouldn't be backing up the files directly so it shouldn't need any
permissions on the folder.
Hope this is useful.
--
Brian Cryer
www.cryer.co.uk/brian|||Great, thanks for your help Brian...!
Alex
-->
Brian Cryer wrote:

> <postings@.alexshirley.com> wrote in message
> news:1133285607.162678.51170@.g14g2000cwa.googlegroups.com...
> On my SQL Server 2000 database running on Windows 2003 standard server, th
e
> permissions on the SQL data directory are just for Domain\Administrators,
> full access. The MSSQLServer service is set to use the local system accoun
t.
> If your authenticated users have access then you should be able to revoke
> that without problem.
> I don't know where Backup Exec fits into the picture - I don't use it - bu
t
> it shouldn't be backing up the files directly so it shouldn't need any
> permissions on the folder.
> Hope this is useful.
> --
> Brian Cryer
> www.cryer.co.uk/brian

Wednesday, March 7, 2012

DTSTransformationSTATus constants !

Hi
I am building a DTS package, to read a IIS Log files into SQL-Server database file through a DTS package.

It is runing smooth, but sometimes the Log file include some CR LF, unexpected text,...etc so the DTS package can't read the fields perfectly and it fails, and I recieve an error.

I am up to use ActiveX Script in VBScript language to have more control over the flow of the transformation of the data operation.

Now, how can I use the DTSTransformationSTATUS constants to make my loops and check the different source fields?

I will appreciate an examples that control the folow of the Transformation of a TEXT file.

Thank you for your help in advance.

KhalidHow big are the log files ? What are the patterns to these hiccups ? Have you thought about writing a small app(vb,perl) that corrects the file first then use dts to import the file - you could actually make this a part of your dts package (calling the app) ?|||The log files are 50 MB to 60 MB in size.

About writing an Application to correct the log file, this is exactuly what I am up to, and since DTS is providing a powerful tools through VBScript or VBJScript to have more control over the Transformation process, I have decided to use these tools.

There are some constants such as DTSTransformationSTATUS_Error, DTSTransformationSTATUS_ErrorInfo,.. etc . These constants can be used to control the flow of the Transformation process and to handle the errors if any.

I need an example using these constants to make things more clear for me to build my own application.

Do you have any idea about these constants?

Thanks

Friday, February 17, 2012

DTS Trimming My Data

Hi

I have a DTS package that pulls data from oracle and inserts it into SQL.
During this transfer, any data that has trailing spaces, loses those spaces
in SQL. i.e. it's been trimmed.

Any way to set DTS not to trim the data ?

Thanks

SteveHi

This may be due to the ANSI_PADDING setting being OFF

http://msdn.microsoft.com/library/d...asp?frame=true

John

"Steve Thorpe" <stephenthorpe@.nospam.hotmail.com> wrote in message
news:bj4qt9$752$1@.titan.btinternet.com...
> Hi
> I have a DTS package that pulls data from oracle and inserts it into SQL.
> During this transfer, any data that has trailing spaces, loses those
spaces
> in SQL. i.e. it's been trimmed.
> Any way to set DTS not to trim the data ?
> Thanks
> Steve

Wednesday, February 15, 2012

DTS transactions

Hi!
I am using SQLServer DTS object to manage my database. There is
BeginTransaction method. My question is:
1. In which database's context SQLServer.BeginTransaction starts
transaction?
2. How can I know/change current context in which SQLServer object works?Igor Solodovnikov, The DTS Object model has two hierarchies: 1) The DTS
Application hierarchy, which contains information about components registere
d
with the system and packages stored in SQL Serverand Meta Data Services, 2)
The DTS package hierarchy which contains all the the functional DTS elements
- tasks, steps, connections and global variables. Which hierarchy are you
using? Also, SQL Server 2000 Books online has a wealth of information about
the DTS Object model and it's methods and properties. If you have any furthe
r
questions, my email is frank_chang91@.hotmail.com.
"Igor Solodovnikov" wrote:

> Hi!
> I am using SQLServer DTS object to manage my database. There is
> BeginTransaction method. My question is:
> 1. In which database's context SQLServer.BeginTransaction starts
> transaction?
> 2. How can I know/change current context in which SQLServer object works?
>

DTS time out when run from SP global var

Hi
I run a DTS that gets global variable that says to which table to enter the text file. no problem when i run it inside the DTS. sometimes problem when i run it in the "local packages" frame but all the time i have a "time out" problem when i run it from SP. every time the number that written for the variable is like written in the defult for the DTS it runs in 1 second. when the value is the other one (say have file 1 and 2 and 1 is defult and i put 2 in the SP) i get 17 second and the process doesnt import the file at all!!! i use in the SP the sp_OACreate, sp_OAMethod, sp_OASetProperty with v. 97 and in the package in workflow properties of the current step i do If DTSGlobalVariables("FileToRun").Value <> 1 Then Main = DTSStepScriptResult_DontExecuteTask else Main = DTSStepScriptResult_ExecuteTask for both files. (actually should do 7).
any idea what is the problem as it runs good in the DTS frame cant be that its programming big mistake.

Thx
InonIs the SP running inside a transaction and locking the table? The dts package will get a new connection and be blocked by that lock.|||Originally posted by nigelrivett
Is the SP running inside a transaction and locking the table? The dts package will get a new connection and be blocked by that lock.

No the SP doesnt touch the table only the DTS fill the table.