2012年3月27日星期二

anyone know the best way to do this

Hi I am currently performing the following tasks manually and was wondering
if anyone might suggest if a script,dts or possibly .net application could do
this.
1. get file name from user
2. copy file from one server to another (path does not change so could be
hardcoded)
3. insert the name of the file in a database table (SQL2000).
thanks.
Paul G
Software engineer.
More info needed here - what interface does the user have to the
application - where are they giving the file name to you? In a SQL
context or Application context?
If assumptions are kept simple.....
1. depends on the application, but shouldn't be too hard
2. USE Master
GO
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
3. USE Userdb
GO
INSERT table
select 'filename'
Maybe write a SP with a filename parameter and execute #2 & #3 with the
same SP.
|||Hi thanks for the information. Sounds like you can perform a copy with the
command you provided.Think I will just use a .net application that calls a
stored procedure passing the name of the file as an input to the procedure.
will use this command as you provided.
EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
"\\server2\filepath\filename.xyz"'
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> More info needed here - what interface does the user have to the
> application - where are they giving the file name to you? In a SQL
> context or Application context?
> If assumptions are kept simple.....
> 1. depends on the application, but shouldn't be too hard
> 2. USE Master
> GO
> EXEC xp_cmdshell 'copy "\\server1\filepath\filename.xyz"
> "\\server2\filepath\filename.xyz"'
> 3. USE Userdb
> GO
> INSERT table
> select 'filename'
> Maybe write a SP with a filename parameter and execute #2 & #3 with the
> same SP.
>
|||Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
(or application) will have to have the correct OS permissions on the
aforementioned directories (I believe)....Can anyone else confirm?
Also - I wouldn't give your users a chance to input a command...just
give them the ability to enter a filepath and you hardcode the
command/sp in your application. Otherwise, they could do nasty things
with xp_cmdshell, as it's an open window into the OS.
|||ok thanks was thinking of hardcoding the path and then building the rest of
the string with the file name that is passed into the stored procedure. Was
also thinking of somehow testing the filename input (probably in the .net
app) and not call the stored procedure unless a valid filename is supplied.
Will most likely only be 1 user other than myself but also thinking they
would have to have permissions to the directories, source and destination.
Paul G
Software engineer.
"unc27932@.yahoo.com" wrote:

> Yes - check out BOL on xp_cmdshell. Beware though - the logged in user
> (or application) will have to have the correct OS permissions on the
> aforementioned directories (I believe)....Can anyone else confirm?
> Also - I wouldn't give your users a chance to input a command...just
> give them the ability to enter a filepath and you hardcode the
> command/sp in your application. Otherwise, they could do nasty things
> with xp_cmdshell, as it's an open window into the OS.
>

Anyone know table limits in multi-schema environment?

My product is growing rapidly and currently I have a db for each client with identical schema. Of course maintenance is pretty hard. I was thinking of using a shared db but having a schema for each client (sql 2005) - I have almost 100 tables in the schema which means with just 10 clients the db would pass 1000 tables. My gut is telling me this ain't going to fly!

any ideas? and if it does work ... any thoughts on updating the internal schemas for each client?

thanks

-c

You definately can get over 1000 tables, since certain complex ERP systems and such have that just on their own, and that was even in older version of SQL Server.

According to :http://msdn2.microsoft.com/en-us/library/aa933149(SQL.80).aspx

The amount of tables is actualy only limited by the amount of objects (which means all triggers, tables, stored procedures, etc count toward this limit). The limit is... 2,147,483,647

Good luck busting that. Oh, and thats SQL Server 2000, was too lazy to find the 2005 specs :)|||

Sounds responable to me. I was going off this article from MS that suggested no more than 100 tables per client schema in a single db but they don't specify why :)

http://msdn2.microsoft.com/en-us/library/aa479086.aspx

Any idea how to do updates to the schema? my current thinking is to get my app to login as each schema owner and execute the update script.

thanks

-c

Anyone know of any good AS performance tuning guides on the web?

Anyone know of any good AS performance tuning guides on the web?
AS Performance Guide
http://www.microsoft.com/technet/pro.../ansvcspg.mspx
Unfortunately the link is broken right now. I am have one of the web guys on
our side see what might have happened.
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ian W" <IanW@.discussions.microsoft.com> wrote in message
news:08DAB627-0868-484E-831C-B19E90FE320A@.microsoft.com...
> Anyone know of any good AS performance tuning guides on the web?
|||Hello Dave and Ian,
Check out http://www.sql-server-performance.com/articles_bi.asp
There are a few articles to get you started until the link is fixed.
Myles Matheson
Data Warehouse Architect
http://bi-on-sql-server.blogspot.com/

Anyone know of any good AS performance tuning guides on the web?

Anyone know of any good AS performance tuning guides on the web?AS Performance Guide
http://www.microsoft.com/technet/pr...n/ansvcspg.mspx
Unfortunately the link is broken right now. I am have one of the web guys on
our side see what might have happened.
--
Dave Wickert [MSFT]
dwickert@.online.microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Ian W" <IanW@.discussions.microsoft.com> wrote in message
news:08DAB627-0868-484E-831C-B19E90FE320A@.microsoft.com...
> Anyone know of any good AS performance tuning guides on the web?|||Hello Dave and Ian,
Check out http://www.sql-server-performance.com/articles_bi.asp
There are a few articles to get you started until the link is fixed.
Myles Matheson
Data Warehouse Architect
http://bi-on-sql-server.blogspot.com/sql

Anyone know of a good T-Sql Reference Code book?

Hi does anyone know of a good book that has all the t-sql keywords and functions in?? Or a webiste that has a printable version with explanations. I knows its on msdn but its very hard to print it all off.

I need something by my side so I can refer too and use in helping me build statements and sp,s etc.

Thanksfirst up, books online has the entire thing, though you can't print the lot at once.

secondly, MS Press has a complete reference called the SQL Server 2000 Reference Library. I'm not sure if it's available separately, but book 5 of the 6-book set is the complete T-SQL language reference. It's a tad expensive for the whole thing, and a web developer probably doesn't need the OLAP and warehousing books, but well worthwhile if you intend working heavily with SQL 2000. and it looks impressive on your bookshelf too.|||I would also think that the SQL Books Online are a very good resource (though oerhaps you might need to know the keyword to find information). Search for "Reserved Keywords" in Books Online (limit it to in Subject only) and you will get a good list of reserved words you can then search for details.|||Checkout something I made some time ago,
(the second page can B useful sometimes)

SQL.doc

Anyone know if lineheight property works?

A client I'm producing several reports for wants the spacing between the
lines of text to be less and I haven't any ideas other than this property to
get it to happen.
Any suggestions would be AWESOME!
Thanks,
DiaDia
I use tables alot and the height property works very well in a table. You
can also adjust the distance between rows with the padding property.
"Dia" wrote:
> A client I'm producing several reports for wants the spacing between the
> lines of text to be less and I haven't any ideas other than this property to
> get it to happen.
> Any suggestions would be AWESOME!
> Thanks,
> Dia

2012年3月25日星期日

Anyone know how to...

Anyone know how to or where the instructions are for setting up SQL 2000 for
SMS 2.0 usage is? I know you have to create the accounts in both the
computer / domain and in SQL, but what rights do you give them, etc ? There
used to be a "How To" article in the knowledge base, but that has all but
disappeared when SMS 2003 rolled out.
TIA"_M_" <here@.gone.com> wrote in message
news:#b77YR8nDHA.2676@.TK2MSFTNGP11.phx.gbl...
> Anyone know how to or where the instructions are for setting up SQL 2000
for
> SMS 2.0 usage is? I know you have to create the accounts in both the
> computer / domain and in SQL, but what rights do you give them, etc ?
There
> used to be a "How To" article in the knowledge base, but that has all but
> disappeared when SMS 2003 rolled out.
>
This would normally be a post for the SMS newsgroups :)
The easiest way to run your installation, here are the basic steps:
1) allow your SMS Service account to be sysadmin of the SQL Server
2) log in as the SMS Service account and create the database that SMS will
use, I always use SMS<SiteCode>
3) Install SMS under the context of the SMS Service account, when you get to
the database install dialogs, choose SQL Server 2000, do not create a
database, which will then prompt for the name of the existing database.
There are several other decision points, authentication mode and a prompt to
enter the service account...
Steve